Forked from NapoleonWils0n/change colour on ssh connections.sh
Created
November 30, 2013 07:38
-
-
Save tzarskyz/7716409 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this code goes in your .bash_profile | |
# change colour on ssh connections and then back to the default theme | |
function tabc { | |
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi | |
osascript -e "tell application \"Terminal\" | |
set myWindow to front window | |
set myTab to selected tab of myWindow | |
try | |
set current settings of myTab to settings set \"$NAME\" | |
end try | |
end tell" | |
} | |
function ssh { | |
tabc "Homebrew ssh" | |
/usr/bin/ssh "$@" | |
tabc "Homebrew" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment