Skip to content

Instantly share code, notes, and snippets.

@rpetrich
Created April 7, 2011 13:02
Show Gist options
  • Save rpetrich/907740 to your computer and use it in GitHub Desktop.
Save rpetrich/907740 to your computer and use it in GitHub Desktop.
Changes the terminal settings when calling SSH
#!/bin/sh
function tabc {
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi
osascript -e "tell application \"Terminal\" to set current settings of front window to settings set \"$NAME\""
}
function ctrl_c() {
tabc "Visor"
exit -1
}
trap ctrl_c INT
tabc "Visor SSH"
/usr/bin/ssh $*
STATUS=$?
tabc "Visor"
exit $STATUS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment