iTerm Tab Color

Oh My Zsh plugin for setting iTerm2's custom tab colors

30 stars
2 forks

Oh My Zsh Plugin for Setting iTerm2 Custom Tab Colors


cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/bernardop/iterm-tab-color-oh-my-zsh.git iterm-tab-color

Enable it by adding iterm-tab-color to your plugins array in $HOME/.zshrc

plugins=(git iterm-tab-color)


Explicitly using the command

After adding it to your plugins and restarting your current terminal you'll have a new alias available tc

Passing separate Red, Green, Blue values

tc 255 198 0

Passing a Hex value

tc '#0078ae`

- or -

tc 0078ae

Set tab color based on current working directory or current command

You can modify the .tc-config file located in ~/.oh-my-zsh/custom/plugins/iterm-tab-color and add directory=hexValue or command=hexValue pairs to automatically set the color of your tab to hexValue when your current working directory matches directory or the current executing command matches command (you can use regular expressions)

Example .tc-config file