Tweaking iTerm2 and playing with plists

iTerm2 v3.0.0 came out and they made it easy to select a font size from a list; but I wanted a specific font size of 15pt for the Stark & Wayne Videos. In my hunt to learn how to change this setting I discovered the built-in OS X tools defaults and PlistBuddy.

To explore the available settings of iTerm2:

defaults read ~/Library/Preferences/com.googlecode.iterm2.plist

There is a matching defaults write but it is difficult to use to edit items inside arrays. Enter the slightly less difficult to use PlistBuddy.

To set the font to 15pt Monaco:

/usr/libexec/PlistBuddy -c "Set :\"New Bookmarks\":0:\"Normal Font\" \"Monaco 15\""  ~/Library/Preferences/com.googlecode.iterm2.plist

Note, /usr/libexec is probably not in your $PATH so reference it by its absolute path /usr/libexec/PlistBuddy.

Set the New Window size to 141 x 33, which fits nicely into 1280x720px (HD):

/usr/libexec/PlistBuddy -c "Set :\"New Bookmarks\":0:\"Columns\" 141"  ~/Library/Preferences/com.googlecode.iterm2.plist
/usr/libexec/PlistBuddy -c "Set :\"New Bookmarks\":0:\"Rows\" 33"  ~/Library/Preferences/com.googlecode.iterm2.plist

Restart iTerm2 and new windows will be 141×33 characters in size and the font will be Monaco 15. Change to your tastes.

Spread the word

twitter icon facebook icon linkedin icon