5 if pgrep smplayer >/dev/null; then
6 if [ "$action" = prev ]; then
7 exec smplayer -send-action play_prev
8 elif [ "$action" = next ]; then
9 exec smplayer -send-action play_next
10 elif [ "$action" = pause ]; then
11 exec smplayer -send-action play_or_pause
12 elif [ "$action" = stop ]; then
13 exec smplayer -send-action stop
16 elif pgrep deadbeef >/dev/null; then
17 if [ "$action" = prev ]; then
19 elif [ "$action" = next ]; then
21 elif [ "$action" = pause ]; then
22 exec deadbeef --play-pause
23 elif [ "$action" = stop ]; then
27 elif pgrep audacious >/dev/null; then
28 if [ "$action" = prev ]; then
29 exec audtool --playlist-reverse
30 elif [ "$action" = next ]; then
31 exec audtool --playlist-advance
32 elif [ "$action" = pause ]; then
33 exec audtool --playback-playpause
34 elif [ "$action" = stop ]; then
35 exec audtool --playback-stop
36 elif [ "$action" = stop-after ]; then
37 exec audtool --playlist-stop-after-toggle
41 echo "Cannot find an audioplayer" >&2