Last active
October 20, 2017 08:52
-
-
Save villamide/1900c67dfeb8a250e2b8499a27136d46 to your computer and use it in GitHub Desktop.
Spotify Script - Launch instance or 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 | |
# If spotify is started play/pause music, | |
# else starts spotify | |
if [ $(pidof -s spotify) > /dev/null ]; then | |
playerctl play-pause | |
else | |
spotify | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment