diff options
author | Jose A Ortega Ruiz <jao@gnu.org> | 2010-03-19 21:33:24 +0100 |
---|---|---|
committer | Jose A Ortega Ruiz <jao@gnu.org> | 2010-03-19 21:33:24 +0100 |
commit | dc171e4a07e597f9f5d7839c231b8b9c3ae19437 (patch) | |
tree | cae45f74db3ffd894b7fb593288ebc46538aede3 /Plugins/Monitors/Disk.hs | |
parent | 4f8ba03c51570925fb59e90e65747da37a2a4b65 (diff) | |
download | xmobar-dc171e4a07e597f9f5d7839c231b8b9c3ae19437.tar.gz xmobar-dc171e4a07e597f9f5d7839c231b8b9c3ae19437.tar.bz2 |
Usage bars
Ignore-this: 63fd21a117029674e33a9c4419dbc4de
ASCII art bars for a bunch of monitors.
darcs-hash:20100319203324-748be-2f927aa0e16d8874e10a04f0245427d32e0e53ce.gz
Diffstat (limited to 'Plugins/Monitors/Disk.hs')
-rw-r--r-- | Plugins/Monitors/Disk.hs | 7 |
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 |