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
30 elif [ "$action" = next ]; then
32 elif [ "$action" = pause ]; then
33 exec audacious --play-pause
34 elif [ "$action" = stop ]; then
39 echo "Cannot find an audioplayer" >&2