summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Cpu.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugins/Monitors/Cpu.hs')
-rw-r--r--src/Plugins/Monitors/Cpu.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/Cpu.hs b/src/Plugins/Monitors/Cpu.hs
index 6627f53..7116f5e 100644
--- a/src/Plugins/Monitors/Cpu.hs
+++ b/src/Plugins/Monitors/Cpu.hs
@@ -22,7 +22,7 @@ import Data.IORef (IORef, newIORef, readIORef, writeIORef)
cpuConfig :: IO MConfig
cpuConfig = mkMConfig
"Cpu: <total>%"
- ["bar","total","user","nice","system","idle","iowait"]
+ ["bar","vbar","total","user","nice","system","idle","iowait"]
type CpuDataRef = IORef [Float]
@@ -43,12 +43,13 @@ parseCpu cref =
return percent
formatCpu :: [Float] -> Monitor [String]
-formatCpu [] = return $ replicate 6 ""
+formatCpu [] = return $ replicate 8 ""
formatCpu xs = do
let t = sum $ take 3 xs
b <- showPercentBar (100 * t) t
+ v <- showVerticalBar (100 * t)
ps <- showPercentsWithColors (t:xs)
- return (b:ps)
+ return (b:v:ps)
runCpu :: CpuDataRef -> [String] -> Monitor String
runCpu cref _ =