summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2015-05-04 14:31:55 +0200
committerjao <jao@gnu.org>2015-05-04 14:31:55 +0200
commit557f2de66a20e5364adad9bbdd3cd5944766233f (patch)
tree1f2c117fad384717f4f970938d7625ee1d3724e2 /src/Plugins/Monitors.hs
parentda17f6c3aa5be180110d59ac250dd41b91809ad6 (diff)
parent1c3d0e5ab315d5e6e52eb044da2b088df8acfcb2 (diff)
downloadxmobar-557f2de66a20e5364adad9bbdd3cd5944766233f.tar.gz
xmobar-557f2de66a20e5364adad9bbdd3cd5944766233f.tar.bz2
Merge branch 'master' of https://github.com/romanofski/xmobar
Diffstat (limited to 'src/Plugins/Monitors.hs')
-rw-r--r--src/Plugins/Monitors.hs12
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