Is there a way to use hotkeys to focus on a window not determined by its program name?

Let's say there are nine program tabs open: Terminal, Eclipse and seven Chrome Windows.

Currently, I am just clicking with the mouse in the lower desktop section to change focus. What I would like to do is use keys like Super+0, Super+1, Super+2 and so on change focus.

I know there is Alt-Tab and also Super-W, which are convenient but not quite what I am looking for.

This is on 10.04, but would consider switching to 12.04 if it can do it.


There is a handy utility in the debian repos called wmctrl:

sudo apt-get wmctrl

You can use wmctrl to give a window of your choice focus by title so your button shortcuts would be something like: wmctrl -a 'user@dev'

If you consult the info for wmctrl you'll find more sophisticated options that should make scripting to get the first chrome window or some such accessible but at that point you are probably better off using Super-W anyway.

I find this very handy if you are a fan of emacs org-mode. I put capture onto the pause key and give focus to the emacs buffer using wmctrl so that I can make quick notes on phone calls or tasks that pop up without interfering with my work flow.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.