Doesn't require disabling SIP
That's very interesting! I've been hesitant to use similar WMs as basically all required disabling SIP. Anyone knows what AeroSpace is doing differently that it can work alongside SIP?
Edit: found this in the README:
AeroSpace will never require you to disable SIP (System Integrity Protection). For example, yabai requires you to disable SIP to use some of its features. AeroSpace will either find another way (such as emulation of workspaces) or will not implement this feature at all (window transparency and window shadowing are not practical features)
I wonder if following the mouse for focus would be doable without disabling SIP. It's one of the features I didn't even see in other macOS WM.
I've been searching for a sloppy-mouse-focus implementation for OSX for _years_. Pretty sure there's something fundamentally incompatible in how app windows are managed.
Looks like Hammerspoon and some lua should do:
https://www.hammerspoon.org/docs/hs.mouse.html
https://www.hammerspoon.org/docs/hs.window.html
Not seeing a way to get the window currently under the mouse pointer, but this is pretty interesting - thanks!
You can get the positions of every windows, the position of the mouse pointer, and you can focus windows.
This is really cool, I'm gonna try and implement it!
It's also a bummer because Terminal.app has the functionality out of the box: https://macos-defaults.com/mouse/focusfollowsmouse.html
It can be implemented within apps, but not across apps afaict.
The problem with focus-follows-mouse on macOS is the top menu bar.
If you had it, and tried to mouse to the menu, the menu would switch out from under you.
I have some notes in a file somewhere about how a Mac-native focus-follows-mouse could even work, because I want it. It would end up being a rather different implementation than the X Windows style.
I have an Alfred workflow to search the menu, so not being able to move the mouse there isn’t a big issue.
Should be possible using AX APIs on mac, might not be all that performant, however.
Yup there's AutoFocus which I use daily with Aerospace
https://github.com/synappser/AutoFocus
It is, Yabai can do it. I am currently using autoraise. Both work great, barring UI weirdness of macOS.
Example. Mousing over another window on the way to the menubar.
https://github.com/sbmpost/AutoRaise
I tried yabai but found switching between macos spaces too slow. I moved to aerospace and I absolutely love the workspace implementation. But I really love yabai's focus-follows-mouse feature - so is it possible to use yabai just for that while using aerosoace for everything else i3-like?
Fwiw I have yabai configured for instant desktop switching
That's what I thought I did, but I can't, for example, just move to space 7 or something. I need to create a new space with a number I can't control and switch to that. That new workspace might not be next to the previous space I was working in, so I need to cycle through multiple spaces. Aerospace on the other hand just lets you choose a numbered workspace and work with that.
Would love to see your yabairc if you can share.
Here's my .yabairc https://github.com/kcrwfrd/dotfiles/blob/master/link/.yabair...
Looking through it I don't see a setting for instant space switching... I think maybe it's provided by default when you install the scripting addition? https://github.com/koekeishiya/yabai/issues/1527
I have keybindings in my skhd for focusing spaces: https://github.com/kcrwfrd/dotfiles/blob/master/skhd/space
I usually just keep 10 spaces at all times rather than creating new ones on demand.
Not OP, but I also have instant space switching enabled with yabai. Here is my yabairc and skhdrc.
yabairc - https://github.com/SxC97/dotfiles/blob/main/.yabairc
skhdrc - https://github.com/SxC97/dotfiles/blob/5db5e13f894f767722758...
If it's still not working, make sure SIP is disabled and the Scripting Addition is installed and loaded. Here's a link to the instructions as it's a little complicated: https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(...