Last active
January 18, 2016 03:44
-
-
Save ezza/61966bdc2d46183e937d to your computer and use it in GitHub Desktop.
Colourify SSH terminal sessions
This file contains hidden or 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
# Add this to ~/.profile | |
function tabc() { | |
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi # if you have trouble with this, change | |
# "Default" to the name of your default theme | |
echo -e "\033]50;SetProfile=$NAME\a" | |
} | |
function colorssh() { | |
tabc SSH | |
ssh $* | |
tabc | |
} | |
function colorvagrantssh() { | |
tabc Vagrant | |
vagrant ssh $* | |
tabc | |
} | |
alias vssh="colorvagrantssh" | |
alias ssh="colorssh" | |
# Then configure iterm2 as shown in the screenshots |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Configure iTerm2 with three profiles named like this:
Configure the Background Color option to something meaningful (I use dull red for SSH and dull green for Vagrant). In the works is blue for beta servers.