Install zsh
The powerlevel10k
package is based on the zsh
package, so we have to install the zsh
first.
brew install zsh
sudo apt-get install zsh
Install Oh My Zsh
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Install Nerd fonts
We can use the powerlevel10k recommend fonts MesloLGS NF
to display our terminal fonts
After downloading the font on Mac. You can click the font file and click the Install Font
button on the bottom to install the fonts.
Setting iTerm2 Fonts
You can press the Shift + Ctrl + , (comma)
to open the setting on the Windows Terminal
. Or you can click the right mouse to show the menu, and click Setting
items to show the setting page on the Windows Terminal.
You can click the preference
on the iTerm2
. Click Profile
> Text
tab, and setting the Font
to the MesloLGS NF
Download powerlevel10k to Oh My Zsh themes
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Setting ZSH themes to powerlevel10k/powerlevel10k
Edit the ~/.zshrc
file. And set the ZSH_THEME
variable to the powerlevel10k/powerlevel10k
vim ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
After update the zsh themes variable, you have to re-login the wsl
to activate the zsh setting
Setting powerlevel10k
Run the p10k configure
command to setup the themes that you want on the powerlevel10k
p10k configure
After setting powerlevel10k finish, you can start to use a powerful and beautiful Windows Terminal. And you can run the p10k configure
command to change the powerlevel10k themes
anytime
Hint
If you haven’t set powerlevel10k themes yet. It will show the setting hint when you open the Windows Terminal on wsl every time.
If you want to close the hint message. You can type the following command to close the hint.
echo 'POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true' >>! ~/.zshrc
Reference
- GitHub - romkatv/powerlevel10k: A Zsh theme
- Oh My Zsh - a delightful & open source framework for Zsh
- GitHub - ryanoasis/nerd-fonts: Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
- 【分享】Oh My Zsh + powerlevel10k 快速打造好看好用的 command line 環境 | by Holy | Medium
- 在 Windows 使用 WSL2 操作 Ubuntu 系統
- How to change default font face on Windows Terminal - Pureinfotech
- The Missing Package Manager for macOS (or Linux) — Homebrew
Donate KJ 贊助作者喝咖啡
如果這篇文章對你有幫助的話,可以透過下面支付方式贊助作者喝咖啡,如果有什麼建議或想說的話可以贊助並留言給我
If this article has been helpful to you, you can support the author by treating them to a coffee through the payment options below. If you have any suggestions or comments, feel free to sponsor and leave a message for me!
方式 Method | 贊助 Donate |
PayPal | https://paypal.me/kejyun |
綠界 ECPay | https://p.ecpay.com.tw/AC218F1 |
歐付寶 OPay | https://payment.opay.tw/Broadcaster/Donate/BD2BD896029F2155041C8C8FAED3A6F8 |