From 863987f2f9650917204ec6e05a351d59c0644956 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Tue, 8 Nov 2011 21:51:32 +0100 Subject: Whitespace --- src/Plugins/Monitors/Batt.hs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Plugins/Monitors/Batt.hs b/src/Plugins/Monitors/Batt.hs index d1403e6..77b2d62 100644 --- a/src/Plugins/Monitors/Batt.hs +++ b/src/Plugins/Monitors/Batt.hs @@ -157,20 +157,20 @@ runBatt' bfs args = do do l <- fmtPercent x parseTemplate (l ++ s:[fmtTime $ floor t, fmtWatts w opts]) NA -> return "N/A" - where fmtPercent :: Float -> Monitor [String] - fmtPercent x = do - p <- showPercentWithColors x - b <- showPercentBar (100 * x) x - return [b, p] - fmtWatts x o = color x o $ showDigits 1 x ++ "W" - fmtTime :: Integer -> String - fmtTime x = hours ++ ":" ++ if length minutes == 2 - then minutes else '0' : minutes - where hours = show (x `div` 3600) - minutes = show ((x `mod` 3600) `div` 60) - maybeColor Nothing _ = "" - maybeColor (Just c) str = "" ++ str ++ "" - color x o | x >= 0 = maybeColor (posColor o) - | x >= highThreshold o = maybeColor (highWColor o) - | x >= lowThreshold o = maybeColor (mediumWColor o) - | otherwise = maybeColor (lowWColor o) + where fmtPercent :: Float -> Monitor [String] + fmtPercent x = do + p <- showPercentWithColors x + b <- showPercentBar (100 * x) x + return [b, p] + fmtWatts x o = color x o $ showDigits 1 x ++ "W" + fmtTime :: Integer -> String + fmtTime x = hours ++ ":" ++ if length minutes == 2 + then minutes else '0' : minutes + where hours = show (x `div` 3600) + minutes = show ((x `mod` 3600) `div` 60) + maybeColor Nothing _ = "" + maybeColor (Just c) str = "" ++ str ++ "" + color x o | x >= 0 = maybeColor (posColor o) + | x >= highThreshold o = maybeColor (highWColor o) + | x >= lowThreshold o = maybeColor (mediumWColor o) + | otherwise = maybeColor (lowWColor o) -- cgit v1.2.3