summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors
diff options
context:
space:
mode:
authorEric Mrak <mail@ericmrak.info>2014-03-15 19:51:54 -0700
committerEric Mrak <mail@ericmrak.info>2014-03-15 19:51:54 -0700
commitd933e0adcca6d065836c91607f29c22941fd81f1 (patch)
tree9c7c511509aaa45cd16f7bd0624f1b4187d67302 /src/Plugins/Monitors
parent2a43aae25b980bf08fd0b50c9517f9f72eb94f93 (diff)
downloadxmobar-d933e0adcca6d065836c91607f29c22941fd81f1.tar.gz
xmobar-d933e0adcca6d065836c91607f29c22941fd81f1.tar.bz2
MPD monitor has vbar for track progress
Diffstat (limited to 'src/Plugins/Monitors')
-rw-r--r--src/Plugins/Monitors/MPD.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/MPD.hs b/src/Plugins/Monitors/MPD.hs
index 1104608..ac976f2 100644
--- a/src/Plugins/Monitors/MPD.hs
+++ b/src/Plugins/Monitors/MPD.hs
@@ -22,7 +22,7 @@ import Control.Concurrent (threadDelay)
mpdConfig :: IO MConfig
mpdConfig = mkMConfig "MPD: <state>"
- [ "bar", "state", "statei", "volume", "length"
+ [ "bar", "vbar", "state", "statei", "volume", "length"
, "lapsed", "remaining", "plength", "ppos", "file"
, "name", "artist", "composer", "performer"
, "album", "title", "track", "genre"
@@ -82,11 +82,12 @@ mopts argv =
parseMPD :: M.Response M.Status -> M.Response (Maybe M.Song) -> MOpts
-> Monitor [String]
-parseMPD (Left e) _ _ = return $ show e:replicate 18 ""
+parseMPD (Left e) _ _ = return $ show e:replicate 19 ""
parseMPD (Right st) song opts = do
songData <- parseSong song
bar <- showPercentBar (100 * b) b
- return $ [bar, ss, si, vol, len, lap, remain, plen, ppos] ++ songData
+ vbar <- showVerticalBar (100 * b) b
+ return $ [bar, vbar, ss, si, vol, len, lap, remain, plen, ppos] ++ songData
where s = M.stState st
ss = show s
si = stateGlyph s opts