summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-24 22:35:54 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-24 22:35:54 +0200
commite8a47ab8c4b5b19dcc59a17140bf090f194e07c6 (patch)
treefc470d99828810637340574211506694f9fba8e7
parent68104c657b29d605fd6ac05962badceb1bec801e (diff)
downloadxmobar-e8a47ab8c4b5b19dcc59a17140bf090f194e07c6.tar.gz
xmobar-e8a47ab8c4b5b19dcc59a17140bf090f194e07c6.tar.bz2
Monitors.Common: parseString must use ByteStrings
darcs-hash:20070724203554-d6583-2efe004eea4fbee1a27489870907ee657caba9fb.gz
-rw-r--r--Plugins/Monitors/Common.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs
index 9217144..bbc9c39 100644
--- a/Plugins/Monitors/Common.hs
+++ b/Plugins/Monitors/Common.hs
@@ -253,9 +253,9 @@ floatToPercent n =
stringParser :: Pos -> B.ByteString -> String
stringParser (x,y) =
- li x . words . li y . lines . B.unpack
+ B.unpack . li x . B.words . li y . B.lines
where li i l | length l >= i = l !! i
- | otherwise = []
+ | otherwise = B.empty
setColor :: String -> Selector (Maybe String) -> Monitor String
setColor str s =