Skip to content

Instantly share code, notes, and snippets.

@otang
Created October 31, 2013 17:10
Show Gist options
  • Save otang/7253368 to your computer and use it in GitHub Desktop.
Save otang/7253368 to your computer and use it in GitHub Desktop.
Change your terminal colour when SSH'ing, and change it back when done.
#!/bin/sh
tabc() {
NAME=$1; if [ -z "$NAME" ]; then NAME="Basic"; fi
osascript -e "tell application \"Terminal\" to set current settings of front window to settings set \"$NAME\""
}
tabc SSH # switch to theme with name
/usr/bin/ssh "$@" # run ssh
tabc Monokai # switch to default theme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment