Friday, July 24, 2015

Setting up Global Hotkeys in Spotify on Linux Mint (Xfce)

This isn't really a coding post but I feel like it is kind of relevant since, while I'm coding, music is a big part of my day. I use Linux Mint (Xfce) on my workstation and despite the negative press that Spotify gets about various issues, I remain a fan of their service. A while back I started using the Spotify Linux Preview Client on my Linux machine and I liked it quite a lot. However, it was lacking something that I really missed... global hotkeys. So, I did a little research and these are the steps that I followed in order to achieve this most useful feature.


  1. You can get the Spotify Linux Client by following the directions shown here: https://www.spotify.com/us/download/linux/
  2. Download and install the latest playerctl release (deb file) from this page: https://github.com/acrisci/playerctl/releases
  3. Disable Xfce global hotkeys that you plan on reassigning to Spotify in this file: xfce4-keyboard-shortcuts.xml (It is in multiple locations. You may have to tinker with this.) The one that worked for me was located at /usr/share/mint-configuration-xfce/xfce4/xfconf/xfce-perchannel-xml
  4. Comment out any entries dealing with control+alt+home, control+alt+left, and control+alt+right
  5. In the Xfce keyboard shortcuts add the following shortcuts
    1. control+alt+home -> playerctl play-pause
    2. control+alt+left -> playerctl previous
    3. control+alt+right -> playerctl next

Of course feel free to customize the keys any way you like. The above is just my setup. Again, the above steps are for Xfce only.

No comments:

Post a Comment