summaryrefslogtreecommitdiffhomepage
path: root/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/Monitors/Common.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs
index d2ae8c3..53374d2 100644
--- a/Plugins/Monitors/Common.hs
+++ b/Plugins/Monitors/Common.hs
@@ -253,7 +253,9 @@ floatToPercent n =
stringParser :: Pos -> B.ByteString -> String
stringParser (x,y) =
- flip (!!) x . map B.unpack . B.words . flip (!!) y . B.lines
+ tk x . words . tk y . lines . B.unpack
+ where tk i l | length l >= i = flip (!!) i $ l
+ | otherwise = []
setColor :: String -> Selector (Maybe String) -> Monitor String
setColor str s =