From 47f49f08195b2b39333ea667fd4587bebcec0816 Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Wed, 21 Dec 2011 18:37:19 +0400 Subject: MPRIS plugin --- src/Plugins/Monitors.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/Plugins/Monitors.hs') diff --git a/src/Plugins/Monitors.hs b/src/Plugins/Monitors.hs index 5e1cb62..9f17699 100644 --- a/src/Plugins/Monitors.hs +++ b/src/Plugins/Monitors.hs @@ -44,6 +44,9 @@ import Plugins.Monitors.MPD #ifdef ALSA import Plugins.Monitors.Volume #endif +#ifdef MPRIS +import Plugins.Monitors.Mpris +#endif data Monitors = Weather Station Args Rate | Network Interface Args Rate @@ -71,6 +74,10 @@ data Monitors = Weather Station Args Rate #endif #ifdef ALSA | Volume String String Args Rate +#endif +#ifdef MPRIS + | Mpris1 String Args Rate + | Mpris2 String Args Rate #endif deriving (Show,Read,Eq) @@ -111,6 +118,10 @@ instance Exec Monitors where #endif #ifdef ALSA alias (Volume m c _ _) = m ++ ":" ++ c +#endif +#ifdef MPRIS + alias (Mpris1 _ _ _) = "mpris1" + alias (Mpris2 _ _ _) = "mpris2" #endif start (Network i a r) = startNet i a r start (Cpu a r) = startCpu a r @@ -140,3 +151,7 @@ instance Exec Monitors where #ifdef ALSA start (Volume m c a r) = runM a volumeConfig (runVolume m c) r #endif +#ifdef MPRIS + start (Mpris1 s a r) = runM a mprisConfig (runMPRIS1 s) r + start (Mpris2 s a r) = runM a mprisConfig (runMPRIS2 s) r +#endif -- cgit v1.2.3