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.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Plugins/Monitors/Cpu.hs b/src/Plugins/Monitors/Cpu.hs
index 919f7a4..6627f53 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"]
+ ["bar","total","user","nice","system","idle","iowait"]
type CpuDataRef = IORef [Float]
@@ -45,7 +45,7 @@ parseCpu cref =
formatCpu :: [Float] -> Monitor [String]
formatCpu [] = return $ replicate 6 ""
formatCpu xs = do
- let t = foldr (+) 0 $ take 3 xs
+ let t = sum $ take 3 xs
b <- showPercentBar (100 * t) t
ps <- showPercentsWithColors (t:xs)
return (b:ps)