Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 am using awesomewm and have two monitors, so Mod4+j and Mod4+k cycle through windows on current screen only. Is there a way to cycle through all windows/clients on all screens to make it work like ordinary Alt+Tab?

share|improve this question

After poking around awful module docs i found a solution. It is hacky, but it works as I wanted it to work.

awful.key({ modkey,           }, "Tab",
    function ()
        if awful.client.ismarked() then
        if client.focus then

This function cycles through clients on current screen, marking them and when they all are marked, jumps to the next screen. Here is what happens step by step:

It is funny because i do not know what "marked" means. Marked clients do not seem to differ from not marked clients visually or by behaviour.

It is strange that i had to write a 10 line function to get something as trivial as multiscreen alt-tab. I might have done something excessive)

share|improve this answer
marking seems to allow you to add a tag to marked clients all at once from what i can tell. it's not discussed much in the manpage, but it has one reference to "tag marked clients with tag". what i've picked up on though is you can probably use that "mark" functionality for anything that needs to be applied or processed on multiple clients. say for example you have 10 clients and you want title bars on 4, mark those 4 and then with some lua code you can have it add the titlebars on those you've marked. – Joshua Kersey Jan 21 '13 at 21:01

I'm not sure when this capability was added, but I believe you're looking for

client.focus.global_bydirection (dir, c)

Focus a client by the given direction. Moves across screens. Parameters:

  • dir: The direction, can be either "up", "down", "left" or "right".
  • c: Optional client.
share|improve this answer

I am using the awesome-cyclefocus module

awesome-cyclefocus is a module/plugin for the awesome window manager, which provides methods to cycle through the most recently used clients (typically known as Alt-Tab).

It allows to easily filter the list of windows to be cycled through, e.g. by screen, tags, window class, name/title etc.

share|improve this answer

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.