diff options
author | Roman Joost <roman@bromeco.de> | 2015-03-13 11:11:11 +1000 |
---|---|---|
committer | Roman Joost <roman@bromeco.de> | 2015-05-01 11:31:17 +1000 |
commit | 1c3d0e5ab315d5e6e52eb044da2b088df8acfcb2 (patch) | |
tree | 1f2c117fad384717f4f970938d7625ee1d3724e2 /src/Plugins/Monitors.hs | |
parent | d4634e681a123d57a76312b1b65f44172e44266c (diff) | |
download | xmobar-1c3d0e5ab315d5e6e52eb044da2b088df8acfcb2.tar.gz xmobar-1c3d0e5ab315d5e6e52eb044da2b088df8acfcb2.tar.bz2 |
uvmeter: new plugin showing UV data (Australia)
This patch adds a new optional plugin showing UV data for Australian
users. The data is aquired by simple HTTP request from the Australian
Radiation Protection and Nuclear Safety Agencies XML data feed.
The uvmeter plugin can be configured ovserving multiple different
station across the country. The alias now defaults to 'uv <stationid>'.
Diffstat (limited to 'src/Plugins/Monitors.hs')
-rw-r--r-- | src/Plugins/Monitors.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Plugins/Monitors.hs b/src/Plugins/Monitors.hs index bee3c06..84eceb2 100644 --- a/src/Plugins/Monitors.hs +++ b/src/Plugins/Monitors.hs @@ -36,6 +36,9 @@ import Plugins.Monitors.Disk import Plugins.Monitors.Top import Plugins.Monitors.Uptime import Plugins.Monitors.CatInt +#ifdef UVMETER +import Plugins.Monitors.UVMeter +#endif #ifdef IWLIB import Plugins.Monitors.Wireless #endif @@ -71,6 +74,9 @@ data Monitors = Weather Station Args Rate | TopMem Args Rate | Uptime Args Rate | CatInt Int FilePath Args Rate +#ifdef UVMETER + | UVMeter Station Args Rate +#endif #ifdef IWLIB | Wireless Interface Args Rate #endif @@ -119,6 +125,9 @@ instance Exec Monitors where alias (DiskIO {}) = "diskio" alias (Uptime _ _) = "uptime" alias (CatInt n _ _ _) = "cat" ++ show n +#ifdef UVMETER + alias (UVMeter s _ _) = "uv " ++ s +#endif #ifdef IWLIB alias (Wireless i _ _) = i ++ "wi" #endif @@ -155,6 +164,9 @@ instance Exec Monitors where start (DiskIO s a r) = startDiskIO s a r start (Uptime a r) = runM a uptimeConfig runUptime r start (CatInt _ s a r) = runM a catIntConfig (runCatInt s) r +#ifdef UVMETER + start (UVMeter s a r) = runM (a ++ [s]) uvConfig runUVMeter r +#endif #ifdef IWLIB start (Wireless i a r) = runM a wirelessConfig (runWireless i) r #endif |