"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 |
This comment has been minimized.
This comment has been minimized.
Thanks for this! |
This comment has been minimized.
This comment has been minimized.
Awesome ! Thank you |
This comment has been minimized.
This comment has been minimized.
Thanks! |
This comment has been minimized.
This comment has been minimized.
Note it's not XF86AudioPrevious it's XF86AudioPrev and you must have the command on the second line. "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" |
This comment has been minimized.
This comment has been minimized.
Thank you! I worked for me ! |
This comment has been minimized.
This comment has been minimized.
I'm on Ubuntu 16.04: for me it was required to install these package(s): Then, I tested the following: I've dropped the quotes and removed the last part after the last quote, as this part didn't work for me (got an error: Data item "XF86AudioPlay" is badly formed).
|
This comment has been minimized.
This comment has been minimized.
any way to program a "save to your music" shortcut? For pause/skip/etc ubuntu-shortcuts from keyboard preferences seem to work finde. |
This comment has been minimized.
This comment has been minimized.
Hail to the king, baby! :) Thanks man. Just switched to xubunbu, and it made me a headache to use my so-loved keyboard hotkey and mouse gesture to pause the music! |
This comment has been minimized.
This comment has been minimized.
Thanks! |
This comment has been minimized.
This comment has been minimized.
Thank you very much for this bro! |
This comment has been minimized.
This comment has been minimized.
Thanks m8! |
This comment has been minimized.
This comment has been minimized.
Awesome thank you ! |
This comment has been minimized.
This comment has been minimized.
Exactly what I needed thanks! Now when I press F8 the music play/pauses, and when I press F9 Spotify skips to the next track. For those who are struggling, here's what I did: In terminal
Scrolled to the bottom of the file and pasted
Then saved and exited.I used VIM but you can probably just as easily use another text editor like Nano or something. |
This comment has been minimized.
This comment has been minimized.
Great! Thanks |
This comment has been minimized.
This comment has been minimized.
It rocks ! Thank you |
This comment has been minimized.
This comment has been minimized.
Thanks for this snippet! Had to rename XF86AudioPrevious to XF86AudioPrev though for me to work on Ubuntu 16.04 |
This comment has been minimized.
This comment has been minimized.
Linux XFCE Manjaro Work perfect |
This comment has been minimized.
This comment has been minimized.
Thank you very much, you helped me a lot ;D |
This comment has been minimized.
This comment has been minimized.
For all two i3 guys:
|
This comment has been minimized.
This comment has been minimized.
I still have problem with previous and next keys on Ubuntu 14.04 & XFCE4 even though after changing XF86AudioPrevious to XF86AudioPrev but play and pause keys are perfect. |
This comment has been minimized.
This comment has been minimized.
Wesdesignz thanks |
This comment has been minimized.
This comment has been minimized.
thanks @mohnjatthews ! also have to remember run xbindkeys |
This comment has been minimized.
This comment has been minimized.
What can I do to config my keys in Openbox on Antergos or Archlinux? Thank you so much for your help in advance... |
This comment has been minimized.
This comment has been minimized.
well that worked ,,but it stopped the hotkeys for Rhythmbox the default player on XFCE4 |
This comment has been minimized.
This comment has been minimized.
Works on 4.8.17 Gallium OS. Thank you! |
This comment has been minimized.
This comment has been minimized.
THANKS! |
This comment has been minimized.
This comment has been minimized.
Thanks @liquid2026 That's actually worked for me after a lot of failures. - https://gist.github.com/jbonney/5743509#gistcomment-1749006 OS: Xubuntu 16.04 |
This comment has been minimized.
This comment has been minimized.
I'm having the same issue on Xubuntu 17.04 |
This comment has been minimized.
This comment has been minimized.
God bless you |
This comment has been minimized.
This comment has been minimized.
Thank you so very much! I Wish I had seen this sooner. |
This comment has been minimized.
This comment has been minimized.
Bless every little part of you, have been searching for this solution in forever! Can't thank you enough! <3 |
This comment has been minimized.
This comment has been minimized.
Thank you very much! |
This comment has been minimized.
This comment has been minimized.
Awesome, thanks! |
This comment has been minimized.
This comment has been minimized.
great job |
This comment has been minimized.
This comment has been minimized.
@liquid2026 worked like a charm, thx! |
This comment has been minimized.
This comment has been minimized.
Thanks guys! :D |
This comment has been minimized.
This comment has been minimized.
thanks! |
This comment has been minimized.
This comment has been minimized.
Perfect, thanks! |
This comment has been minimized.
This comment has been minimized.
Thanks! |
This comment has been minimized.
This comment has been minimized.
Thanks @sjug ! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Still works, thanks!! |
This comment has been minimized.
This comment has been minimized.
Thank you very much! :) |
This comment has been minimized.
This comment has been minimized.
Bindsym version for the i3wm people using media keys (.i3/config)
|
This comment has been minimized.
This comment has been minimized.
Those work absolutely fine for me on Ubuntu 17.10 when defined as "Custom Shortcuts" via Gnome Settings. |
This comment has been minimized.
This comment has been minimized.
To improve upon @barnaba's example for I3 users, and for those preferring direct media keys on hardware without fiddling with the Gnome controls UI:
|
This comment has been minimized.
This comment has been minimized.
Thanks! Worked very well on a DELL 5777 laptop with a vanilla Xubuntu 16.04! |
This comment has been minimized.
This comment has been minimized.
T.K.S!!! |
This comment has been minimized.
This comment has been minimized.
To date https://gist.github.com/jbonney/5743509#gistcomment-1422561 is still working perfectly on xfce/ubuntu studio |
This comment has been minimized.
This comment has been minimized.
For anyone curious which other commands the spotify client supports try:
This lists another method "Seek". Unfortunately it doesn't seem to do anything though, because no matter what value I try for Offset, it doesn't have any effect:
Still wanted to leave it here in case anyone else wants to figure this out. Seemed useful. |
This comment has been minimized.
This comment has been minimized.
Is there a command for the "15 seconds" key in Spotify? |
This comment has been minimized.
This comment has been minimized.
It's work on Debian 10 |
This comment has been minimized.
This comment has been minimized.
Debian 10 - Buster. Works just fine. |
This comment has been minimized.
This comment has been minimized.
For anyone else with this issue: In Ubuntu 18.04 using the snap version of Spotify the media keys work out of the box, except that Chrome is a little greedy and captures these keys (presumably to control YouTube content and the like). The good news is that this can be disabled here: |
This comment has been minimized.
This comment has been minimized.
Working great xubuntu 18.04 |
This comment has been minimized.
This comment has been minimized.
@chfritz 10x so much that helped a lot |
This comment has been minimized.
This comment has been minimized.
And for anyone interested in querying the currently running song, this can be gotten from:
Sample output:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Find out that seek value is specified in microseconds. So you have specify |
This comment has been minimized.
This is still working great, just a suggestionf for users on XFCE...
Just add the quotation part to the Keyboard > Application Shortcuts, then associate it with any key you'd like. (if you don't have media keys on your keyboard)