Open jessedhillon opened 1 day ago
I created this feature because my preferred keybinding scheme is:
Super+H/L
: focus next/previous windowSuper+J/K
: move to next/previous workspaceI find this more natural, as I usually have 2-5 windows on screen so flipping between them doesn't require multidirectional navigation. I am open to a better scheme for figuring out the "next" and "previous" windows, perhaps one that is more aware of the currently used layout.
Hey thank you for all of this, I love it! I agree with you that this could be more natural for some people. I appreciate a lot you also added a setting to Enable next/previous window focus to wrap around
! Since this is already in a very good stage, I'm changing the branch target from main to the next release's branch (v15.1).
This also fixes a bug where the focus keybindings are not unbound when the extension is disabled
I noticed it yesterday and I was starting to work on a fix for this issue, but I'm happy to see you also fixed this, thank you so much!
I am open to a better scheme for figuring out the "next" and "previous" windows
I gave a look at your code and I'm looking into testing it. From what I already saw it's very well made! Meanwhile, as a suggestion, we could consider to follow the same ordering you have on ALT + TAB. I'm curious to know your opinion about it! Currently, you do something like const windowList = focus_window.get_workspace().list_windows();
(which is correct) and that could be replaced with Tiling Shell's getWindows() method who follows ALT + TAB ordering! It does some filtering as well.
Thanks @domferr I'll try out getWindows
this evening and see how it feels.
I have not spent a lot of time looking at the Tiling Shell code, but I imagine that there might be a way where we can
tiles
which describes all of the tilestiles[currentIndex + 1]
One problem would be that some windows may not be tiled, so they would have to be handled in some way. I think this can wait for the future, but it could be a good improvement.
This adds two new focus-switching actions: focus next window, and focus previous window, where previous and next windows are determined by the window manager and limited to the current workspace. It also adds an option to wrap around to the beginning of the window list when the extent is reached, e.g. when you're at the last window, focus next will wrap around and focus the first window.
This also fixes a bug where the focus keybindings are not unbound when the extension is disabled, e.g. when the screen is locked, so the attempt to rebind them fails with a message from GNOME Shell that duplicate bindings are being set.