aboutsummaryrefslogtreecommitdiff
path: root/cmus-status
blob: 0afbc4767446c9ce9b35926f8963392ae21c5ba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# :set status_display_program=cmus-status
# copy this program to one of the $PATH
file="/tmp/cmus-status"
printf "" > $file # refresh
[ $# = 2 ] &&\
	printf "󰓛" > $file &&\
	exit 0
if [ "$2" = "playing" ];
then s="󰐊";
else s="";
fi
artist="${6}"
album="${10}"
num="${14}."
title="${16}"
format="$s $artist - $num $title"
notify-send "🎵 Player" "$album\n$format" -t 3000
printf "%s" "$format" >> $file