I want to be able to cycle clients within a single tag (screen). I know I can swap clients by using awful.client.swap.byidx but that moves focus rather than the client.

Say I have three windows:

|         |     |
|         |  2  |
|         |     |
|   1     +-----|
|         |     |
|         |  3  |
|         |     |
+ --------+-----+

And I want to cycle each one into the "1" spot. So "1" would go to "2", "2" would go to "3", and "3" would go to "1". Does that make sense

I know I've seen something like this, but can't find it now.


You are looking for (unsurprisingly) awesome.client.cycle. Add this to your rc.lua:

awful.key({ modkey, "Shift"   }, "y", function () awful.client.cycle(true)    end)

Then you can press Alt+Shift+y to get the desired behavior. The lone boolean parameter determines cycle direction.

  • Actually for me that ended up working like the standard binding "awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end)". The client itself moves around the screen, instead of staying in place in the master. – thermans Jan 14 '14 at 14:15
  • Then you're doing it wrong. client.swap.byidx and client.cycle are subtly yet decidedly distinct. Also what do you mean by "master"? – g33kz0r Jan 14 '14 at 17:50

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.