As a nice change, todays snippet is an Applescript. A long time ago I adopted iTerm as a replacement for Apple’s Terminal. Amongst it’s vast array of features is Applescript support, the “Auto Launch” feature in particular.
By placing an aptly named “AutoLaunch.scpt” in ~/Library/Application\ Support/iTerm, iTerm will automatically run the script on start-up.
Useful if you utilise multiple tabs or sessions and immediately jump to various directories or connect to (single or multiple) shell sessions.
The example script will open three panes, one vertically and two horizontally, cd to my local environment (an alias) in the main pane, cd in the secondary pane to my virtual environment (another alias) and leaves the third pane as is which I use for “everything else”.