summaryrefslogtreecommitdiffhomepage
path: root/Plugins
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-24 16:22:05 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-24 16:22:05 +0200
commit899ff351ce1a0a1499672020a94b4e27fcb0b4d9 (patch)
tree687a80c832c13577e3dfd396395203bfec756e12 /Plugins
parent984ef9963e9f89a9e546bc1b9e8fc8b44377ff5e (diff)
downloadxmobar-899ff351ce1a0a1499672020a94b4e27fcb0b4d9.tar.gz
xmobar-899ff351ce1a0a1499672020a94b4e27fcb0b4d9.tar.bz2
Monitors.Commons: more code cleanup
darcs-hash:20070724142205-d6583-b2251fb6c400a6f9a8636f9f8ef5a3993594262e.gz
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/Monitors/Common.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs
index 53374d2..9217144 100644
--- a/Plugins/Monitors/Common.hs
+++ b/Plugins/Monitors/Common.hs
@@ -249,12 +249,12 @@ showDigits d n =
floatToPercent :: Float -> String
floatToPercent n =
- showDigits 2 (n*100) ++ "%"
+ showDigits 2 (n * 100) ++ "%"
stringParser :: Pos -> B.ByteString -> String
stringParser (x,y) =
- tk x . words . tk y . lines . B.unpack
- where tk i l | length l >= i = flip (!!) i $ l
+ li x . words . li y . lines . B.unpack
+ where li i l | length l >= i = l !! i
| otherwise = []
setColor :: String -> Selector (Maybe String) -> Monitor String