Timeline

2025-10-20

init


environment

Note: FiraCode Nerd Font is used in WSL.

zsh Installation

1
2
3
4
5
6
sudo pacman -Sy zsh
# Change default shell to zsh
chsh -s /bin/zsh
# Install oh-my-zsh
wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
sh install.sh

Configuration

Migrate from bashrc

Copy your previous .bashrc configuration to .zshrc:

1
2
3
4
5
alias grep='grep --color=auto'
alias ll="ls -alF"
alias ls="exa --icons"

source /home/zhaohang/.env.sh

Theme

1
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Set in ~/.zshrc:

1
ZSH_THEME="powerlevel10k/powerlevel10k"

Then:

1
source ~/.zshrc

Follow the prompts to complete setup.

Plugins

zsh-autosuggestions

1
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

zsh-syntax-highlighting

1
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Set in ~/.zshrc:

1
plugins=(git zsh-autosuggestions zsh-syntax-highlighting z extract web-search)

Then:

1
source ~/.zshrc

Result

zsh+tmux