Skip to content

Instantly share code, notes, and snippets.

@honzajavorek
Created November 4, 2013 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save honzajavorek/7299292 to your computer and use it in GitHub Desktop.
Save honzajavorek/7299292 to your computer and use it in GitHub Desktop.
moc player - play/pause
#!/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