5 ms·
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.
by TachyonicBytes 2y ago
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.
- feep 2y agoIt 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 https://github.com/sbmpost/AutoRaise
- bashinator 2y agoI'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.
- lelandfe 2y agoIt's also a bummer because Terminal.app has the functionality out of the box: https://macos-defaults.com/mouse/focusfollowsmouse.html https://macos-defaults.com/mouse/focusfollowsmouse.html
- bashinator 2y agoIt can be implemented within apps, but not across apps afaict.
- speedgoose 2y agoLooks like Hammerspoon and some lua should do: https://www.hammerspoon.org/docs/hs.mouse.html https://www.hammerspoon.org/docs/hs.mouse.html https://www.hammerspoon.org/docs/hs.window.html https://www.hammerspoon.org/docs/hs.window.html
- bashinator 2y agoNot seeing a way to get the window currently under the mouse pointer, but this is pretty interesting - thanks!
- speedgoose 2y agoYou can get the positions of every windows, the position of the mouse pointer, and you can focus windows.
- bashinator 2y agoThis is really cool, I'm gonna try and implement it!
- jamil7 2y agoShould be possible using AX APIs on mac, might not be all that performant, however.
- samatman 2y agoThe 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.
- barnabee 2y agoI have an Alfred workflow to search the menu, so not being able to move the mouse there isn’t a big issue.
- filereaper 2y agoYup there's AutoFocus which I use daily with Aerospace https://github.com/synappser/AutoFocus https://github.com/synappser/AutoFocus