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/Net.hs | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'Monitors/Net.hs') diff --git a/Monitors/Net.hs b/Monitors/Net.hs index addee47..646b15e 100644 --- a/Monitors/Net.hs +++ b/Monitors/Net.hs @@ -15,8 +15,6 @@ module Monitors.Net where import Monitors.Common - -import Data.IORef import Text.ParserCombinators.Parsec data NetDev = NA @@ -29,18 +27,12 @@ interval :: Int interval = 500000 netConfig :: IO MConfig -netConfig = - do lc <- newIORef "#BFBFBF" - l <- newIORef 0 - nc <- newIORef "#00FF00" - h <- newIORef 32 - hc <- newIORef "#FF0000" - t <- newIORef ": |" - p <- newIORef package - u <- newIORef "dev" - a <- newIORef [] - e <- newIORef ["dev", "rx", "tx"] - return $ MC nc l lc h hc t p u a e +netConfig = newConfig + ": |" -- template + package -- package + "dev" -- usage tail? + [] -- added args + ["dev", "rx", "tx"] -- available replacements fileNET :: IO String fileNET = @@ -103,4 +95,4 @@ main :: IO () main = do let f = return "No device specified" runMonitor netConfig f runNet --} \ No newline at end of file +-} -- cgit v1.2.3