blob: 9d7c4a437e8b58c1421acbd2dad59e654c5a1d5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/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
|