diff options
author | jao <jao@gnu.org> | 2025-06-04 04:27:25 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2025-06-04 04:27:56 +0100 |
commit | 404073416c5f97ab8b82aa436b4f862d349c0dad (patch) | |
tree | b2dde616b7af66384161dc518eeec0eb544dabb4 /src | |
parent | bdc06e23672f9fc4a99261a0a6bba400ef7358b3 (diff) | |
download | xmobar-404073416c5f97ab8b82aa436b4f862d349c0dad.tar.gz xmobar-404073416c5f97ab8b82aa436b4f862d349c0dad.tar.bz2 |
MPD compilable again by default with all_extensions
Diffstat (limited to 'src')
-rw-r--r-- | src/Xmobar/Plugins/Monitors/MPD.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Xmobar/Plugins/Monitors/MPD.hs b/src/Xmobar/Plugins/Monitors/MPD.hs index 7ecbc0c..b091147 100644 --- a/src/Xmobar/Plugins/Monitors/MPD.hs +++ b/src/Xmobar/Plugins/Monitors/MPD.hs @@ -109,8 +109,9 @@ parseMPD (Right st) song opts = do si = stateGlyph s opts vol = int2str $ fromMaybe 0 (M.stVolume st) (p, t) = fromMaybe (0, 0) (M.stTime st) - [lap, len, remain] = map showTime - [floor p, floor t, max 0 (floor t - floor p)] + lap = showTime $ floor p + len = showTime $ floor t + remain = showTime $ max 0 (floor t - floor p) b = if t > 0 then realToFrac $ p / t else 0 plen = int2str $ M.stPlaylistLength st ppos = maybe "" (int2str . (+1)) $ M.stSongPos st |