I often have several terminal sessions going - a "man" page window for reading about some command that I'm trying to use in another window, a "top" window showing current processes, and perhaps an "ssh" window for connecting to another host. By default, each window has the same properties - title, background, font size and color, etc. This can make it somewhat tricky to remember which window is which.
However, Terminal has a "save" command which will let you save the changes in any given window to a file. This lets you set up customized looks for different tasks. Simply open a window, set all the properties you like, then hit Save and give it a name and location. Now, when you double-click that file in the finder, that window will open with your customzized settings. I've set custom titles, fonts, and colors for my main 'terminal' tasks (top, ssh, man, and general default) and saved them each for quick and easy access.
Since my 'top' window is always running top, wouldn't it be nice if you could just double-click the terminal file and have top come up already running? Thanks to a tip on the X4U mailing list, you can! Read the rest of the article for the details.
The hack is actually quite simple, and will work with any application you'd like to launch on window opening. This example will show you how to set the 'top' window to run automatically, but its easy to change to anything else you may want (emacs, vi, whatever).In the terminal, go to where you saved your customized terminal file. Open it with your favorite editor, and search for "Shell" (with the capital). You'll see two lines that look like this:
<key>Shell</key>All you need to do is replace /bin/tcsh with the full path (and options) for the command you want run. So in my 'top' window, I have /usr/bin/top -u on the second line. You could easily set the command to launch vi or emacs or run an alias you have stored to connect to a remote host.
<string>/bin/tcsh</string>
Mac OS X Hints
http://hints.macworld.com/article.php?story=20010425092512566