Update mpdqueue script

This commit is contained in:
Wiktor Zykubek 2020-06-01 14:04:47 +02:00
parent c9fb43a443
commit c4b2e26509

View File

@ -2,4 +2,9 @@
# Show mpd queue in notification.
notify-send -u normal "MPD queue" "$(mpc queued)"
queue="$(mpc playlist)"
items="$(echo "$queue" | wc -l)"
[ "$items" -gt 5 ] && and="and $(( "$items" - 5)) other..."
notify-send -u normal "MPD queue" \
"$(echo "$queue" | head -n 5)\n$and"