summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/Monitors.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2019-06-29 23:16:49 +0100
committerjao <jao@gnu.org>2019-06-29 23:16:49 +0100
commita160cc25ba27b17e798f9d0eadd2c9576473ae9a (patch)
tree3ff90d9fea66ce3ec32d86495b40eaa1e0894141 /src/Xmobar/Plugins/Monitors.hs
parent7aeb01c7dc010bd621d22bf342c599b4df9a1392 (diff)
downloadxmobar-a160cc25ba27b17e798f9d0eadd2c9576473ae9a.tar.gz
xmobar-a160cc25ba27b17e798f9d0eadd2c9576473ae9a.tar.bz2
New WeatherX variant with sky conditions translations
Diffstat (limited to 'src/Xmobar/Plugins/Monitors.hs')
-rw-r--r--src/Xmobar/Plugins/Monitors.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Xmobar/Plugins/Monitors.hs b/src/Xmobar/Plugins/Monitors.hs
index 3e7584f..8ce5300 100644
--- a/src/Xmobar/Plugins/Monitors.hs
+++ b/src/Xmobar/Plugins/Monitors.hs
@@ -3,7 +3,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Xmobar.Plugins.Monitors
--- Copyright : (c) 2010, 2011, 2012, 2013, 2017, 2018 Jose Antonio Ortega Ruiz
+-- Copyright : (c) 2010, 2011, 2012, 2013, 2017, 2018, 2019 Jose Antonio Ortega Ruiz
-- (c) 2007-10 Andrea Rossato
-- License : BSD-style (see LICENSE)
--
@@ -78,6 +78,7 @@ data Monitors = Network Interface Args Rate
| CatInt Int FilePath Args Rate
#ifdef WEATHER
| Weather Station Args Rate
+ | WeatherX Station SkyConditions Args Rate
#endif
#ifdef UVMETER
| UVMeter Station Args Rate
@@ -103,6 +104,7 @@ type Args = [String]
type Program = String
type Alias = String
type Station = String
+type SkyConditions = [(String, String)]
type Zone = String
type ZoneNo = Int
type Interface = String
@@ -112,6 +114,7 @@ type DiskSpec = [(String, String)]
instance Exec Monitors where
#ifdef WEATHER
alias (Weather s _ _) = s
+ alias (WeatherX s _ _ _) = s
#endif
alias (Network i _ _) = i
alias (DynNetwork _ _) = "dynnetwork"
@@ -159,6 +162,7 @@ instance Exec Monitors where
start (TopMem a r) = runM a topMemConfig runTopMem r
#ifdef WEATHER
start (Weather s a r) = runMD (a ++ [s]) weatherConfig runWeather r weatherReady
+ start (WeatherX s c a r) = runMD (a ++ [s]) weatherConfig (runWeather' c) r weatherReady
#endif
start (Thermal z a r) = runM (a ++ [z]) thermalConfig runThermal r
start (ThermalZone z a r) =