summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJohn Tyree <jtyree@google.com>2019-10-09 17:39:19 -0700
committerjao <jao@gnu.org>2019-10-10 02:31:08 +0100
commitd3b0a9951d509967ce6bdd7580e1cd083fdb6035 (patch)
treeff43b4489db38fdaa3d40532d52a5b7b8ec309f1 /src
parent76eb5497f82329d4d3907f5bd94c09d504bc9bd2 (diff)
downloadxmobar-d3b0a9951d509967ce6bdd7580e1cd083fdb6035.tar.gz
xmobar-d3b0a9951d509967ce6bdd7580e1cd083fdb6035.tar.bz2
Fix type errors in MPD plugin
Diffstat (limited to 'src')
-rw-r--r--src/Xmobar/Plugins/Monitors/MPD.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Xmobar/Plugins/Monitors/MPD.hs b/src/Xmobar/Plugins/Monitors/MPD.hs
index 9525254..b6d154a 100644
--- a/src/Xmobar/Plugins/Monitors/MPD.hs
+++ b/src/Xmobar/Plugins/Monitors/MPD.hs
@@ -99,13 +99,13 @@ 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, t, max 0 (t - floor p)]
- b = if t > 0 then realToFrac $ p / fromIntegral t else 0
+ [lap, len, remain] = map showTime [floor p, floor t, 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
flags = playbackMode st
-stateGlyph :: M.State -> MOpts -> String
+stateGlyph :: M.PlaybackState -> MOpts -> String
stateGlyph s o =
case s of
M.Playing -> mPlaying o