diff options
author | Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@gmail.com> | 2007-07-10 16:08:45 +0200 |
---|---|---|
committer | Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@gmail.com> | 2007-07-10 16:08:45 +0200 |
commit | 528556a36d5ff686689568c61422143276b0dc96 (patch) | |
tree | 80d00a09a14146373d20759961bca381771af580 /Monitors/Cpu.hs | |
parent | 8453821a99a4a211b2c489f1a90fa1ecea8a690d (diff) | |
download | xmobar-528556a36d5ff686689568c61422143276b0dc96.tar.gz xmobar-528556a36d5ff686689568c61422143276b0dc96.tar.bz2 |
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
Diffstat (limited to 'Monitors/Cpu.hs')
-rw-r--r-- | Monitors/Cpu.hs | 21 |
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 +-} |