I have recently switched over to iTerm2 and love it. I am wondering though if there is a way to use profiles to correspond to what environment/specific machine you are on.
step 1:
custom your iterm profile, e.g. dark
, light
step 2:
add code before to your shell profile, e.g .bashrc or .zshrc
# Change iterm2 profile. Usage it2prof ProfileName (case sensitive)
it2prof() { echo -e "\033]50;SetProfile=$1\a" }
step 3:
make sense your profile
exec $SHELL -l
step 4:
toggle your iterm theme profile
it2prof dark
it2prof light