Closed lpnh closed 1 week ago
Well, it seems both focus-window-or-monitor-left
and focus-window-or-monitor-right
are now working as expected.
A couple of things about the implementation:
maybe_focus_window_or_monitor_*
FocusWindowOrMonitor*
Now, about the test... I'm not quite sure how to write it properly. I attempted to provide some, but I am unsure if they make any sense.
This was very fun, so I wouldn't mind rewriting anything you think could be improved. Also, feel free to take it from here.
Wait, I just realized. Could you rename Window to Column throughout? Left-Right focus goes by columns, not by windows, and other actions are also focus-column-left, etc.
Sure! I had the same thought initially. We might have been influenced by the initial request. Thanks for catching this.
May I move them next to the other Column variables?
Yeah
Thanks!
Partially addresses: https://github.com/YaLTeR/niri/discussions/296
This is a preliminary sketch for implementing
focus-column-or-monitor-left
andfocus-column-or-monitor-right
, which expand the default left and and right focus behaviors. If a window is available in the target direction, it receives focus; otherwise, the focus shifts to the corresponding monitor.Current state: it kinda works, but there are cases that still need to be fixed. I will try to provide a better description soon.
To be completely honest, I'm new to the Niri codebase, so there's a lot I'm still unsure about. I was hoping to provide a good starting point for this PR, but it seems like I still have a lot to learn.
Any feedback would be greatly appreciated.