#!/bin/sh # Show mpd queue in notification. 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"