Enabling “Focus Follows Mouse” For Terminal 0

Terminal

Share
Enabling “Focus Follows Mouse” For Terminal

Hey,

This is quite a difficult term to quantify in a simple title. Basically this post is allows you to type into Terminal when it is not the selected window. For example, if you have a Terminal window open in the background, so another app is selected, when you type it will type in the selected app as expected. This trick will allow you to hover your mouse over the Terminal window, when you type it will type into Terminal and not the selected app. This term is defined as “Focus Follows Mouse”, it is not present on many apps on your Mac, however you can enabled it for Terminal and X11.

Getting Focused

To get Terminal to take an input from the keyboard when it is not the selected app we need to issue a simple Terminal command. To do this open up Terminal located in Application > Utilities >Terminal and type the following and press enter:

defaults write com.apple.terminal FocusFollowsMouse -bool true

Restart Terminal by quiting the app and reopening it. Now when the app is not selected, for example if you have Mail selected, when you hover you mouse over Terminal and type the text will go into Terminal and not the selected app. Its a quick way to type stuff into Terminal with out having to select it first.

If you don’t like this feature you can revert it by typing the following into Terminal:

defaults write com.apple.terminal FocusFollowsMouse -bool false

Restart Terminal and this feature will be gone.

You can also do this for X11 apps. Simply enter:

defaults write com.apple.x11 wm_ffm -bool true

or for Snow Leopard:

defaults write org.x.X11 wm_ffm -bool true

If you want to reverse the command, simply replace true with false as before.

Its only a simple command, but allows you to interact with these apps quickly with the mouse without having to first click on them. Useful if the apps are running in the background and you don’t want to make them active.


If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips