summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorEric Mrak <mail@ericmrak.info>2014-03-15 19:36:56 -0700
committerEric Mrak <mail@ericmrak.info>2014-03-15 19:36:56 -0700
commit2a43aae25b980bf08fd0b50c9517f9f72eb94f93 (patch)
tree51ea46dfca5f085df6d744224dd925c5615bd95d /src
parent49ab20e6360456f8d8fbcdc931406b5cf7bd0cca (diff)
downloadxmobar-2a43aae25b980bf08fd0b50c9517f9f72eb94f93.tar.gz
xmobar-2a43aae25b980bf08fd0b50c9517f9f72eb94f93.tar.bz2
DiskU/DiskIO have vbar equivalents
Diffstat (limited to 'src')
-rw-r--r--src/Plugins/Monitors/Disk.hs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Plugins/Monitors/Disk.hs b/src/Plugins/Monitors/Disk.hs
index cf4fa00..e0a7886 100644
--- a/src/Plugins/Monitors/Disk.hs
+++ b/src/Plugins/Monitors/Disk.hs
@@ -27,12 +27,14 @@ import Data.Maybe (catMaybes)
import System.Directory (canonicalizePath, doesFileExist)
diskIOConfig :: IO MConfig
-diskIOConfig = mkMConfig "" ["total", "read", "write",
- "totalbar", "readbar", "writebar"]
+diskIOConfig = mkMConfig "" ["total", "read", "write"
+ ,"totalbar", "readbar", "writebar"
+ ,"totalvbar", "readvbar", "writevbar"
+ ]
diskUConfig :: IO MConfig
diskUConfig = mkMConfig ""
- ["size", "free", "used", "freep", "usedp", "freebar", "usedbar"]
+ ["size", "free", "used", "freep", "usedp", "freebar", "freevbar", "usedbar", "usedvbar"]
type DevName = String
type Path = String
@@ -129,8 +131,9 @@ runDiskIO' :: (String, [Float]) -> Monitor String
runDiskIO' (tmp, xs) = do
s <- mapM (showWithColors speedToStr) xs
b <- mapM (showLogBar 0.8) xs
+ vb <- mapM (showLogVBar 0.8) xs
setConfigValue tmp template
- parseTemplate $ s ++ b
+ parseTemplate $ s ++ b ++ vb
runDiskIO :: DevDataRef -> [(String, String)] -> [String] -> Monitor String
runDiskIO dref disks _ = do
@@ -167,8 +170,10 @@ runDiskU' tmp path = do
s <- zipWithM showWithColors' strs [100, freep, 100 - freep]
sp <- showPercentsWithColors [fr, 1 - fr]
fb <- showPercentBar (fromIntegral freep) fr
+ fvb <- showVerticalBar (fromIntegral freep) fr
ub <- showPercentBar (fromIntegral $ 100 - freep) (1 - fr)
- parseTemplate $ s ++ sp ++ [fb, ub]
+ uvb <- showVerticalBar (fromIntegral $ 100 - freep) (1 - fr)
+ parseTemplate $ s ++ sp ++ [fb,fvb,ub,uvb]
where ign = const (return [0, 0, 0]) :: SomeException -> IO [Integer]