blob: e73edc6c357f8427085bbd171618a1fc4de5752d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/sh
# Toggles the cmus aaa mode (all,album,artist)
cmus-remote -C "toggle aaa_mode"
mode=$(cmus-remote -Q | grep "aaa_mode" | cut -d ' ' -f 3)
artist=$(cmus-remote -Q | grep "tag artist" | cut -d ' ' -f 3-)
album=$(cmus-remote -Q | grep "tag album" | cut -d ' ' -f 3-)
[ "$mode" = "all" ] && dunstctl close-all && notify-send "Playing from full library" \
&& exit
[ "$mode" = "artist" ] && dunstctl close-all && notify-send "Playing by artist: $artist" \
&& exit
[ "$mode" = "album" ] && dunstctl close-all && notify-send "Playing from album: $album" \
&& exit
|