Created
November 4, 2013 07:38
-
-
Save honzajavorek/7299292 to your computer and use it in GitHub Desktop.
moc player - play/pause
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
STATUS=`mocp -i | grep State: | head -1 | sed "s/: /\n/" | tail -1` | |
if [ "$STATUS" = "PLAY" ] | |
then | |
mocp -P | |
fi | |
if [ "$STATUS" = "PAUSE" ] | |
then | |
mocp -U | |
fi | |
if [ "$STATUS" = "STOP" ] | |
then | |
mocp -p | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment