1. 下载 powerlevel10k 主题
git clone –depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
2. vim .zshrc
Set ZSH_THEME="powerlevel10k/powerlevel10k"
3. 重新打开一个新的终端 common+n
This is Powerlevel10k configuration wizard. You are seeing it because you haven't
defined any Powerlevel10k configuration options. It will ask you a few questions
and configure your prompt.
Install Meslo Nerd Font?
(y) Yes (recommended).
(n) No. Use the current font.
(q) Quit and do nothing.
Choice [ynq]:
选择 ‘y’ 等待下载字体. 下载完之后推出终端 common+q
This is Powerlevel10k configuration wizard. You are seeing it because you haven't
defined any Powerlevel10k configuration options. It will ask you a few questions and
configure your prompt.
Does this look like a diamond (rotated square)?
reference: https://graphemica.com/%E2%97%86
---> <---
(y) Yes.
(n) No.
(q) Quit and do nothing.
Choice [ynq]:
选择 y
Does this look like a lock?
reference: https://fontawesome.com/icons/lock
---> <---
(y) Yes.
(n) No.
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [ynrq]:
y
Choice [ynrq]:
Does this look like a Debian logo (swirl/spiral)?
reference: https://debian.org/logos/openlogo-nd.svg
---> <---
(y) Yes.
(n) No.
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [ynrq]:
y
Do all these icons fit between the crosses?
---> XXXXXXXXX <---
(y) Yes. Icons are very close to the crosses but there is no overlap.
(n) No. Some icons overlap neighbouring crosses.
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [ynrq]:
y
Prompt Style
(1) Lean.
~/src master 5s
❯
(2) Classic.
╭─ ~/src master 5s ─╮
╰─ ─╯
(3) Rainbow.
╭─ ~/src master 5s ─╮
╰─ ─╯
(4) Pure.
~/src master 5s
❯
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [1234rq]:
3
Character Set
(1) Unicode.
╭─ ~/src master 5s ─╮
╰─ ─╯
(2) ASCII.
~/src master 5s
>
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [12rq]:
1
Show current time?
(1) No.
╭─ ~/src master 5s ─╮
╰─ ─╯
(2) 24-hour format.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(3) 12-hour format.
╭─ ~/src master 5s 04:23:42 PM ─╮
╰─ ─╯
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [123rq]:
2
Prompt Separators
separator
(1) Angled. /
/
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(2) Vertical.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(3) Slanted.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(4) Round.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [1234rq]:
1
Prompt Heads
head
(1) Sharp. |
v
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(2) Blurred.
╭─ ~/src master ▓▒░ ░▒▓ 5s 16:23:42 ─╮
╰─ ─╯
(3) Slanted.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(4) Round.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [1234rq]:
1
Prompt Tails
tail
(1) Flat. |
v
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(2) Blurred.
╭─░▒▓ ~/src master 5s 16:23:42 ▓▒░─╮
╰─ ─╯
(3) Sharp.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(4) Slanted.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(5) Round.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [12345rq]:
5
Prompt Height
(1) One line.
~/src master 5s 16:23:42
(2) Two lines.
╭─ ~/src master 5s 16:23:42 ─╮
╰─ ─╯
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [12rq]:
1
Prompt Spacing
(1) Compact.
~/src master 5s 16:23:42
~/src master 5s 16:23:42
(2) Sparse.
~/src master 5s 16:23:42
~/src master 5s 16:23:42
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [12rq]:
1
Icons
(1) Few icons.
~/src master 5s 16:23:42
(2) Many icons.
~/src master 5s 16:23:42
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [12rq]:
2
Prompt Flow
(1) Concise.
~/src master 5s 16:23:42
(2) Fluent.
~/src on master took 5s at 16:23:42
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [12rq]:
2
Enable Transient Prompt?
(y) Yes.
❯ git pull
❯ git branch x
~/src on master git checkout x
(n) No.
~/src on master git pull
~/src on master git branch x
~/src on master git checkout x
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [ynrq]:
y
Instant Prompt Mode
https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt
(1) Verbose (recommended).
(2) Quiet. Choose this if you've read and understood instant prompt documentation.
(3) Off. Choose this if you've tried instant prompt and found it incompatible with your
zsh configuration files.
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [123rq]:
1
Apply changes to ~/.zshrc?
(y) Yes (recommended).
(n) No. I know which changes to apply and will do it myself.
(r) Restart from the beginning.
(q) Quit and do nothing.
Choice [ynrq]:
解决 termianl 终端乱码的问题
terminal -> 偏好设置 -> 描述文件 -> 字体 更改为 MesloLGS NF
4. 安装 tree
保证安装了 node
npm install -g tree-cli
正文完