Configure Spotify Audio Keybindings for Linux
11/Jan 2018
I have slowly switched myself to primarly using Linux over the last year. One of the things I met early on was Spotify apparently did not catch the keyboard media keys to control music. After some hunting I found an article from the archlinux wiki that gave me a good place to start.
To hookup the basics, just place the following into your ~/.xbindkeysrc
# Spotify Keys
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
XF86AudioPlay
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
XF86AudioStop
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
XF86AudioNext
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
XF86AudioPrev