-
-
Save dctucker/94e466b0cc99fc0e202f4c1d56f5631a to your computer and use it in GitHub Desktop.
Change iTerm2 tab color when using SSH
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
# Usage: | |
# source tabcolor.sh 96 96 192 | |
# iTerm2 window/tab color commands | |
# Requires iTerm2 >= Build 1.0.0.20110804 | |
# http://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes | |
rgb() { | |
echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
echo -ne "\033]6;1;bg;green;brightness;$2\a" | |
echo -ne "\033]6;1;bg;blue;brightness;$3\a" | |
} | |
reset() { | |
echo -ne "\033]6;1;bg;*;default\a" | |
} | |
if [ '$1' == 'reset' ]; then | |
reset | |
else | |
rgb $@ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment