#!/bin/sh # :set status_display_program=cmus-status file="/tmp/cmus-status" printf "" > $file # refresh [ $# = 2 ] &&\ printf '󰓛' > $file &&\ exit 0 if [ "$2" = "playing" ]; then icon="󰐊"; else icon=""; fi artist="${6}" album="${10}" num="${14}" title="${16}" format="${icon} ${artist} - ${album} - ${num}. ${title}" notify-send "🎵 Player" "$album\n$format" -t 3000 printf "%s %10s - %10s - %s. %40s"\ "${icon}" "${artist}" "${album}"\ "${num}" "${title}" printf "%s" "$format" >> $file