diff --git a/README.md b/README.md
index 6629e910..22c68d62 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,11 @@
[](
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),
[flexibility](#extremely-customizable) and [out-of-the-box experience](#configuration-wizard).
@@ -300,10 +305,11 @@ To ~~ridiculous~~ extravagant:
### Batteries included
-Powerlevel10k comes with dozens of built-in high quality segments. When you run `p10k configure`
-and choose any style except [Pure](#pure-compatibility), many of these segments get enabled by
-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.
+Powerlevel10k comes with dozens of built-in high quality prompt segments that can display
+information from a variety of sources. When you run `p10k configure` and choose any style
+except [Pure](#pure-compatibility), many of these segments get enabled by
+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 |
|--------:|---------|
@@ -338,6 +344,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `nix_shell` | [nix shell](https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) indicator |
| `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) |
| `nodenv` | node.js environment from [nodenv](https://github.com/nodenv/nodenv) |
| `node_version` | [node.js](https://nodejs.org/) version |
@@ -345,6 +352,7 @@ 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) |
| `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) |
+| `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) |
| `php_version` | [php](https://www.php.net/) version |
@@ -355,6 +363,7 @@ 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) |
| `ram` | free RAM |
| `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) |
| `rust_version` | [rustc](https://www.rust-lang.org) version |
| `rvm` | ruby environment from [rvm](https://rvm.io) |
@@ -395,6 +404,11 @@ it out of the box.
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
Powerlevel10k.
@@ -415,7 +429,7 @@ Powerlevel10k.
- [Zap](#zap)
- [Homebrew](#homebrew)
- [Arch Linux](#arch-linux)
-- [Alpine Linux](#arch-linux)
+- [Alpine Linux](#alpine-linux)
- [Fig](#fig)
### Manual
@@ -441,15 +455,15 @@ make sure to disable the current theme in your plugin manager. See
1. Clone the repository:
```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 China can use the official mirror on gitee.com for faster download.
中国用户可以使用 gitee.com 上的官方镜像加速下载.
```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"
```
-2. Set `ZSH_THEME="powerlevel10k/powerlevel10k"` in `~/.zshrc`.
+2. Open `~/.zshrc`, find the line that sets `ZSH_THEME`, and change its value to `"powerlevel10k/powerlevel10k"`.
### Prezto
@@ -508,8 +522,8 @@ Add `plug "romkatv/powerlevel10k"` to `~/.zshrc`.
### Homebrew
```zsh
-brew install romkatv/powerlevel10k/powerlevel10k
-echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
+brew install powerlevel10k
+echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
```
### Arch Linux
@@ -522,11 +536,6 @@ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zs
[zsh-theme-powerlevel10k-git](https://aur.archlinux.org/packages/zsh-theme-powerlevel10k-git/)
referenced above is the official Powerlevel10k package.
-There is also [zsh-theme-powerlevel10k](
- https://www.archlinux.org/packages/community/x86_64/zsh-theme-powerlevel10k/) community package.
-Historically, [it has been breaking often and for extended periods of time](
- https://github.com/romkatv/powerlevel10k/pull/786). **Do not use it.**
-
### Alpine Linux
```zsh
@@ -661,6 +670,7 @@ If you are using a different terminal, proceed with manual font installation.
- **Windows Terminal** by Microsoft (the new thing): Open *Settings* (Ctrl+,), click
either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set
*Font face* to `MesloLGS NF`.
+ - **Conemu**: Open *Setup → General → Fonts* and set *Main console font* to `MesloLGS NF`.
- **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
name to `MesloLGS NF`.
@@ -668,7 +678,7 @@ If you are using a different terminal, proceed with manual font installation.
*Meslo Nerd Font*.
- **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.
- - **Terminus**: Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
+ - **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
- **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)
and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.
@@ -676,24 +686,31 @@ 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`.
Exit the Preferences dialog by clicking *Close*.
- **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
*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 →
Look and Feel* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
+ - **Warp**: Open Warp and Navigate to *Settings* then *Appearance*. Scroll down to *Text* Section
+ and under *"Terminal Font"*, select the `MesloLGS NF` font.
- **WSLtty**: Right click on an open terminal and then on *Options*. In the *Text* section, under
*Font*, click *"Select..."* and set Font to `MesloLGS NF Regular`.
- **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
new profile and click *Set as Default*.
- - **Alacritty**: Create or open `~/.config/alacritty/alacritty.yml` and add the following section
- to it:
- ```yaml
- font:
- normal:
- family: "MesloLGS NF"
+ - **Alacritty**: Create or open `~/.config/alacritty/alacritty.toml` and add the following
+ section to it:
+ ```toml
+ [font.normal]
+ family = "MesloLGS NF"
```
- - **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
+ - **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:
```text
font_family MesloLGS NF
```
@@ -760,6 +777,17 @@ If you are using a different terminal, proceed with manual font installation.
}
```
**_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.
+ - **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section
+ to it:
+ ```ini
+ [basic.interface.font]
+ value = "MesloLGS NF"
+ ```
+ - **Ghostty**: Open *Menu → Open Configuration* (Linux) or *Ghostty → Settings...* (Mac) and add
+ the following line:
+ ```text
+ font-family = "MesloLGS NF"
+ ```
1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work
incorrectly with the new font.
@@ -829,7 +857,7 @@ The command to update Powerlevel10k depends on how it was installed.
| Installation | Update command |
|-------------------------------|-------------------------------------------------------------|
| [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` |
| [Zim](#zim) | `zimfw update` |
| [Antigen](#antigen) | `antigen update` |
@@ -839,7 +867,7 @@ The command to update Powerlevel10k depends on how it was installed.
| [Zplugin](#zplugin) | `zplugin update` |
| [Zinit](#zinit) | `zinit update` |
| [Zi](#zi) | `zi update` |
-| [Zap](#zap) | `zap --update` |
+| [Zap](#zap) | `zap update` |
| [Homebrew](#homebrew) | `brew update && brew upgrade` |
| [Arch Linux](#arch-linux) | `yay -S --noconfirm zsh-theme-powerlevel10k-git` |
| [Alpine Linux](#alpine-linux) | `apk update && apk upgrade` |
@@ -883,7 +911,7 @@ The command to update Powerlevel10k depends on how it was installed.
| Installation | Uninstall command |
|-------------------------------|------------------------------------------------------------------|
| [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 |
| [Zim](#zim) | `zimfw uninstall` |
| [Antigen](#antigen) | `antigen purge romkatv/powerlevel10k` |
@@ -893,8 +921,8 @@ The command to update Powerlevel10k depends on how it was installed.
| [Zplugin](#zplugin) | `zplugin delete romkatv/powerlevel10k` |
| [Zinit](#zinit) | `zinit delete romkatv/powerlevel10k` |
| [Zi](#zi) | `zi delete romkatv/powerlevel10k` |
- | [Zap](#zap) | `zsh -ic 'zap --clean'` |
- | [Homebrew](#homebrew) | `brew uninstall powerlevel10k; brew untap romkatv/powerlevel10k` |
+ | [Zap](#zap) | `zsh -ic 'zap clean'` |
+ | [Homebrew](#homebrew) | `brew uninstall powerlevel10k` |
| [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).
@@ -967,13 +995,15 @@ Powerlevel10k does not affect:
- Prompt parameters other than `PS1` and `RPS1`.
- Zsh options other than those [related to prompt](
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?
1. Run this command:
```zsh
# Add powerlevel10k to the list of Oh My Zsh themes.
-git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
+git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
# Replace ZSH_THEME="powerlevel9k/powerlevel9k" with ZSH_THEME="powerlevel10k/powerlevel10k".
sed -i.bak 's/powerlevel9k/powerlevel10k/g' ~/.zshrc
# Restart Zsh.
@@ -1134,6 +1164,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` |
| `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` |
+| `=` | 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 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}` |
@@ -1185,7 +1216,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
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 lighter for more contrast. To do that, open
`~/.p10k.zsh`, search for `POWERLEVEL9K_VCS_LOADING_BACKGROUND`, uncomment it if it's commented out,
and change the value.
@@ -1309,15 +1340,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.
-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
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:*
- [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?
@@ -1489,6 +1533,7 @@ Powerlevel10k are released. This may change in the future but not soon.
## Troubleshooting
+- [`[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found`](#oh-my-zsh-theme-powerlevel10kpowerlevel10k-not-found)
- [Question mark in prompt](#question-mark-in-prompt)
- [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)
@@ -1506,9 +1551,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)
- [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)
+- [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)
- [Horrific mess when resizing terminal window](#horrific-mess-when-resizing-terminal-window)
- [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)
+- [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
@@ -1693,10 +1761,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
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
-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
+Another case in which configuration wizard may not offer Unicode prompt styles is when the
+`MULTIBYTE` shell option is disabled. *Fix*: Enable the `MULTIBYTE` option, or rather don't disable
+it (this option is enabled in Zsh by default). Verify with `print -r -- ${options[MULTIBYTE]}`.
+
+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.
### Cannot install the recommended font
@@ -1822,6 +1895,15 @@ There are several ways to fix this.
`POWERLEVEL9K_DIR_ANCHOR_FOREGROUND` and `POWERLEVEL9K_DIR_ANCHOR_BOLD`. You can find them in
`~/.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
When you resize a terminal window horizontally back and forth a few times, you might see this ugly
@@ -2018,3 +2100,16 @@ Some fonts have this incorrect dotted icon in bold typeface. There are two ways
```zsh
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`.
diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh
index 441be2ce..623b9308 100644
--- a/config/p10k-classic.zsh
+++ b/config/p10k-classic.zsh
@@ -81,12 +81,14 @@
context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
+ yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
+ chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
# vi_mode # vi mode (you don't need this if you've enabled prompt_char)
# vpn_ip # virtual private network indicator
# load # CPU load
@@ -96,6 +98,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
+ per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture
# time # current time
# =========================[ Line #2 ]=========================
@@ -168,6 +171,9 @@
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
# Separator between different-color segments on the right.
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
+ # To remove a separator between two segments, add "_joined" to the second segment name.
+ # For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined)
+
# The right end of left prompt.
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
# The left end of right prompt.
@@ -237,7 +243,8 @@
.java-version
.perl-version
.php-version
- .tool-version
+ .tool-versions
+ .mise.toml
.shorten_folder_marker
.svn
.terraform
@@ -423,11 +430,17 @@
res+=" ${modified}wip"
fi
- # ⇣42 if behind the remote.
- (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
- # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
- (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
- (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
+ if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
+ # ⇣42 if behind the remote.
+ (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
+ # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
+ (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
+ (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
+ elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
+ # Tip: Uncomment the next line to display '=' if up to date with the remote.
+ # res+=" ${clean}="
+ fi
+
# ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@@ -717,6 +730,12 @@
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
+ ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
+ # Yazi shell color.
+ typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
@@ -761,6 +780,12 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
+ # chezmoi shell color.
+ typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
@@ -787,9 +812,8 @@
# Text and color for insert vi mode.
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66
-
# Custom icon.
- # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################################[ ram: free RAM ]#######################################
# RAM color.
@@ -871,6 +895,19 @@
# Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
+ # Color when using local/global history.
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
+
+ # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
+
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
################################[ cpu_arch: CPU architecture ]################################
# CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
@@ -1007,6 +1044,11 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
+ # If set to false, hide node version if it's the same as default:
+ # $(nvm version current) == $(nvm version default).
+ typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
+ # If set to false, hide node version if it's equal to "system".
+ typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
# Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@@ -1248,7 +1290,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@@ -1335,7 +1377,7 @@
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws.
- typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
+ typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current AWS profile gets matched.
@@ -1383,10 +1425,39 @@
# Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
+
+ # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
+ # in each pair defines a pattern against which the current azure account name gets matched.
+ # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
+ # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
+ # you'll see this value in your prompt. The second element of each pair in
+ # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
+ # first match wins.
+ #
+ # For example, given these settings:
+ #
+ # typeset -g POWERLEVEL9K_AZURE_CLASSES=(
+ # '*prod*' PROD
+ # '*test*' TEST
+ # '*' OTHER)
+ #
+ # If your current azure account is "company_test", its class is TEST because "company_test"
+ # doesn't match the pattern '*prod*' but does match '*test*'.
+ #
+ # You can define different colors, icons and content expansions for different classes:
+ #
+ # typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28
+ # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
+ typeset -g POWERLEVEL9K_AZURE_CLASSES=(
+ # '*prod*' PROD # These values are examples that are unlikely
+ # '*test*' TEST # to match your needs. Customize them as needed.
+ '*' OTHER)
+
# Azure account name color.
- typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
+ typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
# Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the command you are typing invokes one of these tools.
@@ -1607,7 +1678,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
# is to generate the prompt segment for display in instant prompt. See
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
#
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@@ -1643,7 +1714,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.
diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh
index 50e42617..3f72ff4b 100644
--- a/config/p10k-lean-8colors.zsh
+++ b/config/p10k-lean-8colors.zsh
@@ -81,12 +81,14 @@
context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
+ yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
+ chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
# vpn_ip # virtual private network indicator
# load # CPU load
# disk_usage # disk usage
@@ -95,6 +97,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
+ per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture
# time # current time
# =========================[ Line #2 ]=========================
@@ -231,7 +234,8 @@
.java-version
.perl-version
.php-version
- .tool-version
+ .tool-versions
+ .mise.toml
.shorten_folder_marker
.svn
.terraform
@@ -274,10 +278,6 @@
# the full directory that was used in previous commands.
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
- # Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and
- # POWERLEVEL9K_DIR_CLASSES below.
- typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2
-
# Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
# and POWERLEVEL9K_DIR_CLASSES below.
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
@@ -421,11 +421,17 @@
res+=" ${modified}wip"
fi
- # ⇣42 if behind the remote.
- (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
- # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
- (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
- (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
+ if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
+ # ⇣42 if behind the remote.
+ (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
+ # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
+ (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
+ (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
+ elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
+ # Tip: Uncomment the next line to display '=' if up to date with the remote.
+ # res+=" ${clean}="
+ fi
+
# ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@@ -715,6 +721,12 @@
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
+ ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
+ # Yazi shell color.
+ typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
@@ -759,6 +771,12 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
+ # chezmoi shell color.
+ typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=4
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=2
@@ -852,6 +870,19 @@
# Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
+ # Color when using local/global history.
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=5
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=3
+
+ # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
+
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
################################[ cpu_arch: CPU architecture ]################################
# CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=3
@@ -988,6 +1019,11 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=2
+ # If set to false, hide node version if it's the same as default:
+ # $(nvm version current) == $(nvm version default).
+ typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
+ # If set to false, hide node version if it's equal to "system".
+ typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
# Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@@ -1190,7 +1226,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@@ -1316,7 +1352,7 @@
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws.
- typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
+ typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current AWS profile gets matched.
@@ -1364,10 +1400,39 @@
# Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
+
+ # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
+ # in each pair defines a pattern against which the current azure account name gets matched.
+ # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
+ # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
+ # you'll see this value in your prompt. The second element of each pair in
+ # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
+ # first match wins.
+ #
+ # For example, given these settings:
+ #
+ # typeset -g POWERLEVEL9K_AZURE_CLASSES=(
+ # '*prod*' PROD
+ # '*test*' TEST
+ # '*' OTHER)
+ #
+ # If your current azure account is "company_test", its class is TEST because "company_test"
+ # doesn't match the pattern '*prod*' but does match '*test*'.
+ #
+ # You can define different colors, icons and content expansions for different classes:
+ #
+ # typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2
+ # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
+ typeset -g POWERLEVEL9K_AZURE_CLASSES=(
+ # '*prod*' PROD # These values are examples that are unlikely
+ # '*test*' TEST # to match your needs. Customize them as needed.
+ '*' OTHER)
+
# Azure account name color.
- typeset -g POWERLEVEL9K_AZURE_FOREGROUND=4
+ typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=4
# Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the command you are typing invokes one of these tools.
@@ -1588,7 +1653,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
# is to generate the prompt segment for display in instant prompt. See
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
#
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@@ -1624,7 +1689,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh
index b938ce69..cef70fd8 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -81,12 +81,14 @@
context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
+ yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
+ chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
# vpn_ip # virtual private network indicator
# load # CPU load
# disk_usage # disk usage
@@ -95,6 +97,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
+ per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture
# time # current time
# =========================[ Line #2 ]=========================
@@ -231,7 +234,8 @@
.java-version
.perl-version
.php-version
- .tool-version
+ .tool-versions
+ .mise.toml
.shorten_folder_marker
.svn
.terraform
@@ -417,11 +421,17 @@
res+=" ${modified}wip"
fi
- # ⇣42 if behind the remote.
- (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
- # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
- (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
- (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
+ if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
+ # ⇣42 if behind the remote.
+ (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
+ # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
+ (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
+ (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
+ elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
+ # Tip: Uncomment the next line to display '=' if up to date with the remote.
+ # res+=" ${clean}="
+ fi
+
# ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@@ -711,6 +721,12 @@
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
+ ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
+ # Yazi shell color.
+ typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
@@ -755,6 +771,12 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
+ # chezmoi shell color.
+ typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
@@ -848,6 +870,19 @@
# Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
+ # Color when using local/global history.
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
+
+ # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
+
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
################################[ cpu_arch: CPU architecture ]################################
# CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
@@ -984,6 +1019,11 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
+ # If set to false, hide node version if it's the same as default:
+ # $(nvm version current) == $(nvm version default).
+ typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
+ # If set to false, hide node version if it's equal to "system".
+ typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
# Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@@ -1186,7 +1226,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@@ -1312,7 +1352,7 @@
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws.
- typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
+ typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current AWS profile gets matched.
@@ -1360,10 +1400,39 @@
# Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
+
+ # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
+ # in each pair defines a pattern against which the current azure account name gets matched.
+ # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
+ # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
+ # you'll see this value in your prompt. The second element of each pair in
+ # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
+ # first match wins.
+ #
+ # For example, given these settings:
+ #
+ # typeset -g POWERLEVEL9K_AZURE_CLASSES=(
+ # '*prod*' PROD
+ # '*test*' TEST
+ # '*' OTHER)
+ #
+ # If your current azure account is "company_test", its class is TEST because "company_test"
+ # doesn't match the pattern '*prod*' but does match '*test*'.
+ #
+ # You can define different colors, icons and content expansions for different classes:
+ #
+ # typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28
+ # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
+ typeset -g POWERLEVEL9K_AZURE_CLASSES=(
+ # '*prod*' PROD # These values are examples that are unlikely
+ # '*test*' TEST # to match your needs. Customize them as needed.
+ '*' OTHER)
+
# Azure account name color.
- typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
+ typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
# Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the command you are typing invokes one of these tools.
@@ -1584,7 +1653,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
# is to generate the prompt segment for display in instant prompt. See
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
#
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@@ -1620,7 +1689,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.
diff --git a/config/p10k-pure.zsh b/config/p10k-pure.zsh
index 97c1a207..7a4d2441 100644
--- a/config/p10k-pure.zsh
+++ b/config/p10k-pure.zsh
@@ -169,7 +169,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.
diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh
index e989b0a7..ed74b7fa 100644
--- a/config/p10k-rainbow.zsh
+++ b/config/p10k-rainbow.zsh
@@ -81,12 +81,14 @@
context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
+ yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
+ chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
# vi_mode # vi mode (you don't need this if you've enabled prompt_char)
# vpn_ip # virtual private network indicator
# load # CPU load
@@ -96,6 +98,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
+ per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture
# time # current time
# =========================[ Line #2 ]=========================
@@ -165,6 +168,9 @@
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
# Separator between different-color segments on the right.
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
+ # To remove a separator between two segments, add "_joined" to the second segment name.
+ # For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined)
+
# The right end of left prompt.
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
# The left end of right prompt.
@@ -237,7 +243,8 @@
.java-version
.perl-version
.php-version
- .tool-version
+ .tool-versions
+ .mise.toml
.shorten_folder_marker
.svn
.terraform
@@ -424,11 +431,17 @@
res+=" ${modified}wip"
fi
- # ⇣42 if behind the remote.
- (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
- # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
- (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
- (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
+ if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
+ # ⇣42 if behind the remote.
+ (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
+ # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
+ (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
+ (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
+ elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
+ # Tip: Uncomment the next line to display '=' if up to date with the remote.
+ # res+=" ${clean}="
+ fi
+
# ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@@ -736,7 +749,14 @@
typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
+
+ ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
+ # Yazi shell color.
+ typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3
+ typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=0
@@ -786,6 +806,13 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
+ # chezmoi shell color.
+ typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=0
+ typeset -g POWERLEVEL9K_CHEZMOI_SHELL_BACKGROUND=4
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3
@@ -817,6 +844,8 @@
# Text and color for insert vi mode.
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################################[ ram: free RAM ]#######################################
# RAM color.
@@ -907,6 +936,21 @@
# Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
+ # Color when using local/global history.
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=0
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_BACKGROUND=5
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=0
+ typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_BACKGROUND=3
+
+ # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
+
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
################################[ cpu_arch: CPU architecture ]################################
# CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=0
@@ -1053,6 +1097,11 @@
# Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=0
typeset -g POWERLEVEL9K_NVM_BACKGROUND=5
+ # If set to false, hide node version if it's the same as default:
+ # $(nvm version current) == $(nvm version default).
+ typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
+ # If set to false, hide node version if it's equal to "system".
+ typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
# Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@@ -1321,7 +1370,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@@ -1410,7 +1459,7 @@
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws.
- typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
+ typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current AWS profile gets matched.
@@ -1460,11 +1509,41 @@
# Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
+
+ # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
+ # in each pair defines a pattern against which the current azure account name gets matched.
+ # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
+ # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
+ # you'll see this value in your prompt. The second element of each pair in
+ # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
+ # first match wins.
+ #
+ # For example, given these settings:
+ #
+ # typeset -g POWERLEVEL9K_AZURE_CLASSES=(
+ # '*prod*' PROD
+ # '*test*' TEST
+ # '*' OTHER)
+ #
+ # If your current azure account is "company_test", its class is TEST because "company_test"
+ # doesn't match the pattern '*prod*' but does match '*test*'.
+ #
+ # You can define different colors, icons and content expansions for different classes:
+ #
+ # typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2
+ # typeset -g POWERLEVEL9K_AZURE_TEST_BACKGROUND=0
+ # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
+ typeset -g POWERLEVEL9K_AZURE_CLASSES=(
+ # '*prod*' PROD # These values are examples that are unlikely
+ # '*test*' TEST # to match your needs. Customize them as needed.
+ '*' OTHER)
+
# Azure account name color.
- typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7
- typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4
+ typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=7
+ typeset -g POWERLEVEL9K_AZURE_OTHER_BACKGROUND=4
# Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the command you are typing invokes one of these tools.
@@ -1696,7 +1775,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
# is to generate the prompt segment for display in instant prompt. See
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
#
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@@ -1733,7 +1812,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.
diff --git a/config/p10k-robbyrussell.zsh b/config/p10k-robbyrussell.zsh
index a59e222b..6a204d29 100644
--- a/config/p10k-robbyrussell.zsh
+++ b/config/p10k-robbyrussell.zsh
@@ -87,7 +87,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.
diff --git a/font.md b/font.md
index e7505ef4..cb49af46 100644
--- a/font.md
+++ b/font.md
@@ -55,6 +55,7 @@ If you are using a different terminal, proceed with manual font installation.
- **Windows Terminal** by Microsoft (the new thing): Open *Settings* (Ctrl+,), click
either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set
*Font face* to `MesloLGS NF`.
+ - **Conemu**: Open *Setup → General → Fonts* and set *Main console font* to `MesloLGS NF`.
- **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
name to `MesloLGS NF`.
@@ -62,7 +63,7 @@ If you are using a different terminal, proceed with manual font installation.
*Meslo Nerd Font*.
- **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.
- - **Terminus**: Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
+ - **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
- **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)
and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.
@@ -70,22 +71,29 @@ 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`.
Exit the Preferences dialog by clicking *Close*.
- **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
*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 →
Look and Feel* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
+ - **Warp**: Open Warp and Navigate to *Settings* then *Appearance*. Scroll down to *Text* Section
+ and under *"Terminal Font"*, select the `MesloLGS NF` font.
- **WSLtty**: Right click on an open terminal and then on *Options*. In the *Text* section, under
*Font*, click *"Select..."* and set Font to `MesloLGS NF Regular`.
- **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
new profile and click *Set as Default*.
- - **Alacritty**: Create or open `~/.config/alacritty/alacritty.yml` and add the following section
- to it:
- ```yaml
- font:
- normal:
- family: "MesloLGS NF"
+ - **Alacritty**: Create or open `~/.config/alacritty/alacritty.toml` and add the following
+ section to it:
+ ```toml
+ [font.normal]
+ 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:
```text
@@ -154,6 +162,17 @@ If you are using a different terminal, proceed with manual font installation.
}
```
**_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.
+ - **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section
+ to it:
+ ```ini
+ [basic.interface.font]
+ value = "MesloLGS NF"
+ ```
+ - **Ghostty**: Open *Menu → Open Configuration* (Linux) or *Ghostty → Settings...* (Mac) and add
+ the following line:
+ ```text
+ font-family = "MesloLGS NF"
+ ```
1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work
incorrectly with the new font.
diff --git a/gitstatus/Makefile b/gitstatus/Makefile
index 450d5ea0..4a695acb 100644
--- a/gitstatus/Makefile
+++ b/gitstatus/Makefile
@@ -10,7 +10,7 @@ VERSION ?= $(shell . ./build.info && printf "%s" "$$gitstatus_version")
#
# Sized delete is implemented as __ZdlPvm in /usr/lib/libc++.1.dylib but this symbol is
# missing in macOS prior to 10.13.
-CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) -Wall -Werror # -g -fsanitize=thread
+CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) # -Wall -g -fsanitize=thread
LDFLAGS += -pthread # -fsanitize=thread
LDLIBS += -lgit2 # -lprofiler -lunwind
@@ -44,3 +44,14 @@ pkg: zwc
GITSTATUS_DAEMON= GITSTATUS_CACHE_DIR=$(shell pwd)/usrbin ./install -f
-include $(OBJS:.o=.dep)
+
+.PHONY: help
+
+help:
+ @echo "Usage: make [TARGET]"
+ @echo "Available targets:"
+ @echo " all Build $(APPNAME) (default target)"
+ @echo " clean Remove generated files and directories"
+ @echo " zwc Compile Zsh files"
+ @echo " minify Remove unnecessary files and folders"
+ @echo " pkg Create a package"
diff --git a/gitstatus/README.md b/gitstatus/README.md
index 82a19981..609d5f82 100644
--- a/gitstatus/README.md
+++ b/gitstatus/README.md
@@ -1,5 +1,9 @@
# gitstatus
+- **THE PROJECT HAS VERY LIMITED SUPPORT**
+- **NO NEW FEATURES ARE IN THE WORKS**
+- **MOST BUGS WILL GO UNFIXED**
+
**gitstatus** is a 10x faster alternative to `git status` and `git describe`. Its primary use
case is to enable fast git prompt in interactive shells.
@@ -255,7 +259,7 @@ repository was checked out to an ext4 filesystem on M.2 SSD.
Three functionally equivalent tools for computing git status were benchmarked:
* `gitstatusd`
-* `git` with untracked cache enabled
+* `git` with `core.untrackedcache` enabled and `core.fsmonitor` disabled
* `lg2` -- a demo/example executable from [libgit2](https://github.com/romkatv/libgit2) that
implements a subset of `git` functionality on top of libgit2 API; for the purposes of this
benchmark the subset is sufficient to generate the same data as the other tools
@@ -381,7 +385,7 @@ generated with the same tools and the same flags as the profile of libgit2.
Since both profiles were generated from the same workload, absolute numbers can be compared. We can
see that gitstatusd took 62 seconds in total compared to libgit2's 232 seconds. System calls at the
-core of the algorithm are cleary visible. `__GI___fxstatat` is a flavor of `stat()`, and the other
+core of the algorithm are clearly visible. `__GI___fxstatat` is a flavor of `stat()`, and the other
three calls -- `__libc_openat64`, `__libc_close` and `__GI___fxstat` are responsible for opening
directories and finding untracked files. Notice that there is almost nothing else in the profile
apart from these calls. The rest of the code accounts for 3.77 seconds of CPU time -- 32 times less
diff --git a/gitstatus/build b/gitstatus/build
index e116abb2..ea96a25a 100755
--- a/gitstatus/build
+++ b/gitstatus/build
@@ -153,7 +153,16 @@ case "$gitstatus_cpu" in
;;
esac
-cflags="$archflag=$gitstatus_cpu -fno-plt -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie"
+case "$gitstatus_arch" in
+ e2k)
+ nopltflag=""
+ ;;
+ *)
+ nopltflag="-fno-plt"
+ ;;
+esac
+
+cflags="$archflag=$gitstatus_cpu $nopltflag -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie"
ldflags=
static_pie=
@@ -384,6 +393,7 @@ CFLAGS="$libgit2_cflags" command cmake \
-DUSE_GSSAPI=OFF \
-DUSE_NTLMCLIENT=OFF \
-DBUILD_SHARED_LIBS=OFF \
+ -G "Unix Makefiles" \
$libgit2_cmake_flags \
..
command make -j "$cpus" VERBOSE=1
@@ -545,6 +555,7 @@ if [ -z "$gitstatus_cpu" ]; then
x86_64|amd64) gitstatus_cpu=x86-64;;
x86) gitstatus_cpu=i586;;
s390x) gitstatus_cpu=z900;;
+ e2k) gitstatus_cpu=native;;
i386|i586|i686) gitstatus_cpu="$gitstatus_arch";;
*)
>&2 echo '[error] unable to infer target CPU architecture'
diff --git a/gitstatus/build.info b/gitstatus/build.info
index baa30b07..9bc9411d 100644
--- a/gitstatus/build.info
+++ b/gitstatus/build.info
@@ -3,7 +3,7 @@
#
# This value is also read by shell bindings (indirectly, through
# ./install) when using GITSTATUS_DAEMON or usrbin/gitstatusd.
-gitstatus_version="v1.5.4"
+gitstatus_version="v1.5.5"
# libgit2 is a build time dependency of gitstatusd. The values of
# libgit2_version and libgit2_sha256 are read by ./build.
@@ -18,5 +18,5 @@ gitstatus_version="v1.5.4"
#
# If sha256 of ./deps/libgit2-${libgit2_version}.tar.gz doesn't match,
# build gets aborted.
-libgit2_version="tag-0ad3d776aa86dd607dc86dcd7f77ad3ed7ebec61"
-libgit2_sha256="c5d0117ae74d3ef244c26f10cce022019077dbc4563e6251fa9f56d36868ce74"
+libgit2_version="tag-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6"
+libgit2_sha256="4ce11d71ee576dbbc410b9fa33a9642809cc1fa687b315f7c23eeb825b251e93"
diff --git a/gitstatus/gitstatus.plugin.sh b/gitstatus/gitstatus.plugin.sh
index 37b78f44..bfe16dc2 100644
--- a/gitstatus/gitstatus.plugin.sh
+++ b/gitstatus/gitstatus.plugin.sh
@@ -290,7 +290,7 @@ function gitstatus_stop() {
unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE _GITSTATUS_CLIENT_PID
}
-# Retrives status of a git repository from a directory under its working tree.
+# Retrieves status of a git repository from a directory under its working tree.
#
# Usage: gitstatus_query [OPTION]...
#
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh
index 228fea74..b74396d3 100644
--- a/gitstatus/gitstatus.plugin.zsh
+++ b/gitstatus/gitstatus.plugin.zsh
@@ -59,7 +59,7 @@ zmodload -F zsh/files b:zf_rm || return
typeset -g _gitstatus_plugin_dir"${1:-}"="${${(%):-%x}:A:h}"
-# Retrives status of a git repo from a directory under its working tree.
+# Retrieves status of a git repo from a directory under its working tree.
#
## Usage: gitstatus_query [OPTION]... NAME
#
diff --git a/gitstatus/gitstatus.prompt.sh b/gitstatus/gitstatus.prompt.sh
index 8ee28de0..f54c11ac 100644
--- a/gitstatus/gitstatus.prompt.sh
+++ b/gitstatus/gitstatus.prompt.sh
@@ -2,7 +2,7 @@
# Source gitstatus.plugin.sh from $GITSTATUS_DIR or from the same directory
# in which the current script resides if the variable isn't set.
-if [[ -n "${GITSTATUS_DIR:-}" ]]; then
+if [[ -n "${GITSTATUS_DIR-}" ]]; then
source "$GITSTATUS_DIR" || return
elif [[ "${BASH_SOURCE[0]}" == */* ]]; then
source "${BASH_SOURCE[0]%/*}/gitstatus.plugin.sh" || return
@@ -85,7 +85,14 @@ function gitstatus_prompt_update() {
gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1
# On every prompt, fetch git status and set GITSTATUS_PROMPT.
-PROMPT_COMMAND=gitstatus_prompt_update
+if [[ -z "${PROMPT_COMMAND[*]}" ]]; then
+ PROMPT_COMMAND=gitstatus_prompt_update
+elif [[ ! "${PROMPT_COMMAND[*]}" =~ [[:space:]\;]?gitstatus_prompt_update[[:space:]\;]? ]]; then
+ # Note: If PROMPT_COMMAND is an array, this will modify its first element.
+ PROMPT_COMMAND=$'gitstatus_prompt_update\n'"$PROMPT_COMMAND"
+fi
+
+# Retain 3 trailing components of the current directory.
PROMPT_DIRTRIM=3
# Enable promptvars so that ${GITSTATUS_PROMPT} in PS1 is expanded.
diff --git a/gitstatus/src/check.h b/gitstatus/src/check.h
index 82dceae1..682675a2 100644
--- a/gitstatus/src/check.h
+++ b/gitstatus/src/check.h
@@ -23,7 +23,7 @@
#include
// The argument must be an expression convertible to bool.
-// Does nothing if the expression evalutes to true. Otherwise
+// Does nothing if the expression evaluates to true. Otherwise
// it's equivalent to LOG(FATAL).
#define CHECK(cond...) \
static_cast(0), (!!(cond)) ? static_cast(0) : LOG(FATAL) << #cond << ": "
diff --git a/gitstatus/src/dir.h b/gitstatus/src/dir.h
index 4d4cf3da..2a7533a3 100644
--- a/gitstatus/src/dir.h
+++ b/gitstatus/src/dir.h
@@ -25,7 +25,7 @@
namespace gitstatus {
-// On error, leaves entries unchaged and returns false. Does not throw.
+// On error, leaves entries unchanged and returns false. Does not throw.
//
// On success, appends names of files from the specified directory to entries and returns true.
// Every appended entry is a null-terminated string. At -1 offset is its d_type. All elements
diff --git a/gitstatus/src/options.cc b/gitstatus/src/options.cc
index 46f3845c..b7abe5db 100644
--- a/gitstatus/src/options.cc
+++ b/gitstatus/src/options.cc
@@ -61,7 +61,7 @@ size_t ParseSizeT(const char* s) {
void PrintUsage() {
std::cout << "Usage: gitstatusd [OPTION]...\n"
- << "Print machine-readable status of the git repos for directores in stdin.\n"
+ << "Print machine-readable status of the git repos for directories in stdin.\n"
<< "\n"
<< "OPTIONS\n"
<< " -l, --lock-fd=NUM [default=-1]\n"
@@ -78,7 +78,7 @@ void PrintUsage() {
<< " maximum performance.\n"
<< "\n"
<< " -v, --log-level=STR [default=INFO]\n"
- << " Don't write entires to log whose log level is below this. Log levels in\n"
+ << " Don't write entries to log whose log level is below this. Log levels in\n"
<< " increasing order: DEBUG, INFO, WARN, ERROR, FATAL.\n"
<< "\n"
<< " -r, --repo-ttl-seconds=NUM [default=3600]\n"
@@ -141,7 +141,7 @@ void PrintUsage() {
<< "\n"
<< " 1. Request ID. Any string. Can be empty.\n"
<< " 2. Path to the directory for which git stats are being requested.\n"
- << " If the first character is ':', it is removed and the remaning path\n"
+ << " If the first character is ':', it is removed and the remaining path\n"
<< " is treated as GIT_DIR.\n"
<< " 3. (Optional) '1' to disable computation of anything that requires reading\n"
<< " git index; '0' for the default behavior of computing everything.\n"
diff --git a/gitstatus/src/options.h b/gitstatus/src/options.h
index fd561e11..bb373155 100644
--- a/gitstatus/src/options.h
+++ b/gitstatus/src/options.h
@@ -62,7 +62,7 @@ struct Options : Limits {
// If non-negative, send signal 0 to the specified PID when not receiving any requests for one
// second; exit if signal sending fails.
int parent_pid = -1;
- // Don't write entires to log whose log level is below this. Log levels in increasing order:
+ // Don't write entries to log whose log level is below this. Log levels in increasing order:
// DEBUG, INFO, WARN, ERROR, FATAL.
LogLevel log_level = INFO;
// Close git repositories that haven't been used for this long. This is meant to release resources
diff --git a/gitstatus/src/repo.cc b/gitstatus/src/repo.cc
index d7ea7d3e..a81594a4 100644
--- a/gitstatus/src/repo.cc
+++ b/gitstatus/src/repo.cc
@@ -155,7 +155,7 @@ IndexStats Repo::GetIndexStats(const git_oid* head, git_config* cfg) {
VERIFY(!git_repository_index(&git_index_, repo_)) << GitError();
// Query an attribute (doesn't matter which) to initialize repo's attribute
// cache. It's a workaround for synchronization bugs (data races) in libgit2
- // that result from lazy cache initialization without synchrnonization.
+ // that result from lazy cache initialization without synchronization.
// Thankfully, subsequent cache reads and writes are properly synchronized.
const char* attr;
VERIFY(!git_attr_get(&attr, repo_, 0, "x", "x")) << GitError();
diff --git a/gitstatus/src/tag_db.cc b/gitstatus/src/tag_db.cc
index 52cbaede..8bd445c7 100644
--- a/gitstatus/src/tag_db.cc
+++ b/gitstatus/src/tag_db.cc
@@ -268,7 +268,7 @@ void TagDb::ParsePack() {
}
if (!std::is_sorted(name2id_.begin(), name2id_.end(), ByName)) {
- // "sorted" in the header of packed-refs promisses that this won't trigger.
+ // "sorted" in the header of packed-refs promises that this won't trigger.
std::sort(name2id_.begin(), name2id_.end(), ByName);
}
diff --git a/internal/configure.zsh b/internal/configure.zsh
index 3e880f23..0e13bdec 100644
--- a/internal/configure.zsh
+++ b/internal/configure.zsh
@@ -18,7 +18,6 @@ function _p9k_can_configure() {
typeset -g __p9k_cfg_path=${__p9k_cfg_path_o:A}
typeset -g __p9k_cfg_path_u=${${${(q)__p9k_cfg_path_o}/#(#b)${(q)HOME}(|\/*)/'~'$match[1]}//\%/%%}
{
- [[ -o multibyte ]] || { $0_error "multibyte option is not set"; return 1 }
[[ -e $__p9k_zd ]] || { $0_error "$__p9k_zd_u does not exist"; return 1 }
[[ -d $__p9k_zd ]] || { $0_error "$__p9k_zd_u is not a directory"; return 1 }
[[ ! -d $__p9k_cfg_path ]] || { $0_error "$__p9k_cfg_path_u is a directory"; return 1 }
diff --git a/internal/icons.zsh b/internal/icons.zsh
index 6b3a9b09..1d1cafbb 100644
--- a/internal/icons.zsh
+++ b/internal/icons.zsh
@@ -73,6 +73,10 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON '\uE271'$s #
LINUX_AMZN_ICON '\uE271'$s #
LINUX_ENDEAVOUROS_ICON '\uE271'$s #
+ LINUX_ROCKY_ICON '\uE271'$s #
+ LINUX_ALMALINUX_ICON '\uE271'$s #
+ LINUX_GUIX_ICON '\uE271'$s #
+ LINUX_NEON_ICON '\uE271'$s #
SUNOS_ICON '\U1F31E'$q # 🌞
HOME_ICON '\uE12C'$s #
HOME_SUB_ICON '\uE18D'$s #
@@ -103,10 +107,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uE20E ' #
VCS_GIT_BITBUCKET_ICON '\uE20E ' #
VCS_GIT_GITLAB_ICON '\uE20E ' #
+ VCS_GIT_AZURE_ICON '\uE20E ' #
+ VCS_GIT_ARCHLINUX_ICON '\uE20E ' #
+ VCS_GIT_CODEBERG_ICON '\uE20E ' #
+ VCS_GIT_DEBIAN_ICON '\uE20E ' #
+ VCS_GIT_FREEBSD_ICON '\uE20E ' #
+ VCS_GIT_FREEDESKTOP_ICON '\uE20E ' #
+ VCS_GIT_GNOME_ICON '\uE20E ' #
+ VCS_GIT_GNU_ICON '\uE20E ' #
+ VCS_GIT_KDE_ICON '\uE20E ' #
+ VCS_GIT_LINUX_ICON '\uE20E ' #
+ VCS_GIT_GITEA_ICON '\uE20E ' #
+ VCS_GIT_SOURCEHUT_ICON '\uE20E ' #
VCS_HG_ICON '\uE1C3 ' #
VCS_SVN_ICON 'svn'$q
RUST_ICON 'R'
PYTHON_ICON '\uE63C'$s # (doesn't always work)
+ CHEZMOI_ICON '\uE12C'$s #
SWIFT_ICON 'Swift'
GO_ICON 'Go'
GOLANG_ICON 'Go'
@@ -123,6 +140,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
+ YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@@ -152,6 +170,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
+ HISTORY_ICON 'hist'
)
;;
'awesome-fontconfig')
@@ -213,6 +232,10 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON '\uF17C'$s #
LINUX_AMZN_ICON '\uF17C'$s #
LINUX_ENDEAVOUROS_ICON '\uF17C'$s #
+ LINUX_ROCKY_ICON '\uF17C'$s #
+ LINUX_ALMALINUX_ICON '\uF17C'$s #
+ LINUX_GUIX_ICON '\uF17C'$s #
+ LINUX_NEON_ICON '\uF17C'$s #
SUNOS_ICON '\uF185 ' #
HOME_ICON '\uF015'$s #
HOME_SUB_ICON '\uF07C'$s #
@@ -239,10 +262,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uF113 ' #
VCS_GIT_BITBUCKET_ICON '\uF171 ' #
VCS_GIT_GITLAB_ICON '\uF296 ' #
+ VCS_GIT_AZURE_ICON '\u2601 ' # ☁
+ VCS_GIT_ARCHLINUX_ICON '\uF1D3 ' #
+ VCS_GIT_CODEBERG_ICON '\uF1D3 ' #
+ VCS_GIT_DEBIAN_ICON '\uF1D3 ' #
+ VCS_GIT_FREEBSD_ICON '\uF1D3 ' #
+ VCS_GIT_FREEDESKTOP_ICON '\uF1D3 ' #
+ VCS_GIT_GNOME_ICON '\uF1D3 ' #
+ VCS_GIT_GNU_ICON '\uF1D3 ' #
+ VCS_GIT_KDE_ICON '\uF1D3 ' #
+ VCS_GIT_LINUX_ICON '\uF1D3 ' #
+ VCS_GIT_GITEA_ICON '\uF1D3 ' #
+ VCS_GIT_SOURCEHUT_ICON '\uF1D3 ' #
VCS_HG_ICON '\uF0C3 ' #
VCS_SVN_ICON 'svn'$q
RUST_ICON '\uE6A8' #
PYTHON_ICON '\uE63C'$s #
+ CHEZMOI_ICON '\uF015'$s #
SWIFT_ICON 'Swift'
GO_ICON 'Go'
GOLANG_ICON 'Go'
@@ -259,6 +295,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
+ YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@@ -288,6 +325,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
+ HISTORY_ICON 'hist'
)
;;
'awesome-mapped-fontconfig')
@@ -354,6 +392,10 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_AMZN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_ENDEAVOUROS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
+ LINUX_ROCKY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
+ LINUX_ALMALINUX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
+ LINUX_GUIX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
+ LINUX_NEON_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
SUNOS_ICON "${CODEPOINT_OF_AWESOME_SUN_O:+\\u$CODEPOINT_OF_AWESOME_SUN_O }"
HOME_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME$s}"
HOME_SUB_ICON "${CODEPOINT_OF_AWESOME_FOLDER_OPEN:+\\u$CODEPOINT_OF_AWESOME_FOLDER_OPEN$s}"
@@ -380,10 +422,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON "${CODEPOINT_OF_AWESOME_GITHUB_ALT:+\\u$CODEPOINT_OF_AWESOME_GITHUB_ALT }"
VCS_GIT_BITBUCKET_ICON "${CODEPOINT_OF_AWESOME_BITBUCKET:+\\u$CODEPOINT_OF_AWESOME_BITBUCKET }"
VCS_GIT_GITLAB_ICON "${CODEPOINT_OF_AWESOME_GITLAB:+\\u$CODEPOINT_OF_AWESOME_GITLAB }"
+ VCS_GIT_AZURE_ICON '\u2601 ' # ☁
+ VCS_GIT_ARCHLINUX_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_CODEBERG_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_DEBIAN_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_FREEBSD_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_FREEDESKTOP_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_GNOME_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_GNU_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_KDE_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_LINUX_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_GITEA_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
+ VCS_GIT_SOURCEHUT_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_HG_ICON "${CODEPOINT_OF_AWESOME_FLASK:+\\u$CODEPOINT_OF_AWESOME_FLASK }"
VCS_SVN_ICON 'svn'$q
RUST_ICON '\uE6A8' #
PYTHON_ICON '\U1F40D' # 🐍
+ CHEZMOI_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME$s}"
SWIFT_ICON '\uE655'$s #
PUBLIC_IP_ICON "${CODEPOINT_OF_AWESOME_GLOBE:+\\u$CODEPOINT_OF_AWESOME_GLOBE$s}"
LOCK_ICON "${CODEPOINT_OF_AWESOME_LOCK:+\\u$CODEPOINT_OF_AWESOME_LOCK}"
@@ -398,6 +453,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
+ YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@@ -427,6 +483,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
+ HISTORY_ICON 'hist'
)
;;
'nerdfont-v3')
@@ -485,9 +542,13 @@ function _p9k_init_icons() {
LINUX_ARTIX_ICON '\UF31F'$s #
LINUX_UBUNTU_ICON '\uF31b'$s #
LINUX_KALI_ICON '\uF327'$s #
- LINUX_RHEL_ICON '\uF316'$s #
+ LINUX_RHEL_ICON '\UF111B'$s #
LINUX_AMZN_ICON '\uF270'$s #
LINUX_ENDEAVOUROS_ICON '\UF322'$s #
+ LINUX_ROCKY_ICON '\UF32B'$s #
+ LINUX_ALMALINUX_ICON '\UF31D'$s #
+ LINUX_GUIX_ICON '\UF325'$s #
+ LINUX_NEON_ICON '\uF17C' #
LINUX_ICON '\uF17C' #
SUNOS_ICON '\uF185 ' #
HOME_ICON '\uF015'$s #
@@ -515,10 +576,28 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uF113 ' #
VCS_GIT_BITBUCKET_ICON '\uE703 ' #
VCS_GIT_GITLAB_ICON '\uF296 ' #
+ VCS_GIT_AZURE_ICON '\uEBE8 ' #
+ VCS_GIT_ARCHLINUX_ICON '\uF303 ' #
+ # v3.1 has \uF330.
+ VCS_GIT_CODEBERG_ICON '\uF1D3 ' #
+ VCS_GIT_DEBIAN_ICON '\uF306 ' #
+ VCS_GIT_FREEBSD_ICON '\UF30C ' #
+ # v3.1 has \uF360.
+ VCS_GIT_FREEDESKTOP_ICON '\uF296 ' #
+ # v3.1 has \uF361.
+ VCS_GIT_GNOME_ICON '\uF296 ' #
+ VCS_GIT_GNU_ICON '\uE779 ' #
+ # v3.1 has \uF332.
+ VCS_GIT_KDE_ICON '\uF296 ' #
+ VCS_GIT_LINUX_ICON '\uF17C ' #
+ # v3.1 has \uF339.
+ VCS_GIT_GITEA_ICON '\uF1D3 ' #
+ VCS_GIT_SOURCEHUT_ICON '\uF1DB ' #
VCS_HG_ICON '\uF0C3 ' #
VCS_SVN_ICON '\uE72D'$q #
RUST_ICON '\uE7A8'$q #
PYTHON_ICON '\UE73C ' #
+ CHEZMOI_ICON '\uF015'$s #
SWIFT_ICON '\uE755' #
GO_ICON '\uE626' #
GOLANG_ICON '\uE626' #
@@ -535,13 +614,14 @@ function _p9k_init_icons() {
JAVA_ICON '\uE738' #
LARAVEL_ICON '\ue73f'$q #
RANGER_ICON '\uF00b ' #
+ YAZI_ICON '\uF00b ' #
MIDNIGHT_COMMANDER_ICON 'mc' # mc
VIM_ICON '\uE62B' #
TERRAFORM_ICON '\uF1BB ' #
PROXY_ICON '\u2194' # ↔
DOTNET_ICON '\uE77F' #
DOTNET_CORE_ICON '\uE77F' #
- AZURE_ICON '\UF0805' #
+ AZURE_ICON '\uEBD8 ' #
DIRENV_ICON '\u25BC' # ▼
FLUTTER_ICON 'F' # F
GCLOUD_ICON '\UF02AD' #
@@ -564,6 +644,7 @@ function _p9k_init_icons() {
SCALA_ICON '\uE737' #
TOOLBOX_ICON '\uE20F'$s #
ARCH_ICON '\uE266' #
+ HISTORY_ICON '\uF1DA'$s #
)
;;
'nerdfont-complete'|'nerdfont-fontconfig')
@@ -625,6 +706,10 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON '\uF316'$s #
LINUX_AMZN_ICON '\uF270'$s #
LINUX_ENDEAVOUROS_ICON '\uF17C' #
+ LINUX_ROCKY_ICON '\uF17C' #
+ LINUX_ALMALINUX_ICON '\uF17C' #
+ LINUX_GUIX_ICON '\uF325'$s #
+ LINUX_NEON_ICON '\uF17C' #
LINUX_ICON '\uF17C' #
SUNOS_ICON '\uF185 ' #
HOME_ICON '\uF015'$s #
@@ -652,10 +737,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uF113 ' #
VCS_GIT_BITBUCKET_ICON '\uE703 ' #
VCS_GIT_GITLAB_ICON '\uF296 ' #
+ VCS_GIT_AZURE_ICON '\uFD03 ' # ﴃ
+ VCS_GIT_ARCHLINUX_ICON '\uF303 ' #
+ VCS_GIT_CODEBERG_ICON '\uF1D3 ' #
+ VCS_GIT_DEBIAN_ICON '\uF306 ' #
+ VCS_GIT_FREEBSD_ICON '\UF30C ' #
+ VCS_GIT_FREEDESKTOP_ICON '\uF296 ' #
+ VCS_GIT_GNOME_ICON '\uF296 ' #
+ VCS_GIT_GNU_ICON '\uE779 ' #
+ VCS_GIT_KDE_ICON '\uF296 ' #
+ VCS_GIT_LINUX_ICON '\uF17C ' #
+ VCS_GIT_GITEA_ICON '\uF1D3 ' #
+ VCS_GIT_SOURCEHUT_ICON '\uF1DB ' #
VCS_HG_ICON '\uF0C3 ' #
VCS_SVN_ICON '\uE72D'$q #
RUST_ICON '\uE7A8'$q #
PYTHON_ICON '\UE73C ' #
+ CHEZMOI_ICON '\uF015'$s #
SWIFT_ICON '\uE755' #
GO_ICON '\uE626' #
GOLANG_ICON '\uE626' #
@@ -672,6 +770,7 @@ function _p9k_init_icons() {
JAVA_ICON '\uE738' #
LARAVEL_ICON '\ue73f'$q #
RANGER_ICON '\uF00b ' #
+ YAZI_ICON '\uF00b ' #
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON '\uE62B' #
TERRAFORM_ICON '\uF1BB ' #
@@ -701,6 +800,7 @@ function _p9k_init_icons() {
SCALA_ICON '\uE737' #
TOOLBOX_ICON '\uE20F'$s #
ARCH_ICON '\uE266' #
+ HISTORY_ICON '\uF1DA'$s #
)
;;
ascii)
@@ -760,6 +860,10 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON 'rhel'
LINUX_AMZN_ICON 'amzn'
LINUX_ENDEAVOUROS_ICON 'edvos'
+ LINUX_ROCKY_ICON 'rocky'
+ LINUX_ALMALINUX_ICON 'alma'
+ LINUX_GUIX_ICON 'guix'
+ LINUX_NEON_ICON 'neon'
SUNOS_ICON 'sunos'
HOME_ICON ''
HOME_SUB_ICON ''
@@ -786,10 +890,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON ''
VCS_GIT_BITBUCKET_ICON ''
VCS_GIT_GITLAB_ICON ''
+ VCS_GIT_AZURE_ICON ''
+ VCS_GIT_ARCHLINUX_ICON ''
+ VCS_GIT_CODEBERG_ICON ''
+ VCS_GIT_DEBIAN_ICON ''
+ VCS_GIT_FREEBSD_ICON ''
+ VCS_GIT_FREEDESKTOP_ICON ''
+ VCS_GIT_GNOME_ICON ''
+ VCS_GIT_GNU_ICON ''
+ VCS_GIT_KDE_ICON ''
+ VCS_GIT_LINUX_ICON ''
+ VCS_GIT_GITEA_ICON ''
+ VCS_GIT_SOURCEHUT_ICON ''
VCS_HG_ICON ''
VCS_SVN_ICON ''
RUST_ICON 'rust'
PYTHON_ICON 'py'
+ CHEZMOI_ICON 'chezmoi'
SWIFT_ICON 'swift'
GO_ICON 'go'
GOLANG_ICON 'go'
@@ -806,6 +923,7 @@ function _p9k_init_icons() {
JAVA_ICON 'java'
LARAVEL_ICON ''
RANGER_ICON 'ranger'
+ YAZI_ICON 'yazi'
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@@ -835,6 +953,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala'
TOOLBOX_ICON 'toolbox'
ARCH_ICON 'arch'
+ HISTORY_ICON 'hist'
)
;;
*)
@@ -896,6 +1015,10 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON 'RH'
LINUX_AMZN_ICON 'Amzn'
LINUX_ENDEAVOUROS_ICON 'Edv'
+ LINUX_ROCKY_ICON 'Roc'
+ LINUX_ALMALINUX_ICON 'Alma'
+ LINUX_GUIX_ICON 'Guix'
+ LINUX_NEON_ICON 'Neon'
SUNOS_ICON 'Sun'
HOME_ICON ''
HOME_SUB_ICON ''
@@ -922,10 +1045,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON ''
VCS_GIT_BITBUCKET_ICON ''
VCS_GIT_GITLAB_ICON ''
+ VCS_GIT_AZURE_ICON ''
+ VCS_GIT_ARCHLINUX_ICON ''
+ VCS_GIT_CODEBERG_ICON ''
+ VCS_GIT_DEBIAN_ICON ''
+ VCS_GIT_FREEBSD_ICON ''
+ VCS_GIT_FREEDESKTOP_ICON ''
+ VCS_GIT_GNOME_ICON ''
+ VCS_GIT_GNU_ICON ''
+ VCS_GIT_KDE_ICON ''
+ VCS_GIT_LINUX_ICON ''
+ VCS_GIT_GITEA_ICON ''
+ VCS_GIT_SOURCEHUT_ICON ''
VCS_HG_ICON ''
VCS_SVN_ICON ''
RUST_ICON 'R'
PYTHON_ICON 'Py'
+ CHEZMOI_ICON 'Chez'
SWIFT_ICON 'Swift'
GO_ICON 'Go'
GOLANG_ICON 'Go'
@@ -942,6 +1078,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
+ YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@@ -971,6 +1108,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
+ HISTORY_ICON 'hist'
)
;;
esac
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index a8223299..f73dd208 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -532,7 +532,7 @@ _p9k_get_icon() {
_p9k_translate_color() {
if [[ $1 == <-> ]]; then # decimal color code: 255
_p9k__ret=${(l.3..0.)1}
- elif [[ $1 == '#'[[:xdigit:]]## ]]; then # hexademical color code: #ffffff
+ elif [[ $1 == '#'[[:xdigit:]]## ]]; then # hexadecimal color code: #ffffff
_p9k__ret=${${(L)1}//ı/i}
else # named color: red
# Strip prifixes if there are any.
@@ -1179,7 +1179,7 @@ function _p9k_parse_aws_config() {
################################################################
# AWS Profile
prompt_aws() {
- typeset -g P9K_AWS_PROFILE="${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}"
+ typeset -g P9K_AWS_PROFILE="${AWS_SSO_PROFILE:-${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}}"
local pat class state
for pat class in "${_POWERLEVEL9K_AWS_CLASSES[@]}"; do
if [[ $P9K_AWS_PROFILE == ${~pat} ]]; then
@@ -1206,7 +1206,7 @@ prompt_aws() {
}
_p9k_prompt_aws_init() {
- typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}'
+ typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${AWS_SSO_PROFILE:-${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}}'
}
################################################################
@@ -1314,7 +1314,7 @@ function _p9k_fvm_old() {
}
function _p9k_fvm_new() {
- _p9k_upglob .fvm @ && return 1
+ _p9k_upglob .fvm/flutter_sdk @ && return 1
local sdk=$_p9k__parent_dirs[$?]/.fvm/flutter_sdk
if [[ ${sdk:A} == (#b)*/versions/([^/]##) ]]; then
_p9k_prompt_segment prompt_fvm blue $_p9k_color1 FLUTTER_ICON 0 '' ${match[1]//\%/%%}
@@ -1410,6 +1410,9 @@ _p9k_prompt_battery_set_args() {
local -i is_full=1 is_calculating is_charching
local dir
for dir in $bats; do
+ _p9k_read_file $dir/status(N) && local bat_status=$_p9k__ret || continue
+ # Skip batteries with "Unknown" status: https://github.com/romkatv/powerlevel10k/pull/2562.
+ [[ $bat_status == Unknown ]] && continue
local -i pow=0 full=0
if _p9k_read_file $dir/(energy_full|charge_full|charge_counter)(N); then
(( energy_full += ${full::=_p9k__ret} ))
@@ -1422,7 +1425,6 @@ _p9k_prompt_battery_set_args() {
elif _p9k_read_file $dir/(energy|charge)_now(N); then
(( energy_now += _p9k__ret ))
fi
- _p9k_read_file $dir/status(N) && local bat_status=$_p9k__ret || continue
[[ $bat_status != Full ]] && is_full=0
[[ $bat_status == Charging ]] && is_charching=1
[[ $bat_status == (Charging|Discharging) && $pow == 0 ]] && is_calculating=1
@@ -1904,7 +1906,7 @@ prompt_dir() {
else
local key=
fi
- if ! _p9k_cache_ephemeral_get $0 $e $i $_p9k__cwd || [[ $key != $_p9k__cache_val[1] ]]; then
+ if ! _p9k_cache_ephemeral_get $0 $e $i $_p9k__cwd $p || [[ $key != $_p9k__cache_val[1] ]]; then
local rtail=${(j./.)rparts[i,-1]}
local parent=$_p9k__cwd[1,-2-$#rtail]
_p9k_prompt_length $delim
@@ -2317,7 +2319,11 @@ prompt_laravel_version() {
[[ -r $app ]] || return
if ! _p9k_cache_stat_get $0 $dir/artisan $app; then
local v="$(php $dir/artisan --version 2> /dev/null)"
- _p9k_cache_stat_set "${${(M)v:#Laravel Framework *}#Laravel Framework }"
+ v="${${(M)v:#Laravel Framework *}#Laravel Framework }"
+ # In some versions the output is colorized.
+ # https://github.com/romkatv/powerlevel10k/issues/2534
+ v=${${v#$'\e['<->m}%$'\e['<->m}
+ _p9k_cache_stat_set "$v"
fi
[[ -n $_p9k__cache_val[1] ]] || return
_p9k_prompt_segment "$0" "maroon" "white" 'LARAVEL_ICON' 0 '' "${_p9k__cache_val[1]//\%/%%}"
@@ -2420,7 +2426,7 @@ function _p9k_cached_cmd() {
}
################################################################
-# Segment to diplay Node version
+# Segment to display Node version
prompt_node_version() {
_p9k_upglob package.json -.
local -i idx=$?
@@ -2567,7 +2573,13 @@ _p9k_nvm_ls_current() {
prompt_nvm() {
[[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return
local current=$_p9k__ret
- ! _p9k_nvm_ls_default || [[ $_p9k__ret != $current ]] || return
+ (( _POWERLEVEL9K_NVM_SHOW_SYSTEM )) ||
+ [[ $current != system ]] ||
+ return
+ (( _POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW )) ||
+ ! _p9k_nvm_ls_default ||
+ [[ $_p9k__ret != $current ]] ||
+ return
_p9k_prompt_segment "$0" "magenta" "black" 'NODE_ICON' 0 '' "${${current#v}//\%/%%}"
}
@@ -3180,70 +3192,57 @@ instant_prompt_root_indicator() { prompt_root_indicator; }
################################################################
# Segment to display Rust version number
prompt_rust_version() {
- unset P9K_RUST_VERSION
- if (( _POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY )); then
- _p9k_upglob Cargo.toml -. && return
- fi
- local rustc=$commands[rustc] toolchain deps=()
- if (( $+commands[ldd] )); then
- if ! _p9k_cache_stat_get $0_so $rustc; then
- local line so
- for line in "${(@f)$(ldd $rustc 2>/dev/null)}"; do
- [[ $line == (#b)[[:space:]]#librustc_driver[^[:space:]]#.so' => '(*)' (0x'[[:xdigit:]]#')' ]] || continue
- so=$match[1]
- break
- done
- _p9k_cache_stat_set "$so"
- fi
- deps+=$_p9k__cache_val[1]
- fi
- if (( $+commands[rustup] )); then
- local rustup=$commands[rustup]
- local rustup_home=${RUSTUP_HOME:-~/.rustup}
- local cfg=($rustup_home/settings.toml(.N))
- deps+=($cfg $rustup_home/update-hashes/*(.N))
- if [[ -z ${toolchain::=$RUSTUP_TOOLCHAIN} ]]; then
- if ! _p9k_cache_stat_get $0_overrides $rustup $cfg; then
- local lines=(${(f)"$(rustup override list 2>/dev/null)"})
- if [[ $lines[1] == "no overrides" ]]; then
- _p9k_cache_stat_set
- else
- local MATCH
- local keys=(${(@)${lines%%[[:space:]]#[^[:space:]]#}/(#m)*/${(b)MATCH}/})
- local vals=(${(@)lines/(#m)*/$MATCH[(I)/] ${MATCH##*[[:space:]]}})
- _p9k_cache_stat_set ${keys:^vals}
- fi
- fi
- local -A overrides=($_p9k__cache_val)
- _p9k_upglob rust-toolchain -.
- local dir=$_p9k__parent_dirs[$?]
- local -i n m=${dir[(I)/]}
- local pair
- for pair in ${overrides[(K)$_p9k__cwd/]}; do
- n=${pair%% *}
- (( n <= m )) && continue
- m=n
- toolchain=${pair#* }
- done
- if [[ -z $toolchain && -n $dir ]]; then
- _p9k_read_word $dir/rust-toolchain
- toolchain=$_p9k__ret
- fi
- fi
- fi
- if ! _p9k_cache_stat_get $0_v$toolchain $rustc $deps; then
- _p9k_cache_stat_set "$($rustc --version 2>/dev/null)"
- fi
- local v=${${_p9k__cache_val[1]#rustc }%% *}
- [[ -n $v ]] || return
- typeset -g P9K_RUST_VERSION=$_p9k__cache_val[1]
- _p9k_prompt_segment "$0" "darkorange" "$_p9k_color1" 'RUST_ICON' 0 '' "${v//\%/%%}"
+ local -i len=$#_p9k__prompt _p9k__has_upglob
+ _p9k_prompt_segment $0 darkorange $_p9k_color1 RUST_ICON 1 '$P9K_RUST_VERSION' '${P9K_RUST_VERSION//\%/%%}'
+ (( _p9k__has_upglob )) || typeset -g "_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]"=$_p9k__prompt[len+1,-1]
}
-_p9k_prompt_rust_version_init() {
+function _p9k_prompt_rust_version_init() {
+ _p9k__async_segments_compute+='_p9k_rust_version_prefetch'
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[rustc]'
}
+_p9k_rust_version_prefetch() {
+ local rustc=$commands[rustc]
+ if [[ -z $rustc ]] ||
+ { (( _POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY )) && _p9k_upglob Cargo.toml -. }; then
+ unset P9K_RUST_VERSION
+ return
+ fi
+ _p9k_worker_invoke rust_version \
+ "_p9k_prompt_rust_version_compute ${(q)P9K_RUST_VERSION} ${(q)rustc} ${(q)_p9k__cwd_a}"
+}
+
+_p9k_prompt_rust_version_compute() {
+ _p9k_worker_async \
+ "_p9k_prompt_rust_version_async ${(q)1} ${(q)2} ${(q)3}" \
+ _p9k_prompt_rust_version_sync
+}
+
+_p9k_prompt_rust_version_async() {
+ typeset -g P9K_RUST_VERSION=$1
+ local rustc=$2 cwd=$3 v
+ if pushd -q -- $cwd; then
+ {
+ v=${${"$($rustc --version)"#rustc }%% *} || v=
+ } always {
+ popd -q
+ }
+ fi
+
+ [[ $v != $P9K_RUST_VERSION ]] || return
+ typeset -g P9K_RUST_VERSION=$v
+ _p9k_print_params P9K_RUST_VERSION
+ echo -E - 'reset=1'
+}
+
+_p9k_prompt_rust_version_sync() {
+ if [[ -n $REPLY ]]; then
+ eval $REPLY
+ _p9k_worker_reply $REPLY
+ fi
+}
+
# RSpec test ratio
prompt_rspec_stats() {
if [[ -d app && -d spec ]]; then
@@ -3712,7 +3711,7 @@ function +vi-hg-bookmarks() {
if [[ -n "${hgbmarks[@]}" ]]; then
hook_com[hg-bookmark-string]=" $(print_icon 'VCS_BOOKMARK_ICON')${hgbmarks[@]}"
- # To signal that we want to use the sting we just generated, set the special
+ # To signal that we want to use the string we just generated, set the special
# variable `ret' to something other than the default zero:
ret=1
return 0
@@ -3721,20 +3720,9 @@ function +vi-hg-bookmarks() {
function +vi-vcs-detect-changes() {
if [[ "${hook_com[vcs]}" == "git" ]]; then
-
local remote="$(git ls-remote --get-url 2> /dev/null)"
- if [[ "$remote" =~ "github" ]] then
- vcs_visual_identifier='VCS_GIT_GITHUB_ICON'
- elif [[ "$remote" =~ "bitbucket" ]] then
- vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON'
- elif [[ "$remote" =~ "stash" ]] then
- vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON'
- elif [[ "$remote" =~ "gitlab" ]] then
- vcs_visual_identifier='VCS_GIT_GITLAB_ICON'
- else
- vcs_visual_identifier='VCS_GIT_ICON'
- fi
-
+ _p9k_vcs_icon "$remote"
+ vcs_visual_identifier=$_p9k__ret
elif [[ "${hook_com[vcs]}" == "hg" ]]; then
vcs_visual_identifier='VCS_HG_ICON'
elif [[ "${hook_com[vcs]}" == "svn" ]]; then
@@ -3867,13 +3855,14 @@ function _p9k_vcs_status_purge() {
}
function _p9k_vcs_icon() {
- case "$VCS_STATUS_REMOTE_URL" in
- *github*) _p9k__ret=VCS_GIT_GITHUB_ICON;;
- *bitbucket*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;;
- *stash*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;;
- *gitlab*) _p9k__ret=VCS_GIT_GITLAB_ICON;;
- *) _p9k__ret=VCS_GIT_ICON;;
- esac
+ local pat icon
+ for pat icon in "${(@)_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS}"; do
+ if [[ $1 == $~pat ]]; then
+ _p9k__ret=$icon
+ return
+ fi
+ done
+ _p9k__ret=
}
function _p9k_vcs_render() {
@@ -3903,7 +3892,7 @@ function _p9k_vcs_render() {
state=CLEAN
fi
fi
- _p9k_vcs_icon
+ _p9k_vcs_icon "$VCS_STATUS_REMOTE_URL"
_p9k_prompt_segment prompt_vcs_$state "${__p9k_vcs_states[$state]}" "$_p9k_color1" "$_p9k__ret" 0 '' ""
return 0
fi
@@ -3956,8 +3945,8 @@ function _p9k_vcs_render() {
fi
# It's weird that removing vcs-detect-changes from POWERLEVEL9K_VCS_GIT_HOOKS gets rid
- # of the GIT icon. That's what vcs_info does, so we do the same in the name of compatiblity.
- _p9k_vcs_icon
+ # of the GIT icon. That's what vcs_info does, so we do the same in the name of compatibility.
+ _p9k_vcs_icon "$VCS_STATUS_REMOTE_URL"
icon=$_p9k__ret
fi
@@ -4254,6 +4243,49 @@ instant_prompt_vi_mode() {
fi
}
+# Chezmoi shell indicator: https://www.chezmoi.io/
+prompt_chezmoi_shell() {
+ _p9k_prompt_segment $0 blue $_p9k_color1 CHEZMOI_ICON 0 '' ''
+}
+
+_p9k_prompt_chezmoi_shell_init() {
+ typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$CHEZMOI'
+}
+
+function instant_prompt_chezmoi_shell() {
+ _p9k_prompt_segment prompt_chezmoi_shell blue $_p9k_color1 CHEZMOI_ICON 1 '$CHEZMOI_ICON' ''
+}
+
+function _p9k_parse_virtualenv_cfg() {
+ typeset -ga reply=(0)
+ [[ -f $1 && -r $1 ]] || return
+
+ local cfg
+ cfg=$(<$1) || return
+
+ local -a match mbegin mend
+ [[ $'\n'$cfg$'\n' == (#b)*$'\n'prompt[$' \t']#=([^$'\n']#)$'\n'* ]] || return
+ local res=${${match[1]##[$' \t']#}%%[$' \t']#}
+ if [[ $res == (\"*\"|\'*\') ]]; then
+ # The string is quoted in python style, which isn't the same as quoting in zsh.
+ # For example, the literal 'foo"\'bar' denotes foo"'bar in python but in zsh
+ # it is malformed.
+ #
+ # We cheat a bit and impelement not exactly correct unquoting. It may produce
+ # different visual results but won't perform unintended expansions or bleed out
+ # any escape sequences.
+ #
+ # Note that venv performs unusual and obviously unintended expansions on the
+ # value of `prompt`: single-word expansions are performed twice by `activate`,
+ # and then again on every prompt if `prompt_subst` is in effect. While in general
+ # I am OK with being bug-compatible with other software, the bugs in venv are a
+ # bit too extreme for my comfort. I am going to disable all expansions and
+ # display the configured prompt literally.
+ res=${(Vg:e:)${res[2,-2]}}
+ fi
+ reply=(1 "$res")
+}
+
################################################################
# Virtualenv: current working virtualenv
# More information on virtualenv (Python):
@@ -4263,11 +4295,21 @@ prompt_virtualenv() {
if (( _POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION )) && _p9k_python_version; then
msg="${_p9k__ret//\%/%%} "
fi
- local v=${VIRTUAL_ENV:t}
- if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then
- v=$VIRTUAL_ENV_PROMPT[2,-3]
- elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then
- v=${VIRTUAL_ENV:h:t}
+ local cfg=$VIRTUAL_ENV/pyvenv.cfg
+ if ! _p9k_cache_stat_get $0 $cfg; then
+ local -a reply
+ _p9k_parse_virtualenv_cfg $cfg
+ _p9k_cache_stat_set "${reply[@]}"
+ fi
+ if (( _p9k__cache_val[1] )); then
+ local v=$_p9k__cache_val[2]
+ else
+ local v=${VIRTUAL_ENV:t}
+ if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then
+ v=$VIRTUAL_ENV_PROMPT[2,-3]
+ elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then
+ v=${VIRTUAL_ENV:h:t}
+ fi
fi
msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER"
case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in
@@ -4624,9 +4666,10 @@ _p9k_prompt_java_version_init() {
}
prompt_azure() {
- local cfg=${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json
- if ! _p9k_cache_stat_get $0 $cfg; then
- local name
+ local name cfg=${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json
+ if _p9k_cache_stat_get $0 $cfg; then
+ name=$_p9k__cache_val[1]
+ else
if (( $+commands[jq] )) && name="$(jq -r '[.subscriptions[]|select(.isDefault==true)|.name][]|strings' $cfg 2>/dev/null)"; then
name=${name%%$'\n'*}
elif ! name="$(az account show --query name --output tsv 2>/dev/null)"; then
@@ -4634,6 +4677,7 @@ prompt_azure() {
fi
_p9k_cache_stat_set "$name"
fi
+ [[ -n $name ]] || return
local pat class state
for pat class in "${_POWERLEVEL9K_AZURE_CLASSES[@]}"; do
if [[ $name == ${~pat} ]]; then
@@ -4641,8 +4685,7 @@ prompt_azure() {
break
fi
done
- [[ -n $_p9k__cache_val[1] ]] || return
- _p9k_prompt_segment "$0$state" "blue" "white" "AZURE_ICON" 0 '' "${_p9k__cache_val[1]//\%/%%}"
+ _p9k_prompt_segment "$0$state" "blue" "white" "AZURE_ICON" 0 '' "${name//\%/%%}"
}
_p9k_prompt_azure_init() {
@@ -4875,6 +4918,10 @@ function _p9k_fetch_nordvpn_status() {
# POWERLEVEL9K_NORDVPN_CONNECTING_CONTENT_EXPANSION='${P9K_NORDVPN_COUNTRY_CODE}'
# POWERLEVEL9K_NORDVPN_CONNECTING_BACKGROUND=cyan
function prompt_nordvpn() {
+ # This prompt segment is broken. See https://github.com/romkatv/powerlevel10k/issues/2860.
+ # It is disabled until it is fixed.
+ return
+
unset $__p9k_nordvpn_tag P9K_NORDVPN_COUNTRY_CODE
[[ -e /run/nordvpn/nordvpnd.sock ]] || return
_p9k_fetch_nordvpn_status 2>/dev/null || return
@@ -4912,6 +4959,18 @@ function instant_prompt_ranger() {
_p9k_prompt_segment prompt_ranger $_p9k_color1 yellow RANGER_ICON 1 '$RANGER_LEVEL' '$RANGER_LEVEL'
}
+function prompt_yazi() {
+ _p9k_prompt_segment $0 $_p9k_color1 yellow YAZI_ICON 0 '' $YAZI_LEVEL
+}
+
+_p9k_prompt_yazi_init() {
+ typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$YAZI_LEVEL'
+}
+
+function instant_prompt_yazi() {
+ _p9k_prompt_segment prompt_yazi $_p9k_color1 yellow YAZI_ICON 1 '$YAZI_LEVEL' '$YAZI_LEVEL'
+}
+
function prompt_midnight_commander() {
local -i len=$#_p9k__prompt _p9k__has_upglob
_p9k_prompt_segment $0 $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '' ''
@@ -5011,12 +5070,16 @@ _p9k_prompt_terraform_init() {
}
function prompt_terraform_version() {
- _p9k_cached_cmd 0 '' terraform --version || return
- local v=${_p9k__ret#Terraform v}
- (( $#v < $#_p9k__ret )) || return
- v=${v%%$'\n'*}
+ local v cfg terraform=${commands[terraform]}
+ _p9k_upglob .terraform-version -. || cfg=$_p9k__parent_dirs[$?]/.terraform-version
+ if _p9k_cache_stat_get $0.$TFENV_TERRAFORM_VERSION $terraform $cfg; then
+ v=$_p9k__cache_val[1]
+ else
+ v=${${"$(terraform --version 2>/dev/null)"#Terraform v}%%$'\n'*} || v=
+ _p9k_cache_stat_set "$v"
+ fi
[[ -n $v ]] || return
- _p9k_prompt_segment $0 $_p9k_color1 blue TERRAFORM_ICON 0 '' $v
+ _p9k_prompt_segment $0 $_p9k_color1 blue TERRAFORM_ICON 0 '' ${v//\%/%%}
}
_p9k_prompt_terraform_version_init() {
@@ -5065,8 +5128,11 @@ function _p9k_timewarrior_clear() {
}
function prompt_timewarrior() {
+ local dir
+ [[ -n ${dir::=$TIMEWARRIORDB} || -n ${dir::=~/.timewarrior}(#q-/N) ]] ||
+ dir=${XDG_DATA_HOME:-~/.local/share}/timewarrior
+ dir+=/data
local -a stat
- local dir=${TIMEWARRIORDB:-~/.timewarrior}/data
[[ $dir == $_p9k_timewarrior_dir ]] || _p9k_timewarrior_clear
if [[ -n $_p9k_timewarrior_file_name ]]; then
zstat -A stat +mtime -- $dir $_p9k_timewarrior_file_name 2>/dev/null || stat=()
@@ -5172,7 +5238,10 @@ function _p9k_taskwarrior_check_data() {
}
function _p9k_taskwarrior_init_data() {
- local -a stat files=($_p9k_taskwarrior_data_dir/{pending,completed}.data)
+ local -a stat files=(
+ $_p9k_taskwarrior_data_dir/{pending,completed}.data
+ $_p9k_taskwarrior_data_dir/taskchampion.sqlite3
+ )
_p9k_taskwarrior_data_files=($^files(N))
_p9k_taskwarrior_data_non_files=(${files:|_p9k_taskwarrior_data_files})
if (( $#_p9k_taskwarrior_data_files )); then
@@ -5199,7 +5268,9 @@ function _p9k_taskwarrior_init_data() {
local -a ts
ts=($(command task +PENDING -OVERDUE list rc.verbose=nothing rc.color=0 rc._forcecolor=0 \
rc.report.list.labels= rc.report.list.columns=due.epoch /dev/null)) || ts=()
- if (( $#ts )); then
+ # The second condition is a workaround for a bug in taskwarrior v3.0.1.
+ # https://github.com/romkatv/powerlevel10k/issues/2648.
+ if (( $#ts && ! ${#${(@)ts:#(|-)<->(|.<->)}} )); then
_p9k_taskwarrior_next_due=${${(on)ts}[1]}
(( _p9k_taskwarrior_next_due > EPOCHSECONDS )) || _p9k_taskwarrior_next_due=$((EPOCHSECONDS+60))
fi
@@ -5685,15 +5756,19 @@ prompt_cpu_arch() {
state=$_p9k__cache_val[1]
text=$_p9k__cache_val[2]
else
- local cmd
- for cmd in machine arch; do
- (( $+commands[$cmd] )) || continue
- if text=$(command -- $cmd) 2>/dev/null && [[ $text == [a-zA-Z][a-zA-Z0-9_]# ]]; then
- break
- else
- text=
- fi
- done
+ if [[ -r /proc/sys/kernel/arch ]]; then
+ text=$(/dev/null && [[ $text == [a-zA-Z][a-zA-Z0-9_]# ]]; then
+ break
+ else
+ text=
+ fi
+ done
+ fi
state=_${${(U)text}//İ/I}
_p9k_cache_ephemeral_set "$state" "$text"
fi
@@ -5708,6 +5783,31 @@ _p9k_prompt_cpu_arch_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[machine]$commands[arch]'
}
+################################################################
+# Oh My Zsh per-directory-history local/global indicator
+prompt_per_directory_history() {
+ if [[ $_per_directory_history_is_global == true ]]; then
+ _p9k_prompt_segment ${0}_GLOBAL 3 $_p9k_color1 HISTORY_ICON 0 '' global
+ else
+ _p9k_prompt_segment ${0}_LOCAL 5 $_p9k_color1 HISTORY_ICON 0 '' local
+ fi
+}
+
+instant_prompt_per_directory_history() {
+ case $HISTORY_START_WITH_GLOBAL in
+ true)
+ _p9k_prompt_segment prompt_per_directory_history_GLOBAL 3 $_p9k_color1 HISTORY_ICON 0 '' global
+ ;;
+ ?*)
+ _p9k_prompt_segment prompt_per_directory_history_LOCAL 5 $_p9k_color1 HISTORY_ICON 0 '' local
+ ;;
+ esac
+}
+
+_p9k_prompt_per_directory_history_init() {
+ typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$PER_DIRECTORY_HISTORY_TOGGLE'
+}
+
# Use two preexec hooks to survive https://github.com/MichaelAquilina/zsh-you-should-use with
# YSU_HARDCORE=1. See https://github.com/romkatv/powerlevel10k/issues/427.
_p9k_preexec1() {
@@ -5720,7 +5820,7 @@ _p9k_preexec2() {
typeset -g _p9k__preexec_cmd=$2
_p9k__timer_start=EPOCHREALTIME
P9K_TTY=old
- (( ! $+_p9k__iterm_cmd )) || _p9k_iterm2_preexec
+ (( ! $+_p9k__iterm_cmd )) || _p9k_iterm2_preexec "$1"
}
function _p9k_prompt_net_iface_init() {
@@ -6599,9 +6699,12 @@ function _p9k_clear_instant_prompt() {
unset _z4h_saved_screen
fi
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
- local unexpected=${(S)${${content//$'\e[?'<->'c'}//$'\e['<->' q'}//$'\e'[^$'\a\e']#($'\a'|$'\e\\')}
+ local unexpected=${${content//$'\e[?'<->'c'}//$'\e['<->' q'}
+ unexpected=${(S)unexpected//$'\eP'(|*[^$'\e'])($'\e\e')#$'\e\\'}
+ unexpected=${(S)unexpected//$'\e'[^$'\a\e']#($'\a'|$'\e\\')}
# Visual Studio Code prints this garbage.
unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'}
+ typeset -g P9K_STARTUP_CONSOLE_OUTPUT=("$content" "$unexpected")
if [[ -n $unexpected ]]; then
local omz1='[Oh My Zsh] Would you like to update? [Y/n]: '
local omz2='Updating Oh My Zsh'
@@ -6645,9 +6748,9 @@ function _p9k_clear_instant_prompt() {
echo -E - ""
echo -E - "${(%):-For details, see:}"
if (( _p9k_term_has_href )); then
- echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\e]8;;\a}"
+ echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k#instant-prompt\ahttps://github.com/romkatv/powerlevel10k#instant-prompt\e]8;;\a}"
else
- echo - "${(%):-https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt}"
+ echo - "${(%):-https://github.com/romkatv/powerlevel10k#instant-prompt}"
fi
echo -E - ""
echo - "${(%):-%3F-- console output produced during zsh initialization follows --%f}"
@@ -7359,6 +7462,36 @@ _p9k_init_params() {
_p9k_declare -b POWERLEVEL9K_VCS_CONFLICTED_STATE 0
_p9k_declare -b POWERLEVEL9K_HIDE_BRANCH_ICON 0
_p9k_declare -b POWERLEVEL9K_VCS_HIDE_TAGS 0
+ _p9k_declare -a POWERLEVEL9K_VCS_GIT_REMOTE_ICONS
+ if (( $+_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS )); then
+ (( $#_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS & 1 )) && _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS+=('')
+ else
+ local domain= icon= domain2icon=(
+ 'archlinux.org' VCS_GIT_ARCHLINUX_ICON
+ 'dev.azure.com|visualstudio.com' VCS_GIT_AZURE_ICON
+ 'bitbucket.org' VCS_GIT_BITBUCKET_ICON
+ 'codeberg.org' VCS_GIT_CODEBERG_ICON
+ 'debian.org' VCS_GIT_DEBIAN_ICON
+ 'freebsd.org' VCS_GIT_FREEBSD_ICON
+ 'freedesktop.org' VCS_GIT_FREEDESKTOP_ICON
+ 'gitea.com|gitea.io' VCS_GIT_GITEA_ICON
+ 'github.com' VCS_GIT_GITHUB_ICON
+ 'gitlab.com' VCS_GIT_GITLAB_ICON
+ 'gnome.org' VCS_GIT_GNOME_ICON
+ 'gnu.org' VCS_GIT_GNU_ICON
+ 'kde.org' VCS_GIT_KDE_ICON
+ 'kernel.org' VCS_GIT_LINUX_ICON
+ 'sr.ht' VCS_GIT_SOURCEHUT_ICON
+ )
+ typeset -ga _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS
+ for domain icon in "${domain2icon[@]}"; do
+ _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS+=(
+ '(|[A-Za-z0-9][A-Za-z0-9+.-]#://)(|[^:/?#]#[.@])((#i)'$domain')(|[/:?#]*)'
+ $icon
+ )
+ done
+ _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS+=('*' VCS_GIT_ICON)
+ fi
_p9k_declare -i POWERLEVEL9K_CHANGESET_HASH_LENGTH 8
# Specifies the maximum number of elements in the cache. When the cache grows over this limit,
# it gets cleared. This is meant to avoid memory leaks when a rogue prompt is filling the cache
@@ -7530,6 +7663,8 @@ _p9k_init_params() {
_p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0
_p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global
_p9k_declare -b POWERLEVEL9K_NODENV_SHOW_SYSTEM 1
+ _p9k_declare -b POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW 0
+ _p9k_declare -b POWERLEVEL9K_NVM_SHOW_SYSTEM 1
_p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0
_p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global
_p9k_declare -b POWERLEVEL9K_RBENV_SHOW_SYSTEM 1
@@ -8255,9 +8390,17 @@ _p9k_init_prompt() {
if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then
_p9k_prompt_prefix_left+=$'%{\e]133;A\a%}'
_p9k_prompt_suffix_left+=$'%{\e]133;B\a%}'
+ if [[ $TERM_PROGRAM == WarpTerminal ]]; then
+ _p9k_prompt_prefix_right=$'%{\e]133;P;k=r\a%}'$_p9k_prompt_prefix_right
+ _p9k_prompt_suffix_right+=$'%{\e]133;B\a%}'
+ fi
if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then
_p9k_prompt_prefix_left+=$'%{\ePtmux;\e\e]133;A\a\e\\%}'
_p9k_prompt_suffix_left+=$'%{\ePtmux;\e\e]133;B\a\e\\%}'
+ if [[ $TERM_PROGRAM == WarpTerminal ]]; then
+ _p9k_prompt_prefix_right=$'%{\ePtmux;\e\e]133;P;k=r\a\e\\%}'$_p9k_prompt_prefix_right
+ _p9k_prompt_suffix_right+=$'%{\ePtmux;\e\e]133;B\a\e\\%}'
+ fi
fi
fi
@@ -8382,8 +8525,8 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit
fi
- _p9k__param_pat=$'v147\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
- _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1'
+ _p9k__param_pat=${(q)P9K_VERSION}$'\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
+ _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1'${(q)TERM_PROGRAM}$'\1'
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
_p9k__param_pat+=$'$GITSTATUS_CACHE_DIR\1$GITSTATUS_AUTO_INSTALL\1${ZLE_RPROMPT_INDENT:-1}\1'
@@ -8455,7 +8598,14 @@ function _p9k_init_cacheable() {
_p9k_transient_prompt+='${${P9K_CONTENT::="❯"}+}'
_p9k_param prompt_prompt_char_ERROR_VIINS CONTENT_EXPANSION '${P9K_CONTENT}'
_p9k_transient_prompt+='${:-"'$_p9k__ret'"}'
- _p9k_transient_prompt+=')%b%k%f%s%u '
+ _p9k_transient_prompt+=')%b%k%f%s%u'
+ _p9k_get_icon '' LEFT_SEGMENT_END_SEPARATOR
+ if [[ $_p9k__ret != (| ) ]]; then
+ _p9k__ret+=%b%k%f
+ # Not escaped for historical reasons.
+ _p9k__ret='${:-"'$_p9k__ret'"}'
+ fi
+ _p9k_transient_prompt+=$_p9k__ret
if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then
_p9k_transient_prompt=$'%{\e]133;A\a%}'$_p9k_transient_prompt$'%{\e]133;B\a%}'
if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then
@@ -8482,14 +8632,20 @@ function _p9k_init_cacheable() {
if [[ -r /etc/os-release ]]; then
local lines=(${(f)"$(&2 echo -E - ""
>&2 echo -E - "${(%):- - %BRecommended%b: Change the way Powerlevel10k is loaded from %B$__p9k_zshrc_u%b.}"
if (( _p9k_term_has_href )); then
- >&2 echo - "${(%):- See \e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\e]8;;\a.}"
+ >&2 echo - "${(%):- See \e]8;;https://github.com/romkatv/powerlevel10k#installation\ahttps://github.com/romkatv/powerlevel10k#installation\e]8;;\a.}"
else
- >&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation.}"
+ >&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k#installation.}"
fi
if (( $+zsh_defer_options )); then
>&2 echo -E - ""
@@ -8931,6 +9101,9 @@ _p9k_precmd_first() {
if [[ -n $KITTY_SHELL_INTEGRATION && KITTY_SHELL_INTEGRATION[(wIe)no-prompt-mark] -eq 0 ]]; then
KITTY_SHELL_INTEGRATION+=' no-prompt-mark'
(( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1
+ (( $+__p9k_use_osc133_c_cmdline )) || typeset -gri __p9k_use_osc133_c_cmdline=1
+ elif [[ $TERM_PROGRAM == WarpTerminal ]]; then
+ (( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1
fi
typeset -ga precmd_functions=(${precmd_functions:#_p9k_precmd_first})
}
@@ -9330,6 +9503,11 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p
zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null
fi
+typeset -g P9K_VERSION=1.20.15
+
+if [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then
+ typeset -gri __p9k_force_term_shell_integration=1
+fi
unset VSCODE_SHELL_INTEGRATION
_p9k_init_ssh
diff --git a/internal/parser.zsh b/internal/parser.zsh
index 6c16adcd..2af06e1c 100644
--- a/internal/parser.zsh
+++ b/internal/parser.zsh
@@ -102,7 +102,7 @@ typeset -grA __p9k_pb_term_skip=(
# Usage: _p9k_parse_buffer [token-limit]
#
-# Parses the specified command line buffer and pupulates array P9K_COMMANDS
+# Parses the specified command line buffer and populates array P9K_COMMANDS
# with commands from it. Terminates early and returns 1 if there are more
# tokens than the specified limit.
#
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index 2265b07c..5ae58002 100644
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -1126,13 +1126,20 @@ function os_icon_name() {
if [[ -r /etc/os-release ]]; then
local lines=(${(f)"$($__p9k_cfg_path
}
@@ -2024,7 +2034,7 @@ function check_zshrc_integration() {
local h9='"$ZDOTDIR"/.p10k.zsh'
local h10='$POWERLEVEL9K_CONFIG_FILE'
local h11='"$POWERLEVEL9K_CONFIG_FILE"'
- if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##($f1|$f2|$f3|$f4|$g1|$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|$h8|$h9|$h10|$h11)(|[[:space:]]*|'#'*)} ]]; then
+ if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##(|--[[:space:]]##)($f1|$f2|$f3|$f4|$g1|$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|$h8|$h9|$h10|$h11)(|[[:space:]]*|'#'*)} ]]; then
zshrc_has_cfg=1
fi
local pre='${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh'
@@ -2106,7 +2116,7 @@ while true; do
unset pure_use_rprompt
- if [[ $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
+ if [[ -o multibyte && $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
ask_font || continue
ask_diamond || continue
if [[ $AWESOME_GLYPHS_LOADED == 1 ]]; then
@@ -2133,16 +2143,16 @@ while true; do
elif (( ! cap_diamond )); then
POWERLEVEL9K_MODE=awesome-fontconfig
else
- ask_arrow '\uFC35' || continue
+ ask_arrow '\UF0737' || continue
if (( cap_arrow )); then
- POWERLEVEL9K_MODE=nerdfont-complete
+ ask_width || continue
+ fi
+ if (( cap_arrow )); then
+ POWERLEVEL9K_MODE=nerdfont-v3
else
- ask_arrow '\UF0737' "Let's try another one." || continue
+ ask_arrow '\uFC35' "Let's try another one." || continue
if (( cap_arrow )); then
- ask_width || continue
- fi
- if (( cap_arrow )); then
- POWERLEVEL9K_MODE=nerdfont-v3
+ POWERLEVEL9K_MODE=nerdfont-complete
else
POWERLEVEL9K_MODE=awesome-fontconfig
ask_python || continue