Skip to content

Instantly share code, notes, and snippets.

View romanki's full-sized avatar

Roman Kirilenko romanki

View GitHub Profile
@romanki
romanki / colors.zsh
Last active September 3, 2023 23:51
iTerm2 automatic colors depending of environment.
# Usage:
# Script is prepared for zsh,
# put it to ~/.oh-my-zsh/custom/colors.zsh
function reset_tab() {
echo -e "\033]50;SetProfile=Default\a"
trap - INT EXIT
}
@romanki
romanki / context_colors.zsh
Created June 13, 2019 09:56
iTerm2 automatic color switching for different k8s contexts with kubectx
function reset_tab() {
echo -e "\033]50;SetProfile=Default\a"
}
function color {
case $1 in
green)
echo -e "\033]6;1;bg;red;brightness;57\a"
echo -e "\033]6;1;bg;green;brightness;197\a"
echo -e "\033]6;1;bg;blue;brightness;77\a"