Copyright | (c) Andrea Rossato |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Jose A. Ortega Ruiz <jao@gnu.org> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell98 |
Xmobar.Plugins.Monitors.Weather
Description
A weather monitor for Xmobar
Synopsis
- data WeatherOpts = WeatherOpts {}
- defaultOpts :: WeatherOpts
- options :: [OptDescr (WeatherOpts -> WeatherOpts)]
- weatherConfig :: IO MConfig
- data WindInfo = WindInfo {}
- data WeatherInfo = WI {}
- pTime :: Parser (String, String, String, String)
- noWind :: WindInfo
- pWind :: Parser WindInfo
- pTemp :: Parser (Int, Int)
- pRh :: Parser Int
- pPressure :: Parser Int
- parseData :: Parser [WeatherInfo]
- defUrl :: String
- stationUrl :: String -> String
- getData :: Maybe Manager -> String -> IO String
- formatSk :: Eq p => [(p, p)] -> p -> p
- formatWeather :: WeatherOpts -> [(String, String)] -> [WeatherInfo] -> Monitor String
- showWeather :: String -> String -> String
- startWeather' :: [(String, String)] -> String -> [String] -> Int -> (String -> IO ()) -> IO ()
- startWeather :: String -> [String] -> Int -> (String -> IO ()) -> IO ()
- runWeather :: [(String, String)] -> Maybe Manager -> WeatherOpts -> [String] -> Monitor String
- weatherReady :: [String] -> Monitor Bool
- tryMakeManager :: WeatherOpts -> IO (Maybe Manager)
- mkManager :: IO Manager
Documentation
data WeatherOpts Source #
Options the user may specify.
Constructors
WeatherOpts | |
Fields
|
defaultOpts :: WeatherOpts Source #
Default values for options.
options :: [OptDescr (WeatherOpts -> WeatherOpts)] Source #
Apply options.
weatherConfig :: IO MConfig Source #
Constructors
WindInfo | |
data WeatherInfo Source #
Constructors
WI | |
Instances
Show WeatherInfo Source # | |
Defined in Xmobar.Plugins.Monitors.Weather Methods showsPrec :: Int -> WeatherInfo -> ShowS # show :: WeatherInfo -> String # showList :: [WeatherInfo] -> ShowS # |
parseData :: Parser [WeatherInfo] Source #
stationUrl :: String -> String Source #
getData :: Maybe Manager -> String -> IO String Source #
Get the decoded weather data from the given station.
Arguments
:: WeatherOpts | Formatting options from the cfg file |
-> [(String, String)] |
|
-> [WeatherInfo] | The actual weather info |
-> Monitor String |
showWeather :: String -> String -> String Source #
Show the weather
field with a default string in case it was empty.
Arguments
:: [(String, String)] |
|
-> String | Weather station |
-> [String] | User supplied arguments |
-> Int | Update rate |
-> (String -> IO ()) | |
-> IO () |
Start a weather monitor, create a new 'Maybe Manager', should the user have chosen to use one.
startWeather :: String -> [String] -> Int -> (String -> IO ()) -> IO () Source #
Same as startWeather'
, only for Weather
instead of WeatherX
, meaning
no SkyConditionS
.
Arguments
:: [(String, String)] |
|
-> Maybe Manager | Whether to use a |
-> WeatherOpts | Weather specific options |
-> [String] | User supplied arguments |
-> Monitor String |
Run a weather monitor.
weatherReady :: [String] -> Monitor Bool Source #
tryMakeManager :: WeatherOpts -> IO (Maybe Manager) Source #