summaryrefslogtreecommitdiffhomepage
path: root/Monitors/Cpu.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Monitors/Cpu.hs')
-rw-r--r--Monitors/Cpu.hs21
1 files changed, 7 insertions, 14 deletions
diff --git a/Monitors/Cpu.hs b/Monitors/Cpu.hs
index 6f9b4fd..d629c14 100644
--- a/Monitors/Cpu.hs
+++ b/Monitors/Cpu.hs
@@ -16,21 +16,14 @@ module Monitors.Cpu where
import Monitors.Common
import qualified Data.ByteString.Lazy.Char8 as B
-import Data.IORef
cpuConfig :: IO MConfig
-cpuConfig =
- do lc <- newIORef "#BFBFBF"
- l <- newIORef 2
- nc <- newIORef "#00FF00"
- h <- newIORef 60
- hc <- newIORef "#FF0000"
- t <- newIORef "Cpu: <total>"
- p <- newIORef package
- u <- newIORef ""
- a <- newIORef []
- e <- newIORef ["total","user","nice","system","idle"]
- return $ MC nc l lc h hc t p u a e
+cpuConfig = newConfig
+ "Cpu: <total>" -- template
+ package -- package
+ "" -- usage tail?
+ [] -- added args
+ ["total","user","nice","system","idle"] -- available replacements
cpuData :: IO [Float]
cpuData = do s <- B.readFile "/proc/stat"
@@ -70,4 +63,4 @@ main :: IO ()
main =
do let af = runCpu []
runMonitor cpuConfig af runCpu
--} \ No newline at end of file
+-}