3.4 KiB
3.4 KiB
Set Up Zsh with Powerlevel10k
1. Install Everything
Install Zsh, Powerlevel10k, plugins, and the Meslo Nerd Font:
yay -S zsh zsh-theme-powerlevel10k zsh-autosuggestions zsh-syntax-highlighting ttf-meslo-nerd-font-powerlevel10k
2. Change Your Default Shell to Zsh
chsh -s /bin/zsh
Important: Log out of your account and log back in for the change to take effect.
3. Configure Konsole Font
In Konsole:
- Open Settings > configure konsole > profiles > new > change command to /usr/bin/zsh
- Go to Appearance
- Change the terminal font: Choose:
- Select the installed MesloLGS Nerd Font
- Apply the changes
- make your new profile default: Set as Default
The Nerd Font is required for Powerlevel10k's icons and symbols to display correctly.
4. Configure ~/.zshrc
Open your Zsh configuration:
nano ~/.zshrc
Paste the following:
# ─────────────────────────────────────
# Powerlevel10k
# ─────────────────────────────────────
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
# ─────────────────────────────────────
# Plugins
# ─────────────────────────────────────
# Autosuggestions
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
# Syntax highlighting
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# ─────────────────────────────────────
# Powerlevel10k configuration
# ─────────────────────────────────────
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# ─────────────────────────────────────
# Completion
# ─────────────────────────────────────
autoload -Uz compinit
compinit
setopt CORRECT
setopt AUTO_CD
zstyle ':completion:*' completer _complete _approximate
zstyle ':completion:*' menu select
# ─────────────────────────────────────
# History
# ─────────────────────────────────────
HISTFILE="$HOME/.zsh_history"
SAVEHIST=10000
setopt APPEND_HISTORY
setopt SHARE_HISTORY
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_SPACE
# ─────────────────────────────────────
# Manual to pdf
# ─────────────────────────────────────
manual() { man -Tpdf "$1" | okular -; }
4. Configure Powerlevel10k
Start Zsh:
zsh
This launches the Powerlevel10k configuration wizard.
You can re-run it at any time with:
p10k configure
Your configuration will be saved to:
~/.p10k.zsh
Useful Commands
Reconfigure Powerlevel10k:
p10k configure
Reload your Zsh configuration without restarting the shell:
source ~/.zshrc
Start Zsh manually:
zsh