feat: remember last focused window so that when I'm moving my mouse between windows while opening a new window, the window ends up properly autotiled with the last window that was focused instead
Is your feature request related to a problem? Please describe. It is somewhat frustrating to me when I have a vertically split screen layout with two windows, and I want to open a third split with one of the existing windows, horizontally, but my mouse happens to be between the windows or have been in a popup and the focus hasn't updated yet, so when I open the new window, it ends up in a triple vertical split with the other two in this unusable three column layout, instead of horizontally split as expected.
Intended:
| | | | | | | |
| | | | -> | | +-------+
| | | | | | | |
What usually happens:
| | | | | | | | | |
| | | | -> | | | | | |
| | | | | | | | | |
Describe the solution you'd like Just make a variable that stores the last focused window whenever the variable that stores the currently focused window changes. Then use that variable instead of the current focus variable if no window is currently focused.
Hi @alexispurslane - do you have screencast of the issue?
Hi @alexispurslane - does the PR #252 resolve your issue?
Hi @alexispurslane - does the PR #252 resolve your issue?
Not quite, although it could easily be modified to. To resolve my issue, when a new window is opened it would have to check if a window is currently focused and if so, split with that window as usual, while if not, get the window that was last in focus (via the last cursor position perhaps) and split the new window with that window.
Ok - would you be able to share your screen/monitor setup/resolution? And also if you do not mind providing a screen recording of the issue ?
- This isn't
Quarter tilling? - Or maybe
Binary tilling?