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/Weather.hs | 50 +++++++++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 29 deletions(-) (limited to 'Monitors/Weather.hs') diff --git a/Monitors/Weather.hs b/Monitors/Weather.hs index 63eb48e..885a9e2 100644 --- a/Monitors/Weather.hs +++ b/Monitors/Weather.hs @@ -16,8 +16,6 @@ module Monitors.Weather where import Monitors.Common -import Data.IORef - import System.Process import System.Exit import System.IO @@ -26,32 +24,26 @@ import Text.ParserCombinators.Parsec weatherConfig :: IO MConfig -weatherConfig = - do lc <- newIORef "#BFBFBF" - l <- newIORef 15 - nc <- newIORef "#00FF00" - h <- newIORef 27 - hc <- newIORef "#FF0000" - t <- newIORef ": C, rh % ()" - p <- newIORef package - u <- newIORef "station ID" - a <- newIORef [] - e <- newIORef ["station" - , "stationState" - , "year" - , "month" - , "day" - , "hour" - , "wind" - , "visibility" - , "skyCondition" - , "tempC" - , "tempF" - , "dewPoint" - , "rh" - ,"pressure" - ] - return $ MC nc l lc h hc t p u a e +weatherConfig = newConfig + ": C, rh % ()" -- template + package -- package + "station ID" -- usage tail? + [] -- added args + ["station" -- available replacements + , "stationState" + , "year" + , "month" + , "day" + , "hour" + , "wind" + , "visibility" + , "skyCondition" + , "tempC" + , "tempF" + , "dewPoint" + , "rh" + ,"pressure" + ] data WeatherInfo = WI { stationPlace :: String @@ -149,4 +141,4 @@ main :: IO () main = do let af = return "No station ID specified" runMonitor weatherConfig af runWeather --} \ No newline at end of file +-} -- cgit v1.2.3