summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Swap.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugins/Monitors/Swap.hs')
-rw-r--r--src/Plugins/Monitors/Swap.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Plugins/Monitors/Swap.hs b/src/Plugins/Monitors/Swap.hs
index e466dbb..107eb1e 100644
--- a/src/Plugins/Monitors/Swap.hs
+++ b/src/Plugins/Monitors/Swap.hs
@@ -42,10 +42,11 @@ parseMEM =
return [(tot - free) / tot, tot, tot - free, free]
formatSwap :: [Float] -> Monitor [String]
-formatSwap (r:xs) =
- do other <- mapM (showWithColors (showDigits 2)) xs
- ratio <- showPercentWithColors r
- return $ ratio:other
+formatSwap (r:xs) = do
+ d <- getConfigValue decDigits
+ other <- mapM (showWithColors (showDigits d)) xs
+ ratio <- showPercentWithColors r
+ return $ ratio:other
formatSwap _ = return $ replicate 4 "N/A"
runSwap :: [String] -> Monitor String