@ -2,6 +2,11 @@
[![Gitter ](https://badges.gitter.im/powerlevel10k/community.svg )](
[![Gitter ](https://badges.gitter.im/powerlevel10k/community.svg )](
https://gitter.im/powerlevel10k/community?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge)
https://gitter.im/powerlevel10k/community?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge)
- **THE PROJECT HAS VERY LIMITED SUPPORT**
- **NO NEW FEATURES ARE IN THE WORKS**
- **MOST BUGS WILL GO UNFIXED**
- **HELP REQUESTS WILL BE IGNORED**
Powerlevel10k is a theme for Zsh. It emphasizes [speed ](#uncompromising-performance ),
Powerlevel10k is a theme for Zsh. It emphasizes [speed ](#uncompromising-performance ),
[flexibility ](#extremely-customizable ) and [out-of-the-box experience ](#configuration-wizard ).
[flexibility ](#extremely-customizable ) and [out-of-the-box experience ](#configuration-wizard ).
@ -215,9 +220,8 @@ Configs created by `p10k configure` enable show on command for several prompt se
Here's the relevant parameter for kubernetes context:
Here's the relevant parameter for kubernetes context:
```zsh
```zsh
# Show prompt segment "kubecontext" only when the command you are typing
# Show prompt segment "kubecontext" only when the command you are typing invokes one of these tools.
# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl or stern.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
```
```
To customize when different prompt segments are shown, open `~/.p10k.zsh` , search for
To customize when different prompt segments are shown, open `~/.p10k.zsh` , search for
@ -301,10 +305,11 @@ To ~~ridiculous~~ extravagant:
### Batteries included
### Batteries included
Powerlevel10k comes with dozens of built-in high quality segments. When you run `p10k configure`
Powerlevel10k comes with dozens of built-in high quality prompt segments that can display
and choose any style except [Pure ](#pure-compatibility ), many of these segments get enabled by
information from a variety of sources. When you run `p10k configure` and choose any style
default while others be manually enabled by opening `~/.p10k.zsh` and uncommenting them. You can
except [Pure ](#pure-compatibility ), many of these segments get enabled by
enable as many segments as you like. It won't slow down your prompt or Zsh startup.
default while others can be manually enabled by opening `~/.p10k.zsh` and uncommenting them.
You can enable as many segments as you like. It won't slow down your prompt or Zsh startup.
| Segment | Meaning |
| Segment | Meaning |
|--------:|---------|
|--------:|---------|
@ -317,6 +322,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `battery` | internal battery state and charge level (yep, batteries *literally* included) |
| `battery` | internal battery state and charge level (yep, batteries *literally* included) |
| `command_execution_time` | duration (wall time) of the last command |
| `command_execution_time` | duration (wall time) of the last command |
| `context` | user@hostname |
| `context` | user@hostname |
| `cpu_arch` | CPU architecture |
| `dir` | current working directory |
| `dir` | current working directory |
| `direnv` | [direnv ](https://direnv.net/ ) status |
| `direnv` | [direnv ](https://direnv.net/ ) status |
| `disk_usage` | disk usage |
| `disk_usage` | disk usage |
@ -337,6 +343,8 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `midnight_commander` | [midnight commander ](https://midnight-commander.org/ ) shell |
| `midnight_commander` | [midnight commander ](https://midnight-commander.org/ ) shell |
| `nix_shell` | [nix shell ](https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html ) indicator |
| `nix_shell` | [nix shell ](https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html ) indicator |
| `nnn` | [nnn ](https://github.com/jarun/nnn ) shell |
| `nnn` | [nnn ](https://github.com/jarun/nnn ) shell |
| `lf` | [lf ](https://github.com/gokcehan/lf ) shell |
| `chezmoi_shell` | [chezmoi ](https://www.chezmoi.io/ ) shell |
| `nodeenv` | node.js environment from [nodeenv ](https://github.com/ekalinin/nodeenv ) |
| `nodeenv` | node.js environment from [nodeenv ](https://github.com/ekalinin/nodeenv ) |
| `nodenv` | node.js environment from [nodenv ](https://github.com/nodenv/nodenv ) |
| `nodenv` | node.js environment from [nodenv ](https://github.com/nodenv/nodenv ) |
| `node_version` | [node.js ](https://nodejs.org/ ) version |
| `node_version` | [node.js ](https://nodejs.org/ ) version |
@ -344,6 +352,8 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `nvm` | node.js environment from [nvm ](https://github.com/nvm-sh/nvm ) |
| `nvm` | node.js environment from [nvm ](https://github.com/nvm-sh/nvm ) |
| `os_icon` | your OS logo (apple for macOS, swirl for debian, etc.) |
| `os_icon` | your OS logo (apple for macOS, swirl for debian, etc.) |
| `package` | `name@version` from [package.json ](https://docs.npmjs.com/files/package.json ) |
| `package` | `name@version` from [package.json ](https://docs.npmjs.com/files/package.json ) |
| `per_directory_history` | Oh My Zsh [per-directory-history ](https://github.com/jimhester/per-directory-history ) local/global indicator |
| `perlbrew` | perl version from [perlbrew ](https://github.com/gugod/App-perlbrew ) |
| `phpenv` | php environment from [phpenv ](https://github.com/phpenv/phpenv ) |
| `phpenv` | php environment from [phpenv ](https://github.com/phpenv/phpenv ) |
| `php_version` | [php ](https://www.php.net/ ) version |
| `php_version` | [php ](https://www.php.net/ ) version |
| `plenv` | perl environment from [plenv ](https://github.com/tokuhirom/plenv ) |
| `plenv` | perl environment from [plenv ](https://github.com/tokuhirom/plenv ) |
@ -353,9 +363,11 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `pyenv` | python environment from [pyenv ](https://github.com/pyenv/pyenv ) |
| `pyenv` | python environment from [pyenv ](https://github.com/pyenv/pyenv ) |
| `ram` | free RAM |
| `ram` | free RAM |
| `ranger` | [ranger ](https://github.com/ranger/ranger ) shell |
| `ranger` | [ranger ](https://github.com/ranger/ranger ) shell |
| `yazi` | [yazi ](https://github.com/sxyazi/yazi ) shell |
| `rbenv` | ruby environment from [rbenv ](https://github.com/rbenv/rbenv ) |
| `rbenv` | ruby environment from [rbenv ](https://github.com/rbenv/rbenv ) |
| `rust_version` | [rustc ](https://www.rust-lang.org ) version |
| `rust_version` | [rustc ](https://www.rust-lang.org ) version |
| `rvm` | ruby environment from [rvm ](https://rvm.io ) |
| `rvm` | ruby environment from [rvm ](https://rvm.io ) |
| `scalaenv` | scala version from [scalaenv ](https://github.com/scalaenv/scalaenv ) |
| `status` | exit code of the last command |
| `status` | exit code of the last command |
| `swap` | used swap |
| `swap` | used swap |
| `taskwarrior` | [taskwarrior ](https://taskwarrior.org/ ) task count |
| `taskwarrior` | [taskwarrior ](https://taskwarrior.org/ ) task count |
@ -368,6 +380,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `vcs` | Git repository status |
| `vcs` | Git repository status |
| `vim_shell` | [vim ](https://www.vim.org/ ) shell (`:sh`) |
| `vim_shell` | [vim ](https://www.vim.org/ ) shell (`:sh`) |
| `virtualenv` | python environment from [venv ](https://docs.python.org/3/library/venv.html ) |
| `virtualenv` | python environment from [venv ](https://docs.python.org/3/library/venv.html ) |
| `vi_mode` | vi mode (you don't need this if you've enabled prompt_char) |
| `vpn_ip` | virtual private network indicator |
| `vpn_ip` | virtual private network indicator |
| `wifi` | WiFi speed |
| `wifi` | WiFi speed |
| `xplr` | [xplr ](https://github.com/sayanarijit/xplr ) shell |
| `xplr` | [xplr ](https://github.com/sayanarijit/xplr ) shell |
@ -391,6 +404,11 @@ it out of the box.
Type `p10k help segment` for reference.
Type `p10k help segment` for reference.
*Note*: If you modify `POWERLEVEL9K_*` parameters in an already initialized interactive shell (as
opposed to editing `~/.p10k.zsh` ), the changes might not be immediately effective. To apply the
modifications, invoke `p10k reload` . Setting `POWERLEVEL9K_DISABLE_HOT_RELOAD=false` eliminates the
necessity for `p10k reload` but results in a marginally slower prompt.
*Tip*: Prefix names of your own segments with `my_` to avoid clashes with future versions of
*Tip*: Prefix names of your own segments with `my_` to avoid clashes with future versions of
Powerlevel10k.
Powerlevel10k.
@ -401,13 +419,18 @@ Powerlevel10k.
- [Prezto ](#prezto )
- [Prezto ](#prezto )
- [Zim ](#zim )
- [Zim ](#zim )
- [Antibody ](#antibody )
- [Antibody ](#antibody )
- [Antidote ](#antidote )
- [Antigen ](#antigen )
- [Antigen ](#antigen )
- [Zplug ](#zplug )
- [Zplug ](#zplug )
- [Zgen ](#zgen )
- [Zgen ](#zgen )
- [Zplugin ](#zplugin )
- [Zplugin ](#zplugin )
- [Zinit ](#zinit )
- [Zinit ](#zinit )
- [Zi ](#zi )
- [Zap ](#zap )
- [Homebrew ](#homebrew )
- [Homebrew ](#homebrew )
- [Arch Linux ](#arch-linux )
- [Arch Linux ](#arch-linux )
- [Alpine Linux ](#alpine-linux )
- [Fig ](#fig )
### Manual
### Manual
@ -416,8 +439,8 @@ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
```
```
Users in mainland China can use the official mirror on gitee.com for faster download.< br >
Users in China can use the official mirror on gitee.com for faster download.< br >
中国大陆 用户可以使用 gitee.com 上的官方镜像加速下载.
中国用户可以使用 gitee.com 上的官方镜像加速下载.
```zsh
```zsh
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ~/powerlevel10k
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ~/powerlevel10k
@ -434,8 +457,8 @@ make sure to disable the current theme in your plugin manager. See
```zsh
```zsh
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
```
```
Users in mainland China can use the official mirror on gitee.com for faster download.< br >
Users in China can use the official mirror on gitee.com for faster download.< br >
中国大陆 用户可以使用 gitee.com 上的官方镜像加速下载.
中国用户可以使用 gitee.com 上的官方镜像加速下载.
```zsh
```zsh
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
@ -454,6 +477,10 @@ Add `zmodule romkatv/powerlevel10k --use degit` to `~/.zimrc` and run `zimfw ins
Add `antibody bundle romkatv/powerlevel10k` to `~/.zshrc` .
Add `antibody bundle romkatv/powerlevel10k` to `~/.zshrc` .
### Antidote
Add `romkatv/powerlevel10k` to `~/.zsh_plugins.txt` .
### Antigen
### Antigen
Add `antigen theme romkatv/powerlevel10k` to `~/.zshrc` . Make sure you have `antigen apply`
Add `antigen theme romkatv/powerlevel10k` to `~/.zshrc` . Make sure you have `antigen apply`
@ -481,11 +508,22 @@ Add `zinit ice depth=1; zinit light romkatv/powerlevel10k` to `~/.zshrc`.
The use of `depth=1` ice is optional. Other types of ice are neither recommended nor officially
The use of `depth=1` ice is optional. Other types of ice are neither recommended nor officially
supported by Powerlevel10k.
supported by Powerlevel10k.
### Zi
Add `zi ice depth=1; zi light romkatv/powerlevel10k` to `~/.zshrc` .
The use of `depth=1` ice is optional. Other types of ice are neither recommended nor officially
supported by Powerlevel10k.
### Zap
Add `plug "romkatv/powerlevel10k"` to `~/.zshrc` .
### Homebrew
### Homebrew
```zsh
```zsh
brew install romkatv/powerlevel10k/powerlevel10k
brew install powerlevel10k
echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
echo "source $(brew --prefix)/share /powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
```
```
### Arch Linux
### Arch Linux
@ -499,10 +537,23 @@ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zs
referenced above is the official Powerlevel10k package.
referenced above is the official Powerlevel10k package.
There is also [zsh-theme-powerlevel10k](
There is also [zsh-theme-powerlevel10k](
https://www.archlinux.org/packages/community/x86_64/zsh-theme-powerlevel10k/) community package.
https://www.archlinux.org/packages/extra/x86_64/zsh-theme-powerlevel10k/) package.
Historically, [it has been breaking often and for extended periods of time](
Historically, [it has been breaking often and for extended periods of time](
https://github.com/romkatv/powerlevel10k/pull/786). **Do not use it.**
https://github.com/romkatv/powerlevel10k/pull/786). **Do not use it.**
### Alpine Linux
```zsh
apk add zsh zsh-theme-powerlevel10k
mkdir -p ~/.local/share/zsh/plugins
ln -s /usr/share/zsh/plugins/powerlevel10k ~/.local/share/zsh/plugins/
```
### Fig
Follow the instructions on
[this page ](https://fig.io/plugins/other/powerlevel10k ).
## Configuration
## Configuration
- [For new users ](#for-new-users )
- [For new users ](#for-new-users )
@ -621,11 +672,10 @@ If you are using a different terminal, proceed with manual font installation.
*Custom font* under *Text Appearance* and select `MesloLGS NF Regular` .
*Custom font* under *Text Appearance* and select `MesloLGS NF Regular` .
- **Windows Console Host** (the old thing): Click the icon in the top left corner, then
- **Windows Console Host** (the old thing): Click the icon in the top left corner, then
*Properties → Font* and set *Font* to `MesloLGS NF` .
*Properties → Font* and set *Font* to `MesloLGS NF` .
- **Windows Terminal** by Microsoft (the new thing): Open `settings.json` (< kbd > Ctrl+Shift+,</ kbd > ),
- **Windows Terminal** by Microsoft (the new thing): Open *Settings* (< kbd > Ctrl+,</ kbd > ), click
search for `fontFace` and set the value to `MesloLGS NF` for every profile. If you don't find
either on the selected profile under *Profiles* or on *Defaults* , click *Appearance* and set
`fontFace` , add it under *profiles → defaults* . See [this settings file](
*Font face* to `MesloLGS NF` .
https://raw.githubusercontent.com/romkatv/dotfiles-public/aba0e6c4657d705ed6c344d700d659977385f25c/dotfiles/microsoft-terminal-settings.json)
- **Conemu** : Open *Setup → General → Fonts* and set *Main console font* to `MesloLGS NF` .
for example.
- **IntelliJ** (and other IDEs by Jet Brains): Open *IDE → Edit → Preferences → Editor →
- **IntelliJ** (and other IDEs by Jet Brains): Open *IDE → Edit → Preferences → Editor →
Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font
Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font
name to `MesloLGS NF` .
name to `MesloLGS NF` .
@ -633,7 +683,7 @@ If you are using a different terminal, proceed with manual font installation.
*Meslo Nerd Font* .
*Meslo Nerd Font* .
- **Blink** : Type `config` , go to *Appearance* , tap *Add a new font* , tap *Open Gallery* , select
- **Blink** : Type `config` , go to *Appearance* , tap *Add a new font* , tap *Open Gallery* , select
*MesloLGS NF.css* , tap *import* and type `exit` in the home view to reload the font.
*MesloLGS NF.css* , tap *import* and type `exit` in the home view to reload the font.
- **T erminus**: Open *Settings → Appearance* and set *Font* to `MesloLGS NF` .
- **T abby** (formerly **T erminus**) : Open *Settings → Appearance* and set *Font* to `MesloLGS NF` .
- **Terminator** : Open *Preferences* using the context menu. Under *Profiles* select the *General*
- **Terminator** : Open *Preferences* using the context menu. Under *Profiles* select the *General*
tab (should be selected already), uncheck *Use the system fixed width font* (if not already)
tab (should be selected already), uncheck *Use the system fixed width font* (if not already)
and select `MesloLGS NF Regular` . Exit the Preferences dialog by clicking *Close* .
and select `MesloLGS NF Regular` . Exit the Preferences dialog by clicking *Close* .
@ -641,7 +691,9 @@ If you are using a different terminal, proceed with manual font installation.
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular` .
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular` .
Exit the Preferences dialog by clicking *Close* .
Exit the Preferences dialog by clicking *Close* .
- **MobaXterm** : Open *Settings* → *Configuration* → *Terminal* → (under *Terminal look and feel* )
- **MobaXterm** : Open *Settings* → *Configuration* → *Terminal* → (under *Terminal look and feel* )
and change *Font* to `MesloLGS NF` .
and change *Font* to `MesloLGS NF` . If you have *sessions* , you need to change the font in each
of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal
Settings* → *Font settings* .
- **Asbrú Connection Manager** : Open *Preferences → Local Shell Options → Look and Feel* , enable
- **Asbrú Connection Manager** : Open *Preferences → Local Shell Options → Look and Feel* , enable
*Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular` .
*Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular` .
To change the font for the remote host connections, go to *Preferences → Terminal Options →
To change the font for the remote host connections, go to *Preferences → Terminal Options →
@ -651,12 +703,15 @@ If you are using a different terminal, proceed with manual font installation.
- **Yakuake** : Click *≡* → *Manage Profiles* → *New* → *Appearance* . Click *Choose* next to the
- **Yakuake** : Click *≡* → *Manage Profiles* → *New* → *Appearance* . Click *Choose* next to the
*Font* dropdown, select `MesloLGS NF` and click *OK* . Click *OK* to save the profile. Select the
*Font* dropdown, select `MesloLGS NF` and click *OK* . Click *OK* to save the profile. Select the
new profile and click *Set as Default* .
new profile and click *Set as Default* .
- **Alacritty** : Create or open `~/.config/alacritty/alacritty.yml` and add the following section
- **Alacritty** : Create or open `~/.config/alacritty/alacritty.toml` and add the following
to it:
section to it:
```yaml
```toml
font:
[font.normal]
normal:
family = "MesloLGS NF"
family: "MesloLGS NF"
```
- **foot** : Create or open `~/.config/foot/foot.ini` and add the following section to it:
```ini
font=MesloLGS NF:size=12
```
```
- **kitty** : Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
- **kitty** : Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
```text
```text
@ -686,6 +741,45 @@ If you are using a different terminal, proceed with manual font installation.
```
```
After changing the config run `xrdb ~/.Xresources` to reload it. The new config is applied to
After changing the config run `xrdb ~/.Xresources` to reload it. The new config is applied to
all new terminals.
all new terminals.
- **Zed** : Open `~/.config/zed/settings.json` and set `terminal.font_family` to `"MesloLGS NF"` .
```jsonc
{
"terminal": {
"font_family": "MesloLGS NF"
},
// Other settings.
}
```
- Crostini (Linux on Chrome OS): Open
chrome-untrusted://terminal/html/nassh_preferences_editor.html, set *Text font family* to
`'MesloLGS NF'` (including the quotes) and *Custom CSS (inline text)* to the following:
```css
@font -face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Regular.ttf");
font-weight: normal;
font-style: normal;
}
@font -face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold.ttf");
font-weight: bold;
font-style: normal;
}
@font -face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Italic.ttf");
font-weight: normal;
font-style: italic;
}
@font -face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold%20Italic.ttf");
font-weight: bold;
font-style: italic;
}
```
**_CAVEAT_** : If you open the normal terminal preferences these settings will be overwritten.
1. Run `p10k configure` to generate a new `~/.p10k.zsh` . The old config may work
1. Run `p10k configure` to generate a new `~/.p10k.zsh` . The old config may work
incorrectly with the new font.
incorrectly with the new font.
@ -695,7 +789,7 @@ PR to expand the list!_
## Try it in Docker
## Try it in Docker
Try Powerlevel10k in Docker. You can safely make any changes to the file system while trying out
Try Powerlevel10k in Docker. You can safely make any changes to the file system while trying out
the theme. Once you exit Zsh, the image is deleted.
the theme. Once you exit Zsh, the container is deleted.
```zsh
```zsh
docker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -it --rm alpine sh -uec '
docker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -it --rm alpine sh -uec '
@ -753,18 +847,22 @@ Powerlevel10k is released under the
The command to update Powerlevel10k depends on how it was installed.
The command to update Powerlevel10k depends on how it was installed.
| Installation | Update command |
| Installation | Update command |
|---------------------------|-------------------------------------------------------------|
|------------------------------- |-------------------------------------------------------------|
| [Manual ](#manual ) | `git -C ~/powerlevel10k pull` |
| [Manual ](#manual ) | `git -C ~/powerlevel10k pull` |
| [Oh My Zsh ](#oh-my-zsh ) | `git -C ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k pull` |
| [Oh My Zsh ](#oh-my-zsh ) | `git -C ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k pull` |
| [Prezto ](#prezto ) | `zprezto-update` |
| [Prezto ](#prezto ) | `zprezto-update` |
| [Zim ](#zim ) | `zimfw update` |
| [Zim ](#zim ) | `zimfw update` |
| [Antigen ](#antigen ) | `antigen update` |
| [Antigen ](#antigen ) | `antigen update` |
| [Antidote ](#antidote ) | `antidote update` |
| [Zplug ](#zplug ) | `zplug update` |
| [Zplug ](#zplug ) | `zplug update` |
| [Zgen ](#zgen ) | `zgen update` |
| [Zgen ](#zgen ) | `zgen update` |
| [Zplugin ](#zplugin ) | `zplugin update` |
| [Zplugin ](#zplugin ) | `zplugin update` |
| [Zinit ](#zinit ) | `zinit update` |
| [Zinit ](#zinit ) | `zinit update` |
| [Zi ](#zi ) | `zi update` |
| [Zap ](#zap ) | `zap update` |
| [Homebrew ](#homebrew ) | `brew update && brew upgrade` |
| [Homebrew ](#homebrew ) | `brew update && brew upgrade` |
| [Arch Linux ](#arch-linux ) | `yay -S --noconfirm zsh-theme-powerlevel10k-git` |
| [Arch Linux ](#arch-linux ) | `yay -S --noconfirm zsh-theme-powerlevel10k-git` |
| [Alpine Linux ](#alpine-linux ) | `apk update && apk upgrade` |
**IMPORTANT**: Restart Zsh after updating Powerlevel10k. [Do not use `source ~/.zshrc` ](
**IMPORTANT**: Restart Zsh after updating Powerlevel10k. [Do not use `source ~/.zshrc` ](
#weird -things-happen-after-typing-source-zshrc).
#weird -things-happen-after-typing-source-zshrc).
@ -803,18 +901,22 @@ The command to update Powerlevel10k depends on how it was installed.
Refer to the [installation instructions ](#installation ) if you need a reminder.
Refer to the [installation instructions ](#installation ) if you need a reminder.
| Installation | Uninstall command |
| Installation | Uninstall command |
|---------------------------|------------------------------------------------------------------|
|------------------------------- |------------------------------------------------------------------|
| [Manual ](#manual ) | `rm -rf ~/powerlevel10k` |
| [Manual ](#manual ) | `rm -rf ~/powerlevel10k` |
| [Oh My Zsh ](#oh-my-zsh ) | `rm -rf -- ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` |
| [Oh My Zsh ](#oh-my-zsh ) | `rm -rf -- ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` |
| [Prezto ](#prezto ) | n/a |
| [Prezto ](#prezto ) | n/a |
| [Zim ](#zim ) | `zimfw uninstall` |
| [Zim ](#zim ) | `zimfw uninstall` |
| [Antigen ](#antigen ) | `antigen purge romkatv/powerlevel10k` |
| [Antigen ](#antigen ) | `antigen purge romkatv/powerlevel10k` |
| [Antidote ](#antidote ) | `antidote purge romkatv/powerlevel10k` |
| [Zplug ](#zplug ) | `zplug clean` |
| [Zplug ](#zplug ) | `zplug clean` |
| [Zgen ](#zgen ) | `zgen reset` |
| [Zgen ](#zgen ) | `zgen reset` |
| [Zplugin ](#zplugin ) | `zplugin delete romkatv/powerlevel10k` |
| [Zplugin ](#zplugin ) | `zplugin delete romkatv/powerlevel10k` |
| [Zinit ](#zinit ) | `zinit delete romkatv/powerlevel10k` |
| [Zinit ](#zinit ) | `zinit delete romkatv/powerlevel10k` |
| [Homebrew ](#homebrew ) | `brew uninstall powerlevel10k; brew untap romkatv/powerlevel10k` |
| [Zi ](#zi ) | `zi delete romkatv/powerlevel10k` |
| [Zap ](#zap ) | `zsh -ic 'zap clean'` |
| [Homebrew ](#homebrew ) | `brew uninstall powerlevel10k` |
| [Arch Linux ](#arch-linux ) | `yay -R --noconfirm zsh-theme-powerlevel10k-git` |
| [Arch Linux ](#arch-linux ) | `yay -R --noconfirm zsh-theme-powerlevel10k-git` |
| [Alpine Linux ](#alpine-linux ) | `apk del zsh-theme-powerlevel10k` |
6. Restart Zsh. [Do not use `source ~/.zshrc` ](#weird-things-happen-after-typing-source-zshrc ).
6. Restart Zsh. [Do not use `source ~/.zshrc` ](#weird-things-happen-after-typing-source-zshrc ).
7. Delete Powerlevel10k cache files.
7. Delete Powerlevel10k cache files.
```zsh
```zsh
@ -885,6 +987,8 @@ Powerlevel10k does not affect:
- Prompt parameters other than `PS1` and `RPS1` .
- Prompt parameters other than `PS1` and `RPS1` .
- Zsh options other than those [related to prompt](
- Zsh options other than those [related to prompt](
http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting).
http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting).
- The set of available commands. Powerlevel10k does not install any new commands
with the only exception of `p10k` .
### I'm using Powerlevel9k with Oh My Zsh. How do I migrate?
### I'm using Powerlevel9k with Oh My Zsh. How do I migrate?
@ -1052,6 +1156,7 @@ feature:master wip ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42
| `feature` | current branch; replaced with `#tag` or `@commit` if not on a branch | `git status --ignore-submodules=dirty` |
| `feature` | current branch; replaced with `#tag` or `@commit` if not on a branch | `git status --ignore-submodules=dirty` |
| `master` | remote tracking branch; only shown if different from local branch | `git rev-parse --abbrev-ref --symbolic-full-name @{upstream}` |
| `master` | remote tracking branch; only shown if different from local branch | `git rev-parse --abbrev-ref --symbolic-full-name @{upstream}` |
| `wip` | the latest commit's summary contains "wip" or "WIP" | `git show --pretty=%s --no-patch HEAD` |
| `wip` | the latest commit's summary contains "wip" or "WIP" | `git show --pretty=%s --no-patch HEAD` |
| `=` | up to date with the remote (neither ahead nor behind) | `git rev-list --count HEAD...@{upstream}` |
| `⇣42` | this many commits behind the remote | `git rev-list --right-only --count HEAD...@{upstream}` |
| `⇣42` | this many commits behind the remote | `git rev-list --right-only --count HEAD...@{upstream}` |
| `⇡42` | this many commits ahead of the remote | `git rev-list --left-only --count HEAD...@{upstream}` |
| `⇡42` | this many commits ahead of the remote | `git rev-list --left-only --count HEAD...@{upstream}` |
| `⇠42` | this many commits behind the push remote | `git rev-list --right-only --count HEAD...@{push}` |
| `⇠42` | this many commits behind the push remote | `git rev-list --right-only --count HEAD...@{push}` |
@ -1103,7 +1208,7 @@ completes, Powerlevel10k refreshes prompt with new information, this time with c
When using *Rainbow* style, Git status is displayed as black on grey while it's still being
When using *Rainbow* style, Git status is displayed as black on grey while it's still being
computed. Depending on the terminal color palette, this may be difficult to read. In this case you
computed. Depending on the terminal color palette, this may be difficult to read. In this case you
might want to change the background color to something ligher for more contrast. To do that, open
might want to change the background color to something light er for more contrast. To do that, open
`~/.p10k.zsh` , search for `POWERLEVEL9K_VCS_LOADING_BACKGROUND` , uncomment it if it's commented out,
`~/.p10k.zsh` , search for `POWERLEVEL9K_VCS_LOADING_BACKGROUND` , uncomment it if it's commented out,
and change the value.
and change the value.
@ -1156,9 +1261,9 @@ Prompt segments can be configured to be shown only when the current command you
a relevant tool.
a relevant tool.
```zsh
```zsh
# Show prompt segment "kubecontext" only when the command you are typing
# Show prompt segment "kubecontext" only when the command you are typing invokes
# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl or stern .
# invokes kubectl, helm, or kubens.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern '
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'
```
```
Configs created by `p10k configure` may contain parameters of this kind. To customize when different
Configs created by `p10k configure` may contain parameters of this kind. To customize when different
@ -1174,7 +1279,7 @@ function kube-toggle() {
if (( ${+POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND} )); then
if (( ${+POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND} )); then
unset POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND
unset POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND
else
else
POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern '
POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'
fi
fi
p10k reload
p10k reload
if zle; then
if zle; then
@ -1227,15 +1332,28 @@ terminals. Many terminals also support customization of these colors through col
Type `source ~/.p10k.zsh` to apply your changes to the current Zsh session.
Type `source ~/.p10k.zsh` to apply your changes to the current Zsh session.
To see how different colors look in your terminal, run the following command:
To see how different numbered colors look in your terminal, run the following command:
```zsh
```zsh
for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done
for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done
```
```
If your terminal supports truecolor, you can use 24-bit colors in the `#RRGGBB` format in addition
to the numbered colors.
```zsh
typeset -g POWERLEVEL9K_TIME_FOREGROUND='#FF0000'
```
*Related:*
*Related:*
- [Directory is difficult to see in prompt when using Rainbow style.](
- [Directory is difficult to see in prompt when using Rainbow style.](
#directory -is-difficult-to-see-in-prompt-when-using-rainbow-style)
#directory -is-difficult-to-see-in-prompt-when-using-rainbow-style)
- [Incorrect foreground color in VSCode Terminal. ](#incorrect-foreground-color-in-vscode-terminal )
By default, VSCode Terminal may arbitrarily replace the foreground color of your choice with a
different color. This behavior can be
[turned off ](https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio ) in
VSCode settings.
### Why does Powerlevel10k spawn extra processes?
### Why does Powerlevel10k spawn extra processes?
@ -1407,6 +1525,7 @@ Powerlevel10k are released. This may change in the future but not soon.
## Troubleshooting
## Troubleshooting
- [`[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found`](#oh-my-zsh-theme-powerlevel10kpowerlevel10k-not-found)
- [Question mark in prompt ](#question-mark-in-prompt )
- [Question mark in prompt ](#question-mark-in-prompt )
- [Icons, glyphs or powerline symbols don't render ](#icons-glyphs-or-powerline-symbols-dont-render )
- [Icons, glyphs or powerline symbols don't render ](#icons-glyphs-or-powerline-symbols-dont-render )
- [Sub-pixel imperfections around powerline symbols ](#sub-pixel-imperfections-around-powerline-symbols )
- [Sub-pixel imperfections around powerline symbols ](#sub-pixel-imperfections-around-powerline-symbols )
@ -1424,9 +1543,32 @@ Powerlevel10k are released. This may change in the future but not soon.
- [Transient prompt stops working after some time ](#transient-prompt-stops-working-after-some-time )
- [Transient prompt stops working after some time ](#transient-prompt-stops-working-after-some-time )
- [Cannot make Powerlevel10k work with my plugin manager ](#cannot-make-powerlevel10k-work-with-my-plugin-manager )
- [Cannot make Powerlevel10k work with my plugin manager ](#cannot-make-powerlevel10k-work-with-my-plugin-manager )
- [Directory is difficult to see in prompt when using Rainbow style ](#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style )
- [Directory is difficult to see in prompt when using Rainbow style ](#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style )
- [Incorrect foreground color in VSCode Terminal. ](#incorrect-foreground-color-in-vscode-terminal )
- [Horrific mess when resizing terminal window ](#horrific-mess-when-resizing-terminal-window )
- [Horrific mess when resizing terminal window ](#horrific-mess-when-resizing-terminal-window )
- [Icons cut off in Konsole ](#icons-cut-off-in-konsole )
- [Icons cut off in Konsole ](#icons-cut-off-in-konsole )
- [Arch Linux logo has a dot in the bottom right corner ](#arch-linux-logo-has-a-dot-in-the-bottom-right-corner )
- [Arch Linux logo has a dot in the bottom right corner ](#arch-linux-logo-has-a-dot-in-the-bottom-right-corner )
- [Incorrect git status in prompt ](#incorrect-git-status-in-prompt )
### `[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found`
When opening a terminal, or starting zsh manually, you may encounter this error message:
```text
[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found
```
1. First, run `typeset -p P9K_VERSION` to check whether Powerlevel10k has been loaded.
- If `typeset -p P9K_VERSION` succeeds and prints something like `typeset P9K_VERSION=1.19.14`
(the version could be different), remove the following line from `~/.zshrc` :
```zsh
ZSH_THEME="powerlevel10k/powerlevel10k"
```
- If `typeset -p P9K_VERSION` fails with the error `typeset: no such variable: P9K_VERSION` , run
the following command:
```zsh
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
```
2. Restart Zsh with `exec zsh` .
### Question mark in prompt
### Question mark in prompt
@ -1611,10 +1753,15 @@ and make sure that `TERM` environment variable is set correctly. Verify with
If there is no UTF-8 locale on the system, configuration wizard won't offer prompt styles that use
If there is no UTF-8 locale on the system, configuration wizard won't offer prompt styles that use
Unicode characters. *Fix* : Install a UTF-8 locale. Verify with `locale -a` .
Unicode characters. *Fix* : Install a UTF-8 locale. Verify with `locale -a` .
When a UTF-8 locale is available, the first few questions asked by the configuration wizard assess
Another case in which configuration wizard may not offer Unicode prompt styles is when the
capabilities of the terminal font. If your answers indicate that some glyphs don't render correctly,
`MULTIBYTE` shell option is disabled. *Fix* : Enable the `MULTIBYTE` option, or rather don't disable
configuration wizard won't offer prompt styles that use them. *Fix* : Restart your terminal and
it (this option is enabled in Zsh by default). Verify with `print -r -- ${options[MULTIBYTE]}` .
install [the recommended font ](#meslo-nerd-font-patched-for-powerlevel10k ). Verify by running
When `MULTIBYTE` is enabled and a UTF-8 locale is available, the first few questions asked by the
configuration wizard assess capabilities of the terminal font. If your answers indicate that some
glyphs don't render correctly, configuration wizard won't offer prompt styles that use them. *Fix* :
Restart your terminal and install
[the recommended font ](#meslo-nerd-font-patched-for-powerlevel10k ). Verify by running
`p10k configure` and checking that all glyphs render correctly.
`p10k configure` and checking that all glyphs render correctly.
### Cannot install the recommended font
### Cannot install the recommended font
@ -1740,6 +1887,15 @@ There are several ways to fix this.
`POWERLEVEL9K_DIR_ANCHOR_FOREGROUND` and `POWERLEVEL9K_DIR_ANCHOR_BOLD` . You can find them in
`POWERLEVEL9K_DIR_ANCHOR_FOREGROUND` and `POWERLEVEL9K_DIR_ANCHOR_BOLD` . You can find them in
`~/.p10k.zsh` .
`~/.p10k.zsh` .
*Related*: [Incorrect foreground color in VSCode Terminal. ](#incorrect-foreground-color-in-vscode-terminal )
### Incorrect foreground color in VSCode Terminal
By default, VSCode Terminal may arbitrarily replace the foreground color of your choice with a
different color. This behavior can be
[turned off ](https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio ) in
VSCode settings.
### Horrific mess when resizing terminal window
### Horrific mess when resizing terminal window
When you resize a terminal window horizontally back and forth a few times, you might see this ugly
When you resize a terminal window horizontally back and forth a few times, you might see this ugly
@ -1936,3 +2092,16 @@ Some fonts have this incorrect dotted icon in bold typeface. There are two ways
```zsh
```zsh
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' # not bold
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' # not bold
```
```
### Incorrect git status in prompt
Powerlevel10k uses [gitstatusd ](https://github.com/romkatv/gitstatus ) to inspect the state of git
repositories. The project relies on the [libgit2 ](https://github.com/libgit2/libgit2 ) library, which
has some gaps in its implementation. Under some conditions, this may result in discrepancies between
the real state of a git repository (reflected by `git status` ) and what gets shown in the
Powerlevel10k prompt.
Most notably, [libgit2 does not support `skipHash` ](https://github.com/libgit2/libgit2/issues/6531 ).
If you see incorrect git status in prompt, run `git config -l` and check whether `skipHash` is
enabled. If it is, consider disabling it. Keep in mind that `skipHash` may be implicitly enabled
when activating certain git features, such as `manyFiles` .