(I don't want to hear about how crazy I am to want that! :)
Focus-follows-mouse is also known as point-to-focus, pointer focus, and (in some implementations) sloppy focus. [Add other terms that will make this more searchable!] X-mouse
(I don't want to hear about how crazy I am to want that! :)
Focus-follows-mouse is also known as point-to-focus, pointer focus, and (in some implementations) sloppy focus. [Add other terms that will make this more searchable!] X-mouse
You can do it for Terminal.app by issuing the following command at the command line:
defaults write com.apple.Terminal FocusFollowsMouse -bool true
For X11 apps you can do this:
defaults write com.apple.x11 wm_ffm -bool true
In Snow Leopard, use this instead:
defaults write org.x.X11 wm_ffm -bool true
Apparently there's a program called CodeTek Virtual Desktop that'll emulate it systemwide, but it costs $$ (and they never got a version out for OSX Leopard).
Steve Yegge wrote an essay about this a while back, where he tried and failed to write a suitable extension. I've since tried to find focus-follows-mouse applications for OS X and failed also.
I've been coming back to this question periodically for about 10 years and I finally found a simple solution: AutoRaise https://github.com/sbmpost/AutoRaise
By default it enables focus-follows-mouse AND autoraise. You can delay the autoraise with a config option.
It also has what they call "warp" function that centers the mouse pointer in a window when you Command-Tab to the window. I never knew I needed this until I tried it, but once I tried it, I can't live without it!
Focus follows mouse is now possible in macOS, Mojave in my case, using chunkwm. See this Stack Overflow response for a "no autoraise" solution. Autoraise is activated by leaving
chunkc set ffm_disable_autoraise 0
in ~/.chunkwmrc.
Edit 2019-09-12:
chunkwm has been superseded by yabai. To install:
brew tap koekeishiya/formulae
brew install yabai
mkdir -p ~/.config/yabai/
printf 'yabai -m config focus_follows_mouse autoraise' >> ~/.config/yabai/yabairc
brew services start yabai
Codetek had a product that did this but they never released a version for Leopard or later.
MondoMouse can sort of do focus-follows-mouse, but not auto-raise. Even the focus-follows-mouse is broken though. For example, it doesn't play well with command-tab (if you command-tab to a new application and don't touch the mouse then it should not switch focus back to wherever the mouse pointer happens to be -- I'm pretty sure every implementation in Linux I've seen gets this right but MondoMouse doesn't).
You can enable focus-follows-mouse (no autoraise) for just Terminal windows (just execute the following in a terminal):
defaults write com.apple.Terminal FocusFollowsMouse -string YES
And similarly for X11 windows:
defaults write org.x.X11 wm_ffm -bool true
(For mac versions previous to 10.5.5 this was:
defaults write com.apple.x11 wm_ffm true
)
I don't know of any other applications that support it.
I currently use MondoMouse and even with its quirks I couldn't use my mac without it. They have a free trial and I would recommend it to everyone.
Interesting that Leopard has one flavor of focus-follows-mouse (sans autoraise) enabled by default. The scroll wheel works in unfocused windows.
Use Dwell feature in mac. Go to Accessibility -> keyboard -> Accessibility keyboard (I'm on Catalina)
Solution: Because I was so used to autoraise in Windows I badly missed it on the Mac. The solution I found for the Mac is Zooom (yes, three o's). It has an autoraise function. You can even set milliseconds to wait before autoraise. Can't live without it. Autoraise is an option in prefs as you can see in the screenshot https://www.macupdate.com/app/mac/23203/zooom http://coderage-software.com/zooom/index.html
Some potentially useful advice for part "focus on hover" with dual screens. It doesn't fix some things like typing into an input box when another screen already has input box focus. But it might help people who come here for all aspects of "focus on hover".
Without this fix I always had to "focus click" in a monitor before I can contextually click on anything at all.
You can get some aspects of "focus on hover" with this:
Then at least with Monitor1 selected, now you can instantly click on something in Monitor2, like an email or Tab, without needing the first "focus click".
As always can be the case, this may not work for everyone depending on OS version and probably other things.
Tested MondoMouse (https://www.atomicbird.com/about/mac-apps) on MacOS Mojave. Seems to work fine for me!
To install the prefpane, there will be a notice "enable access for assistive devices" that does not reside in the System Preferences > Accessibility anymore. You'll have to set it in Security & Privacy > Accessibility > Privacy
There will be several warnings about allowing MondoMouse in each app you have open, but once set it works fine! What a relief :)
Here's a working toy-level implementation for multi-monitor autofocus if anyone is interested: https://bitbucket.org/sivann/mac-screenfocus/src/master/
It mostly works, but does not handle multiple windows of the same app in different monitors. Gives focus to the last app that had it if you move the mouse to another monitor.
You can't really do it well, because the Mac interface simply isn't designed with focus-follows-mouse (with or without auto-raise) in mind. I doubt that's going to change any time soon, and unless it does, everybody who tries to implement focus-follows-mouse will run into the same hurdles and wind up with an unsatisfactory result (to those who want such a thing).
So, yes, you are crazy for wanting this — but for technical reasons. Get used to using the Mac on its own terms and I'm sure your desire to force it to behave just like whatever X11 stuff you used to use will subside in a bit as you find new efficient ways of working.