Is there a command to tell compiz that we want to bring in front and set focus to a specific window? How should we identify the window in that command?
The reason behind this question is the following use-case:
Suppose we have a wiki to keep notes of anything interesting we find out. It would be very convenient to have a keyboard shortcut to bring the browser window with our Wiki page in front and start typing immediately then with another key combination switch to the application we were working before
I know that ALT + TAB switches between the last two used windows but cannot support more complex combinations of applications. E.g Browser+Eclipse+ Wiki
If there is a command like the one described, it is easy to add a shortcut to it from KDE or GNOME interface
What you are looking for is wmctrl. For example, add a keyboard shortcut to invoke a command like
wmctrl -Fa 'Wiki - Google Chrome'
to raise and activate the window with that title.
There are different ways of selecting a window by title, id, etc. See man wmctrl. The list of windows can be obtained running
$ wmctrl -l
I haven't tried it with compiz but wmctrl should work for any EWMH compliant window manager.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With