Useful script: TerminalDecorator
For work, I often have to connect to servers using ssh, using separate Terminal windows for each session. It's sometimes hard to tell the windows apart though, as they all look the same at first glance, opening the door to mistakes like recreating the test database on the production server. :-) (No, I haven't actually done that yet. *knocks on wood*)
I often found myself wishing for a more obvious cue as to which windows are "local" and which ones are ssh connections. Maybe by using a different background color?
Luckily, I found a tool that does just that: TerminalDecorator. (A serendipitous find -- I was actually looking for a Scheme language module for TextWrangler, which can be downloaded on the same page.)
It's fairly easy to set up:
- Copy the TerminalDecorator script to e.g. ~/Library/Scripts
- In your .profile, alias ssh to /Users/name/Library/Scripts/TerminalDecorator
- Edit TerminalDecorator (it's a Python script) and associate domain names with colors in the scheme_map dictionary
And voila, now my ssh sessions have different colors, hopefully putting an extra barrier between me and catastrophic failure. ;-) OK, so it's not spectacular, but I find it *very* useful.