1. Random Color for iTerm Tabs

    Add following in $HOME/.zshrc

    function color {
      case $1 in
        random)
          t=$((( RANDOM % 256 ) ))
          echo -e "\033]6;1;bg;red;brightness;${t}\a"
          t=$((( RANDOM % 256 ) ))
          echo -e "\033]6;1;bg;green;brightness;${t}\a"
          t=$((( RANDOM % 256 ) ))
          echo -e "\033]6;1;bg;blue;brightness;${t}\a …
    Tagged as : iterm shell

Page 1 / 1