效果预览:
注意事项:需要oh-my-zsh请自行安装.
安装该主题需要的字体文件
cd ~
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
cd ..
rm -rf fonts
修改 zsh 配置
vim ~/.zshrc
# 修改这里切换主题
#ZSH_THEME="robbyrussell"
ZSH_THEME="agnoster"
source ~/.zshrc
打开vim ~/.oh-my-zsh/themes/agnoster.zsh-theme
找
prompt_context() {
if [[ "$USERNAME" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m"
fi
}
改
prompt_context() {
if [[ "$USERNAME" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
#prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m"
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}
打开iterm2设置->配置文件->颜色
打开iterm2设置->配置文件->文本
完成
Macos自带终端设置参考:https://blog.csdn.net/toopoo/article/details/85301389
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)