Terminal Focus Follows Mouse

The followings two tips are for those who spend any amount of time in terminal windows. The first tip shows how to configure focus follows mouse, which is handy when you jump between multiple terminals. The second tip demonstrates how to configure the default window settings so when inside a terminal and you create a new terminal (in either a tab or window) the window settings match your preferred look and feel.
To configure focus follows mouse, enter the following in a terminal. You will need to close and re-open all open terminals:

defaults write com.apple.Terminal FocusFollowsMouse -string YES

You can give this effect a try by opening two terminals and moving the mouse between them. Note, this only applies to two separate terminal windows, not two terminals in separate tabs within one terminal window.

The next tip will set the default window settings for each new terminal window that is opened (from within a terminal):

defaults write com.apple.Terminal "Default Window Settings" -string Novel

Novel is my preferred (configured) setting for a terminal. To see what I am referring to, from a terminal enter the Preferences dialog and look at the Startup setting, which is shown below:

This is a little confusing, let me clarify. If you look closely at the text in the dialog above, it states On startup, open: which translates towhen I startup a terminal window, use the Novel window settings. However, if you are in a terminal already and open a new terminal (cmd-N or cmd-T), the default window setting is Basic. So, the tip above tells the system when I am in a terminal, and I open another terminal, using the window settings I specified (not Basic).

Both of the above configurations can be set by editing the terminal property list file located here: ~/Library/Preferences/com.apple.Terminal.plist. If you double click on this file, the Property List Editor will open the file and youll see the two properties mentioned in the tips above, near the top of the list:

And while you have the property editor open, go ahead and take a few minutes to tweak a few other options. I think youll agree there, is an an odd sense of satisfaction in customizing your system. You may need to restart any open terminals to see changes take effect.

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *