I like Rdio and linux. Rdio works great in a browser except for one thing: keyboard shortcuts!!!
When coding, I like to be able to play/pause my music quickly, meaning I don't want to switch windows. I figured out a way to do this:
Google Chrome --app
First, I made a file in my
rdio that runs:
This opens Rdio in its own window, and most importantly, as its own application (kind of).
Next, I made a file in my
rdio-play-pause. This runs:
xdotool key --window $(xdotool search --name Rdio | head -1) space
This looks up a window with the name "Rdio" and sends the "space" key to it, which is Rdio's keyboard shortcut for play/pause.
Window Manager Keyboard Shortcut
Last, I am on XFCE, so I opened up the settings manager, went to keyboard -> Application Shortcuts. Then I created a shortcut to my
rdio-play-pause script bound to
XF86AudioPlay which is my keyboard's play/pause media key.
Thanks to @IAmAru for suggesting I look into window manager command line tools.