1 2 3 4 5 6 7 8
#!/bin/sh STATUS=$(cmus-remote -Q | grep status | awk '{print $2}') if [ "$STATUS" = paused ];then cmus-remote -p elif [ $STATUS = playing ];then cmus-remote -u fi