diff options
author | Daniel Schüssler <933504+DanielSchuessler@users.noreply.github.com> | 2018-08-26 17:29:43 +0200 |
---|---|---|
committer | Daniel Schüssler <933504+DanielSchuessler@users.noreply.github.com> | 2018-10-06 19:53:10 +0200 |
commit | 31fa44e9aa4ba4d3db8688d785b766fd5e7cf8f1 (patch) | |
tree | 66c08503533c347b1917655bbd65911e4dff2616 /src/Plugins/Monitors.hs | |
parent | 9050163edf67f2f510c47a482b9c156f94e89275 (diff) | |
download | xmobar-31fa44e9aa4ba4d3db8688d785b766fd5e7cf8f1.tar.gz xmobar-31fa44e9aa4ba4d3db8688d785b766fd5e7cf8f1.tar.bz2 |
Turn the --monitor option to `Volume` into a new plugin `Alsa` instead
See #360.
Diffstat (limited to 'src/Plugins/Monitors.hs')
-rw-r--r-- | src/Plugins/Monitors.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Plugins/Monitors.hs b/src/Plugins/Monitors.hs index 2fe7cc2..08fd098 100644 --- a/src/Plugins/Monitors.hs +++ b/src/Plugins/Monitors.hs @@ -50,6 +50,7 @@ import Plugins.Monitors.Common (runMBD) #endif #ifdef ALSA import Plugins.Monitors.Volume +import Plugins.Monitors.Alsa #endif #ifdef MPRIS import Plugins.Monitors.Mpris @@ -90,6 +91,7 @@ data Monitors = Network Interface Args Rate #endif #ifdef ALSA | Volume String String Args Rate + | Alsa String String Args #endif #ifdef MPRIS | Mpris1 String Args Rate @@ -143,6 +145,7 @@ instance Exec Monitors where #endif #ifdef ALSA alias (Volume m c _ _) = m ++ ":" ++ c + alias (Alsa m c _) = "alsa:" ++ m ++ ":" ++ c #endif #ifdef MPRIS alias (Mpris1 _ _ _) = "mpris1" @@ -183,7 +186,8 @@ instance Exec Monitors where start (AutoMPD a) = runMBD a mpdConfig runMPD mpdWait mpdReady #endif #ifdef ALSA - start (Volume m c a r) = startVolume m c a r + start (Volume m c a r) = runM a volumeConfig (runVolume m c) r + start (Alsa m c a) = startAlsaPlugin m c a #endif #ifdef MPRIS start (Mpris1 s a r) = runM a mprisConfig (runMPRIS1 s) r |