summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-27 03:04:09 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-27 03:04:09 +0100
commit24cd78c7571cc364dbe0c9764560f49e67d98176 (patch)
tree8d7f0847b8e225e4b0a5ed6085be2bf3d8ec1713 /src
parent52a3bf1f5f6d10f455a285e4a257ddb2183dbb18 (diff)
downloadxmobar-24cd78c7571cc364dbe0c9764560f49e67d98176.tar.gz
xmobar-24cd78c7571cc364dbe0c9764560f49e67d98176.tar.bz2
Linting
Diffstat (limited to 'src')
-rw-r--r--src/Xmobar.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index e4069dd..f3e0907 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -83,7 +83,7 @@ eventLoop xc@(XConf d _ w fs c) v = block $ do
-- interrupt the drawing thread every time a var is updated
checker t tvar ov = do
nval <- atomically $ do
- nv <- fmap concat $ mapM readTVar (map snd v)
+ nv <- fmap concat $ mapM (readTVar . snd) v
guard (nv /= ov)
writeTVar tvar nv
return nv
@@ -159,8 +159,8 @@ setPosition p rs ht =
case p of OnScreen i x -> (fromMaybe (head rs) $ safeIndex i rs, x)
_ -> (head rs, p)
ny = ry + fi (rh - ht)
- center i = rx + (fi $ div (remwid i) 2)
- right i = rx + (fi $ remwid i)
+ center i = rx + fi (div (remwid i) 2)
+ right i = rx + fi (remwid i)
remwid i = rw - pw (fi i)
ax L = const rx
ax R = right
@@ -273,7 +273,7 @@ drawBorder b d p gc c wi ht = case b of
BottomB -> drawBorder (BottomBM 0) d p gc c w h
FullB -> drawBorder (FullBM 0) d p gc c w h
TopBM m -> sf >> drawLine d p gc 0 (fi m) (fi w) 0
- BottomBM m -> let rw = (fi h) - (fi m) in
+ BottomBM m -> let rw = fi h - fi m in
sf >> drawLine d p gc 0 rw (fi w) rw
FullBM m -> let pad = 2 * fi m; mp = fi m in
sf >> drawRectangle d p gc mp mp (w - pad) (h - pad)
@@ -296,7 +296,7 @@ printStrings dr gc fontst offs a sl@((s,c,l):xs) = do
C -> (remWidth + offs) `div` 2
R -> remWidth
L -> offs
- (fc,bc) = case (break (==',') c) of
+ (fc,bc) = case break (==',') c of
(f,',':b) -> (f, b )
(f, _) -> (f, bgColor conf)
withColors d [bc] $ \[bc'] -> do