1 2 3 4 5 6 7 8 9 10
#!/bin/sh # Starts cmus in a terminal window if it's not already running # If it is running, passes the command given to the script to cmus-remote if ! pgrep -x cmus; then st -e cmus else cmus-remote "$1" fi