summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-15 00:04:07 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-15 00:04:07 +0100
commitd1675af6f9749e12113d6bf957f920682e7fd91d (patch)
tree4c71d49ebb1c0260d6b127475a35622e1f3c9f66 /src/Plugins/Monitors.hs
parent3c9b2b38bd216e2d308f3b00cf7baee52266b1be (diff)
parentce23b849f7aff963a1e6a84da5281b6a4aaff241 (diff)
downloadxmobar-d1675af6f9749e12113d6bf957f920682e7fd91d.tar.gz
xmobar-d1675af6f9749e12113d6bf957f920682e7fd91d.tar.bz2
Merge branch 'ttuegel-master'
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 9887d74..14d97a2 100644
--- a/src/Plugins/Monitors.hs
+++ b/src/Plugins/Monitors.hs
@@ -38,6 +38,9 @@ import Plugins.Monitors.Wireless
#ifdef LIBMPD
import Plugins.Monitors.MPD
#endif
+#ifdef ALSA
+import Plugins.Monitors.Volume
+#endif
data Monitors = Weather Station Args Rate
| Network Interface Args Rate
@@ -61,6 +64,9 @@ data Monitors = Weather Station Args Rate
#ifdef LIBMPD
| MPD Args Rate
#endif
+#ifdef ALSA
+ | Volume String String Args Rate
+#endif
deriving (Show,Read,Eq)
type Args = [String]
@@ -95,6 +101,9 @@ instance Exec Monitors where
#ifdef LIBMPD
alias (MPD _ _) = "mpd"
#endif
+#ifdef ALSA
+ alias (Volume m c _ _) = m ++ ":" ++ c
+#endif
start (Weather s a r) = runM (a ++ [s]) weatherConfig runWeather r
start (Network i a r) = runM (a ++ [i]) netConfig runNet r
start (Thermal z a r) = runM (a ++ [z]) thermalConfig runThermal r
@@ -117,3 +126,6 @@ instance Exec Monitors where
#ifdef LIBMPD
start (MPD a r) = runM a mpdConfig runMPD r
#endif
+#ifdef ALSA
+ start (Volume m c a r) = runM a volumeConfig (runVolume m c) r
+#endif