From 528556a36d5ff686689568c61422143276b0dc96 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosciuszkiewicz Date: Tue, 10 Jul 2007 16:08:45 +0200 Subject: Clean up default options for monitors. * Moved default configuration to Monitors.Common * Colors are optional and are off by default darcs-hash:20070710140845-ba08c-86afb9d30e4b71ad48539510feabde650b1b6045.gz --- Monitors/Cpu.hs | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'Monitors/Cpu.hs') 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: " - 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: " -- 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 +-} -- cgit v1.2.3