summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugins/Monitors.hs')
-rw-r--r--src/Plugins/Monitors.hs22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/Plugins/Monitors.hs b/src/Plugins/Monitors.hs
index 9421170..bee3c06 100644
--- a/src/Plugins/Monitors.hs
+++ b/src/Plugins/Monitors.hs
@@ -19,7 +19,7 @@ module Plugins.Monitors where
import Plugins
-import Plugins.Monitors.Common (runM)
+import Plugins.Monitors.Common (runM, runMD)
import Plugins.Monitors.Weather
import Plugins.Monitors.Net
import Plugins.Monitors.Mem
@@ -35,12 +35,13 @@ import Plugins.Monitors.CoreTemp
import Plugins.Monitors.Disk
import Plugins.Monitors.Top
import Plugins.Monitors.Uptime
+import Plugins.Monitors.CatInt
#ifdef IWLIB
import Plugins.Monitors.Wireless
#endif
#ifdef LIBMPD
import Plugins.Monitors.MPD
-import Plugins.Monitors.Common (runMB)
+import Plugins.Monitors.Common (runMBD)
#endif
#ifdef ALSA
import Plugins.Monitors.Volume
@@ -69,6 +70,7 @@ data Monitors = Weather Station Args Rate
| TopProc Args Rate
| TopMem Args Rate
| Uptime Args Rate
+ | CatInt Int FilePath Args Rate
#ifdef IWLIB
| Wireless Interface Args Rate
#endif
@@ -106,16 +108,17 @@ instance Exec Monitors where
alias (Cpu _ _) = "cpu"
alias (MultiCpu _ _) = "multicpu"
alias (Battery _ _) = "battery"
- alias (BatteryP _ _ _)= "battery"
+ alias (BatteryP {})= "battery"
alias (BatteryN _ _ _ a)= a
alias (Brightness _ _) = "bright"
alias (CpuFreq _ _) = "cpufreq"
alias (TopProc _ _) = "top"
alias (TopMem _ _) = "topmem"
alias (CoreTemp _ _) = "coretemp"
- alias (DiskU _ _ _) = "disku"
- alias (DiskIO _ _ _) = "diskio"
+ alias (DiskU {}) = "disku"
+ alias (DiskIO {}) = "diskio"
alias (Uptime _ _) = "uptime"
+ alias (CatInt n _ _ _) = "cat" ++ show n
#ifdef IWLIB
alias (Wireless i _ _) = i ++ "wi"
#endif
@@ -136,7 +139,7 @@ instance Exec Monitors where
start (MultiCpu a r) = startMultiCpu a r
start (TopProc a r) = startTop a r
start (TopMem a r) = runM a topMemConfig runTopMem r
- start (Weather s a r) = runM (a ++ [s]) weatherConfig runWeather r
+ start (Weather s a r) = runMD (a ++ [s]) weatherConfig runWeather r weatherReady
start (Thermal z a r) = runM (a ++ [z]) thermalConfig runThermal r
start (ThermalZone z a r) =
runM (a ++ [show z]) thermalZoneConfig runThermalZone r
@@ -151,12 +154,13 @@ instance Exec Monitors where
start (DiskU s a r) = runM a diskUConfig (runDiskU s) r
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 IWLIB
- start (Wireless i a r) = runM (a ++ [i]) wirelessConfig runWireless r
+ start (Wireless i a r) = runM a wirelessConfig (runWireless i) r
#endif
#ifdef LIBMPD
- start (MPD a r) = runM a mpdConfig runMPD r
- start (AutoMPD a) = runMB a mpdConfig runMPD mpdWait
+ start (MPD a r) = runMD a mpdConfig runMPD r mpdReady
+ start (AutoMPD a) = runMBD a mpdConfig runMPD mpdWait mpdReady
#endif
#ifdef ALSA
start (Volume m c a r) = runM a volumeConfig (runVolume m c) r