diff --git a/.i3blocks/mpd b/.i3blocks/mpd index fea39dd..9087be4 100755 --- a/.i3blocks/mpd +++ b/.i3blocks/mpd @@ -167,7 +167,8 @@ do declare -i time_elapsed time_total time_left - time_total="${o["Time"]:--1}" + time_total="${o["time"]#*:}" + [[ "$time_total" -eq 0 ]] && time_total="${o["Time"]}" [[ "$time_total" -eq 0 ]] && time_total=-1 if [[ "${o["state"]}" == "stop" ]] then