Skip to content

Instantly share code, notes, and snippets.

@saw
Last active August 29, 2015 14:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saw/d826c410c6c7f75d27ba to your computer and use it in GitHub Desktop.
Save saw/d826c410c6c7f75d27ba to your computer and use it in GitHub Desktop.
Switch iterm2 profile per host
# for this to work you need to create
# a profile for each host, or set of hosts or whatever.
# to make sure it is always current add this to your
# PROMPT_COMMAND so it runs every time, rather just at login.
if [ "$HOSTNAME" = "myhost1" ]; then
echo -ne "\033]50;SetProfile=myhost1\007"
fi
if [ "$HOSTNAME" = "myhost2" ]; then
echo -ne "\033]50;SetProfile=myhost2\007"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment