Created
January 22, 2013 14:34
-
-
Save doapp-ryanp/4595068 to your computer and use it in GitHub Desktop.
configure spotify for linux shortcut keys
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
#@see rynop.com for details | |
sudo apt-get install xbindkeys | |
####now put the following in ~/.xbindkeysrc: | |
#KeyboardPlay | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" | |
XF86AudioPlay | |
#KeyboardStop | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" | |
XF86AudioStop | |
#KeyboardPrev | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Prev" | |
XF86AudioPrev | |
#KeyboardNext | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" | |
XF86AudioNext | |
##### Now run xbindkeys and put '/usr/bin/xbindkeys' in 'startup applications' for your user account |
Thanks!
This is great! Thanks! Chrome will not steal my media keys anymore hahaha 😄
On Ubuntu budgie it needed a full restart, not just spotify.
does anyone have commands for volume up/down?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This worked great on Ubuntu 19.04 (with the slight change below), great to bind play/pause to scroll lock and volume to pause/break on a keyboard without media keys.
Previous song did need a change though, "Prev" at the end of the line needed to be "Previous", otherwise nothing happens: