Skip to content

Instantly share code, notes, and snippets.

@jbonney
Created June 9, 2013 13:22
Show Gist options
  • Save jbonney/5743509 to your computer and use it in GitHub Desktop.
Save jbonney/5743509 to your computer and use it in GitHub Desktop.
Spotify - Linux key bindings. From XFCE / Ubuntu keyboard shortcuts configuration, assign the control command to their key. http://shkspr.mobi/blog/2011/12/linux-spotify-keybindings/
"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" XF86AudioPrevious
@sago104
Copy link

sago104 commented Aug 9, 2020

Thanks for the help! I follow your instructions. Now I can command Spotify in Manjaro KDE just with a little change.

I add this photo for guide in global hotkeys

image

@ilya-bystrov
Copy link

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek int64:10

Find out that seek value is specified in microseconds. So you have specify int64:1000000 for 1 sec. It works for me.

@brccabral
Copy link

This works with Spotify, but then YouTube stops working (running from Brave browser). Is there a way to keep both Spotify and YouTube?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment