Last active
August 29, 2015 14:17
-
-
Save saw/d826c410c6c7f75d27ba to your computer and use it in GitHub Desktop.
Switch iterm2 profile per host
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
# 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