diff options
author | Jose A Ortega Ruiz <jao@gnu.org> | 2010-03-31 01:46:36 +0200 |
---|---|---|
committer | Jose A Ortega Ruiz <jao@gnu.org> | 2010-03-31 01:46:36 +0200 |
commit | 316f2be0a518a21deabf26a742f0e494dddea17b (patch) | |
tree | 37d3a8910954570f3d55060741b71b2b80ca92ee /Plugins/Monitors | |
parent | f416907a72738adbbf5bd877e1fa9d91826de6ac (diff) | |
download | xmobar-316f2be0a518a21deabf26a742f0e494dddea17b.tar.gz xmobar-316f2be0a518a21deabf26a742f0e494dddea17b.tar.bz2 |
More options for the MBox plugin.
Ignore-this: d3996ea695c38897088bc2c0851ce992
darcs-hash:20100330234636-748be-61ec1cb7775fd30a6cc4db6d30ffe4c03ed04456.gz
Diffstat (limited to 'Plugins/Monitors')
-rw-r--r-- | Plugins/Monitors/MPD.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Plugins/Monitors/MPD.hs b/Plugins/Monitors/MPD.hs index 410662d..72b73d6 100644 --- a/Plugins/Monitors/MPD.hs +++ b/Plugins/Monitors/MPD.hs @@ -33,9 +33,9 @@ defaultOpts = MOpts { mPlaying = ">>", mStopped = "><", mPaused = "||" } options :: [OptDescr (MOpts -> MOpts)] options = - [ Option ['P'] ["playing"] (ReqArg (\x o -> o { mPlaying = x }) "") "" - , Option ['S'] ["stopped"] (ReqArg (\x o -> o { mStopped = x }) "") "" - , Option ['Z'] ["paused"] (ReqArg (\x o -> o { mPaused = x }) "") "" + [ Option "P" ["playing"] (ReqArg (\x o -> o { mPlaying = x }) "") "" + , Option "S" ["stopped"] (ReqArg (\x o -> o { mStopped = x }) "") "" + , Option "Z" ["paused"] (ReqArg (\x o -> o { mPaused = x }) "") "" ] runMPD :: [String] -> Monitor String @@ -53,7 +53,7 @@ mopts argv = (o, _, []) -> return $ foldr id defaultOpts o (_, _, errs) -> ioError . userError $ concat errs -parseMPD :: (M.Response M.Status) -> (M.Response (Maybe M.Song)) -> MOpts +parseMPD :: M.Response M.Status -> M.Response (Maybe M.Song) -> MOpts -> (Float, [String]) parseMPD (Left e) _ _ = (0, show e:repeat "") parseMPD (Right st) song opts = (b, [ss, si, vol, len, lap, plen] ++ sf) @@ -74,7 +74,7 @@ stateGlyph s o = M.Paused -> mPaused o M.Stopped -> mStopped o -parseSong :: (M.Response (Maybe M.Song)) -> [String] +parseSong :: M.Response (Maybe M.Song) -> [String] parseSong (Left _) = repeat "" parseSong (Right Nothing) = repeat "" parseSong (Right (Just s)) = |