A script for using iTerm2 instead of xterm on OSX

The following seems to be working! First, make an iTerm2 profile called TagTime with the style you want. Put the following somewhere in your path, I called it iterm2-tagtime:

#!/bin/bash

osascript <<EOF
tell application "iTerm2"
  activate
  set newWindow to (create window with profile "TagTime" command "$@")

  delay 1
  repeat while exists newWindow
    delay 1
  end repeat
end tell
EOF

Then in TagTime’s launch.pl, replace $XT ... ${path}ping.pl $t with iterm2-tagtime ${path}ping.pl $t, and similarly for the other use of $XT a few lines later.

4 Likes

Thanks so much for posting these instructions! I needed to get rid of xterm and this has been working like a charm for me. I don’t understand what the delay-1’s and repeat-while-exists are accomplishing but it didn’t seem to work without them so I’m now following your instructions to the letter and all is good. :slight_smile:

The user can choose other shells available with macOS, such as the Korn shell, tcsh, and zsh.