diff options
author | Jose A Ortega Ruiz <jao@gnu.org> | 2010-03-30 21:31:29 +0200 |
---|---|---|
committer | Jose A Ortega Ruiz <jao@gnu.org> | 2010-03-30 21:31:29 +0200 |
commit | f416907a72738adbbf5bd877e1fa9d91826de6ac (patch) | |
tree | eaff726648da1d90c656a46f50a38f7e7f335269 /Plugins/Monitors.hs | |
parent | 31109fc21a7a93875471f251c8aea201b3df4926 (diff) | |
download | xmobar-f416907a72738adbbf5bd877e1fa9d91826de6ac.tar.gz xmobar-f416907a72738adbbf5bd877e1fa9d91826de6ac.tar.bz2 |
New (and optional) MPD monitor.
Ignore-this: 405d2dcf63efe90ea243df1c99db8ead
darcs-hash:20100330193129-748be-5af6dc8af59ccaf3b71a250b02c76900716008dc.gz
Diffstat (limited to 'Plugins/Monitors.hs')
-rw-r--r-- | Plugins/Monitors.hs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Plugins/Monitors.hs b/Plugins/Monitors.hs index 158a990..dd01ce3 100644 --- a/Plugins/Monitors.hs +++ b/Plugins/Monitors.hs @@ -34,6 +34,9 @@ import Plugins.Monitors.Top #ifdef IWLIB import Plugins.Monitors.Wireless #endif +#ifdef LIBMPD +import Plugins.Monitors.MPD +#endif data Monitors = Weather Station Args Rate | Network Interface Args Rate @@ -53,6 +56,9 @@ data Monitors = Weather Station Args Rate #ifdef IWLIB | Wireless Interface Args Rate #endif +#ifdef LIBMPD + | MPD Args Rate +#endif deriving (Show,Read,Eq) type Args = [String] @@ -82,7 +88,9 @@ instance Exec Monitors where alias (DiskIO _ _ _) = "diskio" #ifdef IWLIB alias (Wireless i _ _) = i ++ "wi" - start (Wireless i a r) = runM (a ++ [i]) wirelessConfig runWireless r +#endif +#ifdef LIBMPD + alias (MPD _ _) = "mpd" #endif start (Weather s a r) = runM (a ++ [s]) weatherConfig runWeather r start (Network i a r) = runM (a ++ [i]) netConfig runNet r @@ -99,3 +107,9 @@ instance Exec Monitors where start (DiskIO s a r) = runM a diskIOConfig (runDiskIO s) r start (TopMem a r) = runM a topMemConfig runTopMem r start (TopProc a r) = startTop a r +#ifdef IWLIB + start (Wireless i a r) = runM (a ++ [i]) wirelessConfig runWireless r +#endif +#ifdef LIBMPD + start (MPD a r) = runM a mpdConfig runMPD r +#endif |