From a160cc25ba27b17e798f9d0eadd2c9576473ae9a Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 29 Jun 2019 23:16:49 +0100 Subject: New WeatherX variant with sky conditions translations --- src/Xmobar/Plugins/Monitors.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Xmobar/Plugins/Monitors.hs') 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) = -- cgit v1.2.3