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/Batt.hs | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'Monitors/Batt.hs') diff --git a/Monitors/Batt.hs b/Monitors/Batt.hs index b3890c8..fcc78fd 100644 --- a/Monitors/Batt.hs +++ b/Monitors/Batt.hs @@ -14,25 +14,18 @@ module Monitors.Batt where -import Data.IORef import qualified Data.ByteString.Lazy.Char8 as B import System.Posix.Files import Monitors.Common battConfig :: IO MConfig -battConfig = - do lc <- newIORef "#FF0000" - l <- newIORef 25 - nc <- newIORef "#FF0000" - h <- newIORef 75 - hc <- newIORef "#00FF00" - t <- newIORef "Batt: " - p <- newIORef package - u <- newIORef "" - a <- newIORef [] - e <- newIORef ["left"] - return $ MC nc l lc h hc t p u a e +battConfig = newConfig + "Batt: " -- template + package -- package + "" -- usage tail? + [] -- added args + ["left"] -- available replacements fileB1 :: (String, String) fileB1 = ("/proc/acpi/battery/BAT1/info", "/proc/acpi/battery/BAT1/state") @@ -84,4 +77,4 @@ main :: IO () main = do let af = runBatt [] runMonitor battConfig af runBatt --} \ No newline at end of file +-} -- cgit v1.2.3