iterm color, translucent and specifications provided under mac

iterm color, translucent and specifications provided under mac 

 

 

iterm color, translucent and specifications provided under mac

Original Source link: https://blog.csdn.net/thatway_wp/article/details/79442177

To achieve the primary color highlighting the entire command line command window translucent effect.

1, the color theme package download

  • 1, http://iterm2colorschemes.com/
    download, unzip, into iterm2, the upper left corner iTerm2-> preferences-> Profiles, the right panel to find the Colors option to expand the lower right corner Color Presets ..., pulled the bottom, select import, All .itermcolors file to download, unzip under schemes under good color theme pack import, and then expand the colors drop-down list import is complete, you can choose a different color templates.

  • 2, only download solarized color template
    item2 comes in like this color template, the import and called Solarized Dark Solarized Light.
    http://ethanschoonover.com/solarized
    find download, download, unzip, file import .itermcolors iterm2-colors-solarized folder in the same manner as above.

Usually with Solarized Dark can be.

2, modify the configuration file

sudo vim /etc/profile
 
  • 1

This time if there is a permissions problem, sudo chmod 644 / etc / profile
in the document added:

find_git_branch () {

local dir=. head

until [ "$dir" -ef / ]; do

if [ -f "$dir/.git/HEAD" ]; then

head=$(< "$dir/.git/HEAD")

if [[ $head = ref:\ refs/heads/* ]]; then

git_branch=" (${head#*/*/})"

elif [[ $head != '' ]]; then

git_branch=" → (detached)"

else

git_branch=" → (unknow)"

fi

return

fi

dir="../$dir"

done

git_branch=''

}

PROMPT_COMMAND="find_git_branch; $PROMPT_COMMAND"

black=$'\[\e[1;30m\]'

red=$'\[\e[1;31m\]'

green=$'\[\e[1;32m\]'

yellow=$'\[\e[1;33m\]'

blue=$'\[\e[1;34m\]'

magenta=$'\[\e[1;35m\]'

cyan=$'\[\e[1;36m\]'

white=$'\[\e[1;37m\]'

normal=$'\[\e[m\]'

PS1="$white[$white@$green\h$white:$cyan\W$yellow\$git_branch$white]\$ $normal"
 

Configuration take effect immediately:

source /etc/profile
 

 

This time should have color displays.

3, transparency

Transparency, iterm2 in the upper left corner iTerm2-> preferences-> Profiles, the right side to find the window tab, and drag Transparency adjustment.

4, mounted oh-my-zsh

  • Installation oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
 

 

Zsh modify configuration files

vi ~/.zshrc
 

 

ZSH_THEME = "robbyrussell" changed to ZSH_THEME = "agnoster"
restart items

  • Install fonts
# clone 先克隆
git clone https://github.com/powerline/fonts.git
# install 后安装
cd fonts
./install.sh
 

 

iterm2 in the upper left corner iTerm2-> preferences-> Profiles, right side of the text tab Font and Non-ASCII Font are set to
Meslo LG S DZ Regular for Powerline font.
Restart items

5, syntax highlighting plugins

$ cd到.zshrc所在目录
$ git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
$ 打开 ~/.zshrc
# 添加下面的语句到.zshrc文件末尾
  source XXX/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# 注意:xxx代表zsh-syntax-highlighting所在目录
# 再次打开.zshrc文件,在最后面添加下面内容
  plugins=(zsh-syntax-highlighting)
# 启用命令纠错功能
  ENABLE_CORRECTION="true"

6. Other settings

Setting the menu bar position and themes appear: iTerm2-> preferences-> Profiles-> Appearance
Write pictures described here

Set iterm appear position: iTerm2-> preferences-> Profiles-> window
Write pictures described here

Set to show and hide the hot keys (option + space): iTerm2-> preferences-> Profiles-> window
Write pictures described here

After setting, can be switched by option + space iterm2 display and hide.


final effect:
Write pictures described here

as iTerm for 2 color scheme (oh-my-zsh & Powerline )

Guess you like

Origin www.cnblogs.com/chongdongxiaoyu/p/11389712.html