11 lines
239 B
Plaintext
Raw Normal View History

2020-06-01 08:52:55 +02:00
#!/bin/sh
# Show mpd queue in notification.
2020-06-01 14:04:47 +02:00
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"