-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
I have issues with the existing directional focus algorithms available to me:
- bspwm with
focus_by_distance = true: this finds the nearest windows in the target direction (ie. considering only the parallel distance), then takes the centre point of the nearest edge of each window and chooses the one which is nearest the centre point of the edge of the focused window in the target direction. I find that with this, there are many common situations where it's hard to judge which window will be chosen. - bspwm with
focus_by_distance = false: this finds the node on the other side of the edge of the focused window in the target direction, then uses the internal binary tree representation of the windows in that node to choose a target window (ie. moving left/up will take the 'last' window and moving right/down will take the 'first'). This makes it possible to know which window will receive focus, but only if you remember the internal binary tree, which cannot be determined from just the current window placements. - right-window: I don't like how this chooses a window based on focus history, because again this means I have to remember the focus history to know what will happen - I can't just tell by looking.
My suggestion is to take the top or left edge of the focused window, and follow it along to find the target window. The behaviour is easier to judge than bspwm with focus_by_distance = true because you have the window border as a visual guide. I've done a quick implementation of this in bspwm; I've been using it for a while and it works well for me. I believe this is better-suited to this project than bspwm, given its narrower focus on just implementing directional window focus.
I would also be willing to implement this (albeit with rather C-like C++), I'd just need to find the time.
Reactions are currently unavailable