fixes/zsh.md
2026-10-01 00:31:26 +03:00

3.1 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

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:

  1. Open Settings > configure konsole > profiles > new > change command to /usr/bin/zsh
  2. Go to Appearance
  3. Change the terminal font: Choose:
  4. Select the installed MesloLGS Nerd Font
  5. Apply the changes
  6. 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

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