summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJens Petersen <petersen@haskell.org>2007-09-12 08:58:03 +0200
committerJens Petersen <petersen@haskell.org>2007-09-12 08:58:03 +0200
commitbc79a08491bb14a463b6b7554a64ac1347c02a6a (patch)
tree75620f5fe964dc5195dee498c969464277c61fc0
parent7d08f7256d9ebc880ed756633741d4e5e5ce6351 (diff)
downloadxmobar-bc79a08491bb14a463b6b7554a64ac1347c02a6a.tar.gz
xmobar-bc79a08491bb14a463b6b7554a64ac1347c02a6a.tar.bz2
only use 1 decimal place for showing floating numbers
darcs-hash:20070912065803-740ef-209c2cf47f371f163f1fa0db60d6838f7190f60c.gz
-rw-r--r--Plugins/Monitors/Common.hs2
-rw-r--r--Plugins/Monitors/Mem.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs
index bbc9c39..5177fb8 100644
--- a/Plugins/Monitors/Common.hs
+++ b/Plugins/Monitors/Common.hs
@@ -249,7 +249,7 @@ showDigits d n =
floatToPercent :: Float -> String
floatToPercent n =
- showDigits 2 (n * 100) ++ "%"
+ showDigits 1 (n * 100) ++ "%"
stringParser :: Pos -> B.ByteString -> String
stringParser (x,y) =
diff --git a/Plugins/Monitors/Mem.hs b/Plugins/Monitors/Mem.hs
index 2236256..65a8e96 100644
--- a/Plugins/Monitors/Mem.hs
+++ b/Plugins/Monitors/Mem.hs
@@ -37,7 +37,7 @@ parseMEM =
formatMem :: [Float] -> Monitor [String]
formatMem x =
- do let f n = showDigits 2 n
+ do let f n = showDigits 1 n
mapM (showWithColors f) x
runMem :: [String] -> Monitor String