GNOME3 and Audacious 'Jump to Track' Window
Audacious it the audio player I use nowadays. It is not my favorite but I am likely to be using it until the developer of DeaDBeeF answer my call of adding 'Jump to Track' feature*. For those who are not very much into audio players let me explain, 'Jump to Track' is a feature that allows you to trigger popping of a window with a global keystroke, typing some part of the song you want to play, then making player to play the song has the best match. This feature enables you to switch to song that you want to listen without losing focus on what you are doing. Awesome right?
The issue is, new GNOME's window manager (namely mutter) has a strange focus stealing prevention behavior. When I make the 'Jump to Track' window pop, it gets caught by focus stealing prevention and stays at the background, although I need it to come to top to type the filter. Thus, all that 'not losing focus on the thing you are doing' stuff get full of holes and now you have switch to song filtering window manually which is annoying.
To prevent GNOME's focus stealing prevention (yes, preventing the prevention :P) all you need is a trick. Here is mine; there is an application named wmctrl which allows you to manage your windows from terminal. This means 'Voila!', using this application you can interfere mutter's behavior. There is no issue that a shell script can't solve :)
For the users of the best GNU/Linux distribution around (:P), the command to install wmctrl is:
$ sudo pacman -S wmctrl
You can use your distribution's package manager to install wmctrl or you can simply install Arch Linux and join aforementioned users :)
After installing wmctrl, create a shell script jumptotrack.sh
whose content is:
#!/bin/sh audacious -j sleep 0.5 wmctrl -a 'Jump to Track'
and make this script executable with command
chmod +x jumptotrack.sh
And you are ready, now all you need to do is assign a shortcut to run this script. To do so follow,
GNOME's System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts -> '+' button at the bottom to add a new custom shortcut.
Just like the oldies say, that's all folks! :)