Better iTerm on Leopard

iTerm, the replacement for the default Terminal.app, has been around for a long time. I have resisted using it for a variety of reasons. At one point it was running far too slow on my machine. After that it was a bit buggy. However, a couple of days ago Terminal.app crashed at took with it an unholy amount of work in progress. Perfect opportunity to give iTerm a shot.

The default iTerm is good. However, a couple of tweaks make it better.

  • Change the colour theme to something less eye-buring.
  • Change the application icon.
  • Set up a bookmark to ssh to my VPS.
  • Set up a script to open a new tab in the current directory.

Changing the colour scheme

Dmytro Shteflyuk wrote an article and some code to add very nice colour theme to iterm. You can find it here. If you’re lazy, just run the command below:

bash < <( curl http://gist.github.com/raw/473731/iterm_pastel_theme.sh )

Changing the application icon

The POSTMODERN blog has a post with an new and beautiful icon for iTerm. To install take the following steps:

wget http://postpostmodern.com/wp-content/media/iterm.icns
mv iterm.icns /Applications/Contents/Resources/iTerm.icns
killall Dock

This will replace the old icon with the new one.

Set up a bookmark to ssh to my VPS

In iTerm go to “Bookmarks” -> “Manage Bookmarks”. Add a new bookmark with the command:

ssh username@yourhost.com

Add a keybinding to the bookmark and pick a letter for it (for example, ‘T’). Now when you press CMD + CTRL + T iTerm will open a new tab and automatically ssh to the server. If you have key based authentication setup it will log you in right away.

Set up a script to open a new tab in the current directory

With some help from multiple online sources I’ve managed to put a script together that launches a new iTerm tab that automatically executes cd to put in into the same directory. To set this up follow these steps:

mkdir ~/bin
cd !$
wget http://bitbucket.org/vpetro/applescript/raw/7f3ac525ffa0/term
chmod +x term

Now whenever you do term name you will get a new tab for the same directory with the name of the tab set to name.

For me, all of this put together makes for a far better work/play experience. The end.