Skip to content

Instantly share code, notes, and snippets.

Created December 11, 2015 12:36
What would you like to do?
Iterm2 - ssh change background color when in production
# .bash_profile
# Copy this file on the desired machine.
# This script will change your iterm tab color and the background for that tab.
# Requirements
# - iterm as terminal
# - a profile named Prod in iterm. You can configure it how ever you want. A profile can be found in Preferences -> Profiles
# Set tab color to red
echo -e "\033]6;1;bg;red;brightness;255\a"
# Set window profile ( in my case, Prod profile will make the background red)
echo -e "\033]50;SetProfile=Prod\a"
Copy link

nice.. but when exiting the SSH session the window remains red. . did I miss a return to original state setting?

Copy link

Thats easy, add the opersit to your .bash_logout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment