终端
iTerm2
官方地址:iterm2.com
brew 安装
bash
brew install iterm2
Oh My Zsh
终端美化工具
官方地址:ohmyz.sh
安装命令
Github 镜像(不推荐,需要科学上网)
bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
国内镜像(推荐)
bash
sh -c "$(curl -fsSL https://chenzhenhu.com/script/ohmyzsh-install.sh)"
安装字体
Meslo LGM NF (推荐)
bash
brew tap homebrew/cask-fonts
brew install --cask font-meslo-lg-nerd-font
安装主题
powerlevel10k (推荐)
bash
brew install powerlevel10k
echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
# 重启 zsh
exec zsh
配置主题
TIP
此时会显示主题配置界面,按照自己喜好配置即可,配置的第一步是安装字体,字体上面已经安装过了,这步可以跳过 n。想重新打开配置界面,在终端输入
p10k configure
将需要回答一些问题:
┌ This is Powerlevel10k configuration wizard. It will ask you a few questions and
configure your prompt.
│
◇ Install Meslo Nerd Font??
│ Choice [ynq]: n
│
◇ Does this look like a diamond (rotated square)?
│ Choice [ynrq]: y
│
◇ Does this look like a lock?
│ Choice [ynrq]: y
│
◇ Does this look like an upwards arrow?
│ Choice [ynrq]: y
│
◇ What digit is the downwards arrow pointing at?
│ Choice [123rq]: 1
│
◇ Do all these icons fit between the crosses?
│ Choice [ynrq]: y
│
◇ Prompt Style
│ Choice [1234rq]: 3
│
◇ Character Set
│ Choice [12rq]: 1
│
◇ Show current time?
│ Choice [n12rq]: 2
│
◇ Prompt Separators
│ Choice [1234rq]: 1
│
◇ Prompt Heads
│ Choice [1234rq]: 2
│
◇ Prompt Tails
│ Choice [12345rq]: 2
│
◇ Prompt Height
│ Choice [12rq]: 2
│
◇ Prompt Connection
│ Choice [123rq]: 3
│
◇ Prompt Frame
│ Choice [1234rq]: 4
│
◇ Connection & Frame Color
│ Choice [1234rq]: 4
│
◇ Prompt Spacing
│ Choice [12rq]: 2
│
◇ Icons
│ Choice [12rq]: 1
│
◇ Prompt Flow
│ Choice [12rq]: 1
│
◇ Enable Transient Prompt?
│ Choice [ynrq]: n
│
◇ Instant Prompt Mode
│ Choice [123rq]: 1
│
◆ Powerlevel10k config file already exists.Overwrite ~/.p10k.zsh?
│ Choice [ynrq]: y
│
└