summaryrefslogtreecommitdiffhomepage
path: root/Monitors/Weather.hs
diff options
context:
space:
mode:
authorKrzysztof Kosciuszkiewicz <k.kosciuszkiewicz@gmail.com>2007-07-10 16:08:45 +0200
committerKrzysztof Kosciuszkiewicz <k.kosciuszkiewicz@gmail.com>2007-07-10 16:08:45 +0200
commit528556a36d5ff686689568c61422143276b0dc96 (patch)
tree80d00a09a14146373d20759961bca381771af580 /Monitors/Weather.hs
parent8453821a99a4a211b2c489f1a90fa1ecea8a690d (diff)
downloadxmobar-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/Weather.hs')
-rw-r--r--Monitors/Weather.hs50
1 files changed, 21 insertions, 29 deletions
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 "<station>: <tempC>C, rh <rh>% (<hour>)"
- 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
+ "<station>: <tempC>C, rh <rh>% (<hour>)" -- 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
+-}