Created
February 13, 2015 12:21
-
-
Save paulodeleo/c63c1f3d17047f7b3985 to your computer and use it in GitHub Desktop.
Simple ruby (yep, not shell) script using xdotool to pause Spotify on Linux. I bind it to a global hotkey in Ubuntu.
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| windows = `xdotool search --name Spotify` | |
| windows.split("\n").each do |window| | |
| `xdotool key --window #{window} space` | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment