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/Swap.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/Swap.hs')
-rw-r--r-- | Monitors/Swap.hs | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/Monitors/Swap.hs b/Monitors/Swap.hs index 7a69341..9fb6cc0 100644 --- a/Monitors/Swap.hs +++ b/Monitors/Swap.hs @@ -16,22 +16,15 @@ module Monitors.Swap where import Monitors.Common -import Data.IORef import qualified Data.ByteString.Lazy.Char8 as B swapConfig :: IO MConfig -swapConfig = - do lc <- newIORef "#BFBFBF" - l <- newIORef 30 - nc <- newIORef "#00FF00" - h <- newIORef 75 - hc <- newIORef "#FF0000" - t <- newIORef "Swap: <usedratio>%" - p <- newIORef package - u <- newIORef "" - a <- newIORef [] - e <- newIORef ["total", "used", "free", "usedratio"] - return $ MC nc l lc h hc t p u a e +swapConfig = newConfig + "Swap: <usedratio>" -- template + package -- package + "" -- usage tail? + [] -- added args + ["total", "used", "free", "usedratio"] -- available replacements fileMEM :: IO B.ByteString fileMEM = B.readFile "/proc/meminfo" @@ -63,4 +56,4 @@ main :: IO () main = do let af = runSwap [] runMonitor swapConfig af runSwap --}
\ No newline at end of file +-} |