Archlinux Zsh terminal beautifies powerlevel10k configuration



Arch Linux + KDE Plasma

Install Zsh

yay -S zsh

Change default terminal

chsh -s /bin/zsh

Install oh my ZSH Git

Archlinuxcn source has a good package, or use AUR to install.

yay -S oh-my-zsh-git

Default configuration

cp /usr/share/oh-my-zsh/zshrc ~/.zshrc

When you open the terminal software, you should enter Zsh by default

Install plug-ins

Autojump jump directory

yay -S autojump

Command highlighting and automatic suggestion completion

yay -S zsh-syntax-highlighting zsh-autosuggestions

These two plug-ins are Zsh plug-ins, which can not be configured in the above way, because oh my Zsh cannot find these two plug-ins. For this reason, we need to do some special processing, create the symbols of these two plug-ins and link them to the oh my Zsh custom plug-in directory

sudo ln -s /usr/share/zsh/plugins/zsh-syntax-highlighting /usr/share/oh-my-zsh/custom/plugins/
sudo ln -s /usr/share/zsh/plugins/zsh-autosuggestions /usr/share/oh-my-zsh/custom/plugins/

Plug in configuration

Similarly, open the. Zshrc file, find plugins = (GIT), and add the plug-in you want here. Use space or newline to separate the names of multiple plug-ins (comma is not allowed).
vim ~/.zshrc


Install powerlevel10k style

Install nerd fonts

Download Fonts

mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf"

Cache fonts

fc-cache -vf ~/.local/share/fonts/

Check whether the installation is successful

fc-list | grep -i droid
/home/kylin/.local/share/fonts/Droid Sans Mono for Powerline Nerd Font Complete.otf: DroidSansMonoForPowerline Nerd Font:style=Book

Set terminal font


Download powerlevel10k

git clone --depth=1 ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k

Modify Zsh theme


source ~/.zshrc

Restart the terminal to enter the configuration p10k
**p10k configureTo access the built-in configuration wizard directly from the terminal **


matters needing attention

Only one line will be displayed after successful configuration

Instant prompt mode select off