-
-
Notifications
You must be signed in to change notification settings - Fork 693
2D grid navigation (spaces) #2601
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
base: master
Are you sure you want to change the base?
Conversation
|
Oh man, please get this merged. I still find myself using the totalspaces2 shortcuts by accident, and I haven't had it for like 3 years. |
|
@signal15, please see #2602 (comment). We may have to solve this in another way. |
|
I would also love to see this merged. |
|
Fyi for those looking for this feature, you can recreate this with e.g. Hammerspoon and focusing spaces by index. |
|
Another vote for merging this. I tried the approach of scripting using existing functionality and focusing by index, but I found that method noticeably slower—probably due to needing several times more commands for each switch. I'm coming from TotalSpaces2 and before that fvwm on Linux. I must have grid navigation... This works great. |
|
@bdeianov, after @Etheryte made me aware of Hammerspoon, I've built https://codeberg.org/mikkelricky/hammerspoon/src/branch/main/Spoons/YabaiGridSpaces.spoon and used it for months. It works perfectly for my use and is fast enough (I've disabled all animation crap on my Mac). |
Adds 2D grid navigation to yabai (cf. #2602).
The basic idea is to pretend that the spaces in the linear (1 dimensional) list that macOS provides are arranged in a grid where we can move “north”, “east”, “south” and “west”. This basically amounts to computing an offset to where the “north” space, say, is in the linear list (it's “3 spaces to the left” if we assume that the grid has 3 columns). I've added some crude documentation on this in wiki/grid-spaces.md.
I'm in no way an expert C programmer, so any suggestions on improvements or rewriting – and comments in general – will be much appreciated.
I've been using 2D grid navigation in yabai for quite some time and it works perfectly for my needs. I don't use yabai for anything else that switching between spaces, but I don't expect my code changes to affect or break any other parts of yabai.