summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors.hs
diff options
context:
space:
mode:
authorArtem Tarasov <lomereiter@gmail.com>2011-12-21 18:37:19 +0400
committerArtem Tarasov <lomereiter@gmail.com>2011-12-21 18:37:19 +0400
commit47f49f08195b2b39333ea667fd4587bebcec0816 (patch)
tree2ac7503abe26147014d41d5260e6790a8c150e22 /src/Plugins/Monitors.hs
parent849c5cfb7544cbbe56dfdc7d450172121e51dff5 (diff)
downloadxmobar-47f49f08195b2b39333ea667fd4587bebcec0816.tar.gz
xmobar-47f49f08195b2b39333ea667fd4587bebcec0816.tar.bz2
MPRIS plugin
Diffstat (limited to 'src/Plugins/Monitors.hs')
-rw-r--r--src/Plugins/Monitors.hs15
1 files changed, 15 insertions, 0 deletions
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
@@ -72,6 +75,10 @@ data Monitors = Weather Station Args Rate
#ifdef ALSA
| Volume String String Args Rate
#endif
+#ifdef MPRIS
+ | Mpris1 String Args Rate
+ | Mpris2 String Args Rate
+#endif
deriving (Show,Read,Eq)
type Args = [String]
@@ -112,6 +119,10 @@ instance Exec Monitors where
#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
start (MultiCpu a r) = startMultiCpu 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