diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2012-06-09 00:46:04 -0400 |
---|---|---|
committer | Ben Boeckel <mathstuf@gmail.com> | 2012-06-09 00:46:04 -0400 |
commit | 4d0d5880b8e151084e6dfb27cc6d51d68609b048 (patch) | |
tree | de2f4061d7c8a7d01d986c4d86a6e6d93196d97b /src/Plugins | |
parent | e513f7149000dfec4549d0d9f0a3add647e06c95 (diff) | |
download | xmobar-4d0d5880b8e151084e6dfb27cc6d51d68609b048.tar.gz xmobar-4d0d5880b8e151084e6dfb27cc6d51d68609b048.tar.bz2 |
Add a blocking call for MPD based on events
Diffstat (limited to 'src/Plugins')
-rw-r--r-- | src/Plugins/Monitors/MPD.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Plugins/Monitors/MPD.hs b/src/Plugins/Monitors/MPD.hs index cc40a56..cb3acdf 100644 --- a/src/Plugins/Monitors/MPD.hs +++ b/src/Plugins/Monitors/MPD.hs @@ -12,7 +12,7 @@ -- ----------------------------------------------------------------------------- -module Plugins.Monitors.MPD ( mpdConfig, runMPD ) where +module Plugins.Monitors.MPD ( mpdConfig, runMPD, mpdWait ) where import Plugins.Monitors.Common import System.Console.GetOpt @@ -55,6 +55,15 @@ runMPD args = do s <- parseMPD status song opts parseTemplate s +mpdWait :: IO () +mpdWait = M.withMPD idle >> return () + where +#if defined LIBMPD_07 + idle = M.idle +#else + idle = M.idle [M.PlayerS, M.MixerS] +#endif + mopts :: [String] -> IO MOpts mopts argv = case getOpt Permute options argv of |