1

Using the awesome window manager (version 3.5.6), I'm looking for a way to move may focus to the left/right/up/down relative to my currently focused client. For instance, given this layout:

+-----+-----+-----+ | | | | | A | B | C | | | | | +-----+-----+-----+ 

If the focus is on client A, I'd like a keyboard shortcut that moved the focus to client B. Pressing it again would focus on client C and pressing it another time would do nothing. Other shortcuts would move to the right, up or down.

I know how to bind commands to keyboard shortcuts in my rc.lua but not which command I could use here, so any help would be appreciated!

2
  • By "view" I assume you mean "client"? Commented Mar 23, 2015 at 20:27
  • 1
    Yes, thanks for mentioning it. I've updated the lingo in my question. Commented Mar 24, 2015 at 6:57

1 Answer 1

4

I believe you are looking for awful.client.focus.by_direction.

https://awesomewm.org/apidoc/classes/client.html#awful.client.focus.bydirection

For example:

# dir The direction, can be either "up", "down", "left" or "right". awful.key({ modkey, }, "j", function () awful.client.focus.bydirection("down") end) 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.