Powerlevel10k
Fast Zsh theme with extensive customization options.
Official WebsiteFeatures
Why use Powerlevel10k?
Instant Prompt
The prompt appears immediately, allowing you to start typing without waiting for shell startup. Dramatically improves perceived speed.
Configuration wizard
Interactive configuration wizard lets you visually select styles and display items. No need to edit config files directly.
Flexible styles
Many styles available: Rainbow, Classic, Lean, and more. Unicode-compatible so it works without Nerd Font.
Transient Prompt
Shows past prompts in simplified form, keeping the terminal clean while improving scrollback readability.
Installation
Installation methods differ depending on whether you're using it with Oh My Zsh or standalone.
Using with Oh My Zsh
# Clone the repository
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Set theme in ~/.zshrc
# ZSH_THEME="powerlevel10k/powerlevel10k"Install with Homebrew
# Install with Homebrew
brew install powerlevel10k
# Add to ~/.zshrc
echo 'source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme' >> ~/.zshrcManual installation
# Clone the repository
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
# Add to ~/.zshrc
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >> ~/.zshrcShell Configuration
After installation, restarting your terminal will automatically launch the configuration wizard.
Running the configuration wizard
# Manually launch the configuration wizard
p10k configureItems you can select in the wizard
- Font: Choose from Nerd Font, Powerline, Unicode, or ASCII
- Style: Choose from Lean, Classic, Rainbow, or Pure
- Character set: With or without Unicode symbols
- Prompt format: 1-line or 2-line, with or without connectors
- Display items: Time, Git info, language versions, and more
- Instant Prompt: Recommended to enable
- Transient Prompt: Simplify past prompts
Instant Prompt configuration
When Instant Prompt is enabled, the following code is added at the beginning of ~/.zshrc.
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fiCustomization
Settings are saved in ~/.p10k.zsh. After basic configuration with the wizard, you can edit this file directly for fine-tuning.
Configure display elements
# ~/.p10k.zsh
# Elements to display on the left
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
os_icon # OS icon
dir # Current directory
vcs # Git info
newline # Newline
prompt_char # Prompt character
)
# Elements to display on the right
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
status # Exit status
command_execution_time # Command execution time
background_jobs # Background jobs
direnv # direnv status
node_version # Node.js version
go_version # Go version
rust_version # Rust version
python_env # Python virtual environment
kubecontext # Kubernetes context
aws # AWS profile
time # Current time
)Git display customization
# ~/.p10k.zsh
# Git branch icon
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=' '
# Staged changes display
typeset -g POWERLEVEL9K_VCS_STAGED_ICON='✚'
# Untracked files display
typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='●'
# Modified display
typeset -g POWERLEVEL9K_VCS_UNSTAGED_ICON='●'
# Clean state background color
typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND='green'
# Modified state background color
typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='yellow'Command execution time configuration
# ~/.p10k.zsh
# Minimum execution time to display (milliseconds)
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
# Decimal precision
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=2
# Background color
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND='yellow'
# Foreground color
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND='black'Prompt examples
Examples of Powerlevel10k prompt styles.
Rainbow style
Colorful and information-rich style. Requires Powerline Font or Nerd Font.
Classic style
Simple and easy-to-read style.
Lean style
Minimal style showing only essential information.
Git status detailed display
Shows staging state, untracked files, ahead/behind, and more.
Git status symbol meanings
✚Staged●Modified?Untracked⇡ahead⇣behind⇕diverged✖Deleted»RenamedTips
Install Nerd Font
For the best experience, we recommend installing the MesloLGS NF font (recommended by the author).
# macOS (Homebrew)
brew tap homebrew/cask-fonts
brew install font-meslo-lg-nerd-font
# Or download manually
# https://github.com/romkatv/powerlevel10k#fontsReset configuration
If you want to reconfigure, delete the config file and reconfigure.
# Delete the config file
rm ~/.p10k.zsh
# Re-run the configuration wizard
p10k configureTemporarily simplify prompt
When Transient Prompt is enabled, the prompt is simplified after pressing Enter.
# ~/.p10k.zsh
# Enable Transient Prompt
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
# Options: always, same-dir, offHot Reload
After editing ~/.p10k.zsh, changes take effect after runningsource ~/.p10k.zsh or opening a new terminal. The configuration wizard p10k configure can be re-run at any time.
Using in VS Code terminal
If using in VS Code's terminal, change the font family toMesloLGS NF in settings. You can change it via the terminal.integrated.fontFamily setting.