summaryrefslogtreecommitdiffhomepage
path: root/Plugins/Monitors/Disk.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/Monitors/Disk.hs')
-rw-r--r--Plugins/Monitors/Disk.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Plugins/Monitors/Disk.hs b/Plugins/Monitors/Disk.hs
index c0d8de7..f3c66a1 100644
--- a/Plugins/Monitors/Disk.hs
+++ b/Plugins/Monitors/Disk.hs
@@ -27,7 +27,8 @@ diskIOConfig :: IO MConfig
diskIOConfig = mkMConfig "" ["total", "read", "write"]
diskUConfig :: IO MConfig
-diskUConfig = mkMConfig "" ["size", "free", "used", "freep", "usedp"]
+diskUConfig = mkMConfig ""
+ ["size", "free", "used", "freep", "usedp", "freebar", "usedbar"]
type DevName = String
type Path = String
@@ -123,7 +124,9 @@ runDiskU' tmp path = do
fr = fromIntegral freep / 100
s <- zipWithM showWithColors' strs [100, freep, 100 - freep]
sp <- showPercentsWithColors [fr, 1 - fr]
- parseTemplate $ s ++ sp
+ fb <- showPercentBar (fromIntegral freep) fr
+ ub <- showPercentBar (fromIntegral $ 100 - freep) (1 - fr)
+ parseTemplate $ s ++ sp ++ [fb, ub]
runDiskU :: [(String, String)] -> [String] -> Monitor String
runDiskU disks _ = do