diff options
author | Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@gmail.com> | 2007-07-12 03:36:26 +0200 |
---|---|---|
committer | Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@gmail.com> | 2007-07-12 03:36:26 +0200 |
commit | 2217463c0f52280835bf508dd5b768bff56f2b65 (patch) | |
tree | aadf5f6247588d93e4a2f10fcedf2237e1014ecd /Plugins/Monitors/Swap.hs | |
parent | 57b8cee954996394d0ba7212819ffe592d2148b4 (diff) | |
download | xmobar-2217463c0f52280835bf508dd5b768bff56f2b65.tar.gz xmobar-2217463c0f52280835bf508dd5b768bff56f2b65.tar.bz2 |
Get rid of floats in scientific notation.
Use 'showDigits n' instead of 'show . takeDigits n'. As this example shows
explicit precision specifications would be appreciated ;)
darcs-hash:20070712013626-ba08c-868a9d53ab1b8bc120d7c1a9634d3d8c7cb599d7.gz
Diffstat (limited to 'Plugins/Monitors/Swap.hs')
-rw-r--r-- | Plugins/Monitors/Swap.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Plugins/Monitors/Swap.hs b/Plugins/Monitors/Swap.hs index fbddaae..d18ab8a 100644 --- a/Plugins/Monitors/Swap.hs +++ b/Plugins/Monitors/Swap.hs @@ -36,7 +36,7 @@ parseMEM = formatSwap :: [Float] -> Monitor [String] formatSwap x = - do let f1 n = show (takeDigits 2 n) + do let f1 n = showDigits 2 n f2 n = floatToPercent n (hd, tl) = splitAt 3 x firsts <- mapM (showWithColors f1) hd |