mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
iTerm2 Plugin: Add functions to change tab color
This commit is contained in:
parent
0a794cc1fd
commit
117b521b4d
1 changed files with 18 additions and 0 deletions
|
|
@ -47,4 +47,22 @@ if [[ "$OSTYPE" == darwin* ]] && [[ -n "$ITERM_SESSION_ID" ]] ; then
|
||||||
ITERM_PROFILE="$profile"
|
ITERM_PROFILE="$profile"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
# iterm2_tab_color(): Changes the color of iTerm2's currently active tab.
|
||||||
|
# Usage: iterm2_tab_color <red> <green> <blue>
|
||||||
|
# where red/green/blue are on the range 0-255.
|
||||||
|
function iterm2_tab_color() {
|
||||||
|
_iterm2_command "6;1;bg;red;brightness;$1"
|
||||||
|
_iterm2_command "6;1;bg;green;brightness;$2"
|
||||||
|
_iterm2_command "6;1;bg;blue;brightness;$3"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
# iterm2_tab_color_reset(): Resets the color of iTerm2's current tab back to
|
||||||
|
# default.
|
||||||
|
function iterm2_tab_color_reset() {
|
||||||
|
_iterm2_command "6;1;bg;*;default"
|
||||||
|
}
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue