From 899ff351ce1a0a1499672020a94b4e27fcb0b4d9 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Tue, 24 Jul 2007 16:22:05 +0200 Subject: Monitors.Commons: more code cleanup darcs-hash:20070724142205-d6583-b2251fb6c400a6f9a8636f9f8ef5a3993594262e.gz --- Plugins/Monitors/Common.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Plugins') 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 -- cgit v1.2.3