Last active
January 4, 2016 10:29
-
-
Save brcooley/8609448 to your computer and use it in GitHub Desktop.
Easy bash script to play/pause Spotify web player on linux
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/sh | |
# | |
# A script to play/pause songs from the spotify web player | |
# You should pin the spotify tab, and modify the TAB_POS below | |
# (e.g. if Spotify is the 3rd tab, replace TAB_POS with ctrl+3) | |
# | |
# Requires xdotool, generally available from your package manager | |
# You'll probably want to bind this to a key | |
chr=`xdotool search --name chrome | tail -1` | |
xdotool key --window "$chr" --delay 20 TAB_POS space |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment