summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-12-24 11:40:37 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-12-24 11:40:37 +0100
commit6a99b474a40e139e3b916ed703f2d105df7f8dd6 (patch)
tree3c5021bd0157501679b3f0bcd06c07cecaaec484 /src/Plugins/Monitors.hs
parentdaa7eda838701949997934fd7925422b572db243 (diff)
parentb0624e2f8b9dbc5f6614de1b5d937b279605bd39 (diff)
downloadxmobar-6a99b474a40e139e3b916ed703f2d105df7f8dd6.tar.gz
xmobar-6a99b474a40e139e3b916ed703f2d105df7f8dd6.tar.bz2
Merge branch 'master' of https://github.com/lomereiter/xmobar into mpris
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