Adjust trunctation charlimit
This commit is contained in:
parent
bb34217d59
commit
c8f59969c9
|
@ -15,10 +15,10 @@ icon=""
|
||||||
pausedIcon=""
|
pausedIcon=""
|
||||||
if status="$(playerctl "$@" status 2>&1)" && [ "$status" != "Stopped" ]; then
|
if status="$(playerctl "$@" status 2>&1)" && [ "$status" != "Stopped" ]; then
|
||||||
[ "$status" = "Paused" ] && icon="$pausedIcon"
|
[ "$status" = "Paused" ] && icon="$pausedIcon"
|
||||||
currentSong="$(playerctl "$@" metadata --format "{{title}}" | sed 's/\(.\{22\}\).*/\1.../')"
|
currentSong="$(playerctl "$@" metadata --format "{{title}}" | sed 's/\(.\{30\}\).*/\1.../')"
|
||||||
else
|
else
|
||||||
[ "$(mpc status "%state%")" = "paused" ] && icon="$pausedIcon"
|
[ "$(mpc status "%state%")" = "paused" ] && icon="$pausedIcon"
|
||||||
currentSong="$(mpc current -f "%title%" | sed 's/\(.\{22\}\).*/\1.../')"
|
currentSong="$(mpc current -f "%title%" | sed 's/\(.\{30\}\).*/\1.../')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$currentSong" ] && exit
|
[ -z "$currentSong" ] && exit
|
||||||
|
|
Loading…
Reference in a new issue