Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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