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