summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--readme.md2
-rw-r--r--src/Plugins/Monitors/MPD.hs7
2 files changed, 5 insertions, 4 deletions
diff --git a/readme.md b/readme.md
index c532529..11c2c05 100644
--- a/readme.md
+++ b/readme.md
@@ -967,7 +967,7 @@ more than one battery.
The environment variables `MPD_HOST` and `MPD_PORT` are used to configure the
mpd server to communicate with.
- Variables that can be used with the `-t`/`--template` argument:
- `bar`, `state`, `statei`, `volume`, `length`,
+ `bar`, `vbar`, `state`, `statei`, `volume`, `length`,
`lapsed`, `remaining`,
`plength` (playlist length), `ppos` (playlist position),
`name`, `artist`, `composer`, `performer`,
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