From e3c9b33170f1064077aa8578342369657b9e059c Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Thu, 13 Jan 2011 10:34:09 -0600 Subject: Added volume monitor based on alsa-mixer. --- src/Plugins/Monitors.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Plugins/Monitors.hs') 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 @@ -60,6 +63,9 @@ data Monitors = Weather Station Args Rate #endif #ifdef LIBMPD | MPD Args Rate +#endif +#ifdef ALSA + | Volume String String Args Rate #endif deriving (Show,Read,Eq) @@ -94,6 +100,9 @@ instance Exec Monitors where #endif #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 @@ -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 -- cgit v1.2.3