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

Incorrect behaviour: rc.lua key {mod} Tab #2618

Open
Sorky opened this issue Jan 27, 2019 · 4 comments
Open

Incorrect behaviour: rc.lua key {mod} Tab #2618

Sorky opened this issue Jan 27, 2019 · 4 comments

Comments

@Sorky
Copy link
Contributor

Sorky commented Jan 27, 2019

When there are multiple clients, I believe that {mod} Tab should cycle through all, not just back and forth between the last and current

Current...

    awful.key({ modkey,           }, "Tab",
        function ()
            awful.client.focus.history.previous()
            if client.focus then
                client.focus:raise()
            end
        end,
        {description = "go back", group = "client"}),

I believe it would be more correct to have {mod} Tab move forward through multiple clients and {mod} {Shift} Tab move backwards. Then having {mod} {control} Tab (or maybe {mod} BackSpace) having the current 'last' client behaviour

Suggested...

-- Show next client
    awful.key({ modkey }, "Tab",
        function() awful.client.focus.byidx(1) end,
        { description = "next", group = "client" }),

-- Show prev client
    awful.key({ modkey, "Shift" }, "Tab",
        function() awful.client.focus.byidx(-1) end,
        { description = "prev", group = "client" }),

-- Show last client
    awful.key({ modkey, "Control" }, "Tab",
        function ()
            awful.client.focus.history.previous()
            if client.focus then
                client.focus:raise()
            end
        end,
        {description = "go back", group = "client"}),
@Elv13
Copy link
Member

Elv13 commented Jan 27, 2019

I have a gears.history pull request deep in the pipeline to add a generic history API for the clients/tags/commands/layouts/etc. Given I am not working on it and the code is in such early stage it's not even worth publishing, I leave to other to complete this before me.

The issue you are reporting is well known but can't be fixed because a) our current history API suck and b), it would be a behavior change so it has to wait for Awesome 5.0 anyway. Both my config and @blueyed one have alternative history modules which are not affected by this bug. You can use them as a workaround if you don't plan to implement a very large body of code+tests to clean up this mess.

@Sorky
Copy link
Contributor Author

Sorky commented Jan 29, 2019

I'll go with the above for now for myself at least as it is easy and doesn't require waiting ;-)

While there is a change of behaviour (which I feel for the better) it only comes into play for >2 clients and the Mod-Ctrl-Tab falls back to the old way

Could leave Mod-Tab and add Mod-Alt-Tab to move forward and Mod-Ctrl-Tab to move backwards I guess

Either way, the code is here for others if it doesn't make it into the default

@Sorky
Copy link
Contributor Author

Sorky commented Jan 29, 2019

Is this the work you were referring to? #644 My understanding grows!

@blueyed
Copy link
Member

blueyed commented Feb 18, 2019

As for now you might be interested in https://github.com/blueyed/awesome-cyclefocus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants