summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--readme.md2
-rw-r--r--src/Plugins/Monitors/Mem.hs6
2 files changed, 5 insertions, 3 deletions
diff --git a/readme.md b/readme.md
index 03ed872..88daf39 100644
--- a/readme.md
+++ b/readme.md
@@ -708,7 +708,7 @@ something like:
- Args: default monitor arguments
- Variables that can be used with the `-t`/`--template` argument:
`total`, `free`, `buffer`, `cache`, `rest`, `used`,
- `usedratio`, `usedbar`, `freeratio`, `freebar`
+ `usedratio`, `usedbar`, `usedvbar`, `freeratio`, `freebar`, `freevbar`
- Default template: `Mem: <usedratio>% (<cache>M)`
### `Swap Args RefreshRate`
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