summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Mem.hs
diff options
context:
space:
mode:
authorEric Mrak <mail@ericmrak.info>2014-03-14 00:43:38 -0700
committerEric Mrak <mail@ericmrak.info>2014-03-14 00:43:38 -0700
commit9b46234bddbecbcdb9f19aef7f441b15415db07d (patch)
treebddab4ae1a9bb2e61741cdfaf79fb400fe8f2811 /src/Plugins/Monitors/Mem.hs
parent91f48b568ffd287097fd41a7dca7fce5b9cc48f4 (diff)
downloadxmobar-9b46234bddbecbcdb9f19aef7f441b15415db07d.tar.gz
xmobar-9b46234bddbecbcdb9f19aef7f441b15415db07d.tar.bz2
Memory monitor has freevbar and usedvbar
Diffstat (limited to 'src/Plugins/Monitors/Mem.hs')
-rw-r--r--src/Plugins/Monitors/Mem.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Plugins/Monitors/Mem.hs b/src/Plugins/Monitors/Mem.hs
index d7b6754..e483317 100644
--- a/src/Plugins/Monitors/Mem.hs
+++ b/src/Plugins/Monitors/Mem.hs
@@ -20,7 +20,7 @@ import qualified Data.Map as M
memConfig :: IO MConfig
memConfig = mkMConfig
"Mem: <usedratio>% (<cache>M)" -- template
- ["usedbar", "freebar", "usedratio", "freeratio", "total",
+ ["usedbar", "usedvbar", "freebar", "freevbar", "usedratio", "freeratio", "total",
"free", "buffer", "cache", "rest", "used"] -- available replacements
fileMEM :: IO String
@@ -49,11 +49,13 @@ formatMem (r:fr:xs) =
do let f = showDigits 0
rr = 100 * r
ub <- showPercentBar rr r
+ uvb <- showVerticalBar rr
fb <- showPercentBar (100 - rr) (1 - r)
+ fvb <- showVerticalBar (100 - rr)
rs <- showPercentWithColors r
fs <- showPercentWithColors fr
s <- mapM (showWithColors f) xs
- return (ub:fb:rs:fs:s)
+ return (ub:uvb:fb:fvb:rs:fs:s)
formatMem _ = replicate 10 `fmap` getConfigValue naString
runMem :: [String] -> Monitor String