Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Direction / Previous Windows #44

Open
feddischson opened this issue Nov 8, 2020 · 5 comments
Open

Change Direction / Previous Windows #44

feddischson opened this issue Nov 8, 2020 · 5 comments

Comments

@feddischson
Copy link

Hi,

would it be somehow possible to setup this plugin in a way to cycle to the previous focus and then through all other windows?

For example the focus is on Windows W1 and when pressing 'modkey+Tab', the focus goes to W2:

>  W1
   W2
   W3
   W4

After a while, I would like to go back or to W1 or to other windows in the following order:

> W2
  W1
  W3
  W4

This would be interesting for the case, where somebody needs to switch frequently between to windows (W1 and W2 in the example above), and only sometimes to the others (W3 and W4).

@blueyed
Copy link
Owner

blueyed commented Nov 9, 2020

For your use case you would just use modkey + tab once to switch back and forth, and if you want to go to W3 you would have to use it twice, no?

@blueyed
Copy link
Owner

blueyed commented Nov 9, 2020

There's also the variant with Shift, of course.
(I might be missing something / misunderstanding it, of course)

@feddischson
Copy link
Author

feddischson commented Nov 9, 2020

Yes exactly, modkey + tab once to switch back and forth, but modkey + tab twice to go to W3 and modkey + tab four times to W4.
At the end of the day, the order of W3 and W4 does not matter. So one solution would be to remember and to invert the the direction.
For example

> W2
  W1
  W4
  W3

would also be good.

@feddischson
Copy link
Author

This behavior is well established in other window managers right? As far as I can remember it was like this with WindowMaker.

@blueyed
Copy link
Owner

blueyed commented Nov 15, 2020

Hmm, I still fail to see what is not working as expected.
It basically uses the least-recently-used list.
I.e. given the order is W1, W2, W3, W4:
switching once gives you W2, W1, W3, W4,
and then from W2 you have to use it twice to go to W3,
using it once switches to W2 again.
Being on W2 the order is then W3, W1, W4 from there.

FWIW here's my config for alt-tab:

    -- Alt-Tab: cycle through all clients on te
    cyclefocus and awful.key({ altkey,           }, "Tab", function(c)
        cyclefocus.cycle({
          display_notifications = true,
          -- raise_clients = true,
          modifier="Alt_L", keys={'Tab', 'ISO_Left_Tab'},
          -- get_client_icon_widget = function()
          --   bnote("get_client_icon_widget")
          -- end,
        })
    end),
    cyclefocus and awful.key({ altkey, "Shift"   }, "Tab", function(c)
        cyclefocus.cycle({
          display_notifications = true,
          -- raise_clients = true,
          modifier='Alt_L', keys={'Tab', 'ISO_Left_Tab'},
        })
    end),

Repository owner deleted a comment from DavideStagni Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants