Hi all,

I'm wondering whether it's possible to write a Lua function that
switches focus to a specific app, such as Firefox or a terminal.

The reason I ask is that I have redefined my keyboard mapping so that
the F1 to F12 keys generate keycodes for F21 to F32.  (If I hold Caps
Lock while pressing the keys I get the original F1 to F12 back again.)

I would like to assign for example F21 to focus my web browser, F22 to
focus my e-mail client, F23 to focus the active chat window, etc.  This
way I can make better use of my muscle memory and quickly switch
between apps without having to remember what monitor I am currently on
and what desktop the app is on.  I frequently forget and end up
switching desktop on the wrong monitor, so I am hoping this will fix
the problem.

The trick is I don't want to focus a specific desktop on a specific
screen, because I tend to move the apps between monitors depending on
which ones I want to view all at once.  So this function would need to:

 1. Find a window based on some criteria (class, title, etc.)  It would
    be great if this was a function parameter so some keys could search
    for a window by title, but others by class or role.

 2. Focus whichever monitor the window resides on.

 3. Switch to whichever desktop the window is on.

 4. Focus the window.

Is this something that's possible to do with Awesome?  Is anyone able
to give me a hand with this?

Many thanks,
Adam.



-- 
To unsubscribe, send mail to [email protected].

Reply via email to