Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/romkatv/powerlevel10k/llms.txt

Use this file to discover all available pages before exploring further.

Every piece of information displayed in your Powerlevel10k prompt is a segment. Segments are composable, independently styled units — each one can display things like the current directory, Git status, active Python environment, or Kubernetes context. You choose exactly which segments appear and in what order by editing two arrays in ~/.p10k.zsh.

The Segment Arrays

POWERLEVEL9K_LEFT_PROMPT_ELEMENTS controls the left side of the prompt, and POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS controls the right side. Both are standard Zsh arrays where each element is either a segment name or the special newline pseudo-segment.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
  # =========================[ Line #1 ]=========================
  dir                     # current working directory
  vcs                     # git status
  # =========================[ Line #2 ]=========================
  newline                 # \n — start a new prompt line
  prompt_char             # ❯ prompt symbol
)

typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
  # =========================[ Line #1 ]=========================
  status                  # exit code of the last command
  command_execution_time  # duration of the last command
  background_jobs         # background job indicator
  kubecontext             # current kubernetes context
  # ...
  # =========================[ Line #2 ]=========================
  newline
)

The newline Pseudo-Segment

Placing newline anywhere in an elements array splits the prompt at that point and continues on the next terminal line. Multi-line prompts give you more horizontal room for typing while still showing rich context information above. Transient prompt (configured separately) works especially well with two-line layouts.

Right Prompt Auto-Hiding

The right prompt on the last prompt line automatically hides when your typed command grows long enough to reach it — Powerlevel10k detects the overlap and removes the right segment row before it collides. Right prompt lines above the last line hide if they would overlap the corresponding left prompt line.

Adding, Removing, and Reordering Segments

Open ~/.p10k.zsh in your editor. The file generated by p10k configure has all commonly useful segments listed, with uncommented entries for enabled ones and commented entries (# segment_name) for disabled ones.
  • Enable a segment: remove the # before its name in the array.
  • Disable a segment: add # before its name, or delete the line entirely.
  • Reorder segments: move the name to the desired position within the array.
For most parameter changes in ~/.p10k.zsh, running source ~/.p10k.zsh applies them immediately to your current Zsh session without restarting. If you modify POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS in an already-running interactive shell (rather than in the file), run p10k reload to pick up the changes.

Built-in Segments Reference

Powerlevel10k ships with over 60 built-in segments. All of them can be enabled without any performance penalty — the theme evaluates segments asynchronously and caches results aggressively.
SegmentDescription
anacondaVirtual environment from conda
asdfTool versions from asdf version manager
awsActive AWS CLI profile
aws_eb_envAWS Elastic Beanstalk environment name
azureAzure CLI account name
background_jobsIndicator when background jobs are running
batteryInternal battery state and charge level
chezmoi_shellActive chezmoi shell indicator
command_execution_timeWall-clock duration of the last command
contextuser@hostname; shown only when root or in SSH by default
cpu_archCPU architecture (e.g., arm64, x86_64)
dirCurrent working directory with smart truncation
direnvdirenv status indicator
disk_usageDisk usage percentage for the current filesystem
dotnet_version.NET runtime version
fvmFlutter version from fvm
gcloudGoogle Cloud CLI account and project
goenvGo version from goenv
google_app_credActive Google Application Credentials
go_versionGo version
haskell_stackHaskell version from Stack
ipIP address and bandwidth usage for a specified network interface
java_versionJava version
jenvJava version from jenv
kubecontextCurrent Kubernetes context and namespace
laravel_versionLaravel PHP framework version
lfActive lf file manager shell
loadAverage CPU load (1, 5, or 15 minute window)
luaenvLua version from luaenv
midnight_commanderActive Midnight Commander shell
nix_shellActive Nix shell (pure/impure)
nnnActive nnn file manager shell
nodeenvNode.js environment from nodeenv
nodenvNode.js version from nodenv
node_versionNode.js version
nordvpnNordVPN connection status (Linux only)
nvmNode.js version from nvm
os_iconOS logo (Apple for macOS, swirl for Debian, etc.)
packagename@version from package.json
per_directory_historyOh My Zsh per-directory-history local/global indicator
perlbrewPerl version from perlbrew
phpenvPHP version from phpenv
php_versionPHP version
plenvPerl version from plenv
prompt_charMulti-functional prompt symbol: (insert), (command), V (visual), (replace); turns red on error
proxySystem-wide HTTP/HTTPS/FTP proxy indicator
public_ipPublic IP address
pyenvPython version from pyenv
ramAvailable free RAM
rangerActive ranger file manager shell
rbenvRuby version from rbenv
rust_versionRust compiler (rustc) version
rvmRuby version from rvm
scalaenvScala version from scalaenv
statusExit code of the last command
swapUsed swap space
taskwarriorPending task count from Taskwarrior
terraformActive Terraform workspace
terraform_versionTerraform version
timeCurrent time (format configurable via POWERLEVEL9K_TIME_FORMAT)
timewarriorActive tracking tag from Timewarrior
todoTask count from todo.txt-cli
toolboxActive Toolbox container name
vcsGit repository status (branch, ahead/behind, staged, unstaged, untracked)
vi_modeExplicit vi mode label (redundant if prompt_char is enabled)
vim_shellActive Vim :sh shell indicator
virtualenvPython virtual environment from venv
vpn_ipVirtual private network indicator with optional IP address
wifiWiFi signal strength and speed
xplrActive xplr file manager shell
yaziActive yazi file manager shell

Show on Command

Many segments are hidden by default and appear only when the command you are currently typing is relevant to them. This prevents the prompt from becoming cluttered. For example:
# Show kubecontext only when typing a kubectl/helm/kubens command
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|k9s'

# Show AWS profile only when typing an aws/terraform/pulumi command
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt'
To show a segment unconditionally, remove or comment out its SHOW_ON_COMMAND parameter. Search for SHOW_ON_COMMAND in ~/.p10k.zsh to find all such parameters at once.
Prefix the names of your own custom segments with my_ (for example, my_cpu_temp) to avoid future naming conflicts with built-in segments added in later Powerlevel10k releases.

Build docs developers (and LLMs) love