diff --git a/README.md b/README.md
index 884cb21f..6629e910 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,6 @@
[](
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).
@@ -305,11 +300,10 @@ To ~~ridiculous~~ extravagant:
### Batteries included
-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.
+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.
| Segment | Meaning |
|--------:|---------|
@@ -344,7 +338,6 @@ You can enable as many segments as you like. It won't slow down your prompt or Z
| `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 |
@@ -352,7 +345,6 @@ You can enable as many segments as you like. It won't slow down your prompt or Z
| `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 |
@@ -363,7 +355,6 @@ You can enable as many segments as you like. It won't slow down your prompt or Z
| `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) |
@@ -404,11 +395,6 @@ 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.
@@ -429,7 +415,7 @@ Powerlevel10k.
- [Zap](#zap)
- [Homebrew](#homebrew)
- [Arch Linux](#arch-linux)
-- [Alpine Linux](#alpine-linux)
+- [Alpine Linux](#arch-linux)
- [Fig](#fig)
### Manual
@@ -522,8 +508,8 @@ Add `plug "romkatv/powerlevel10k"` to `~/.zshrc`.
### Homebrew
```zsh
-brew install powerlevel10k
-echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
+brew install romkatv/powerlevel10k/powerlevel10k
+echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
```
### Arch Linux
@@ -537,7 +523,7 @@ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zs
referenced above is the official Powerlevel10k package.
There is also [zsh-theme-powerlevel10k](
- https://www.archlinux.org/packages/extra/x86_64/zsh-theme-powerlevel10k/) package.
+ 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.**
@@ -675,7 +661,6 @@ 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`.
@@ -683,7 +668,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.
- - **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
+ - **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*.
@@ -691,9 +676,7 @@ 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`. 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*.
+ and change *Font* to `MesloLGS NF`.
- **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 →
@@ -703,17 +686,14 @@ If you are using a different terminal, proceed with manual font installation.
- **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.toml` and add the following
- section to it:
- ```toml
- [font.normal]
- family = "MesloLGS NF"
+ - **Alacritty**: Create or open `~/.config/alacritty/alacritty.yml` and add the following section
+ to it:
+ ```yaml
+ 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:
+ - **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
```text
font_family MesloLGS NF
```
@@ -859,7 +839,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` |
@@ -913,8 +893,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` |
+ | [Zap](#zap) | `zsh -ic 'zap --clean'` |
+ | [Homebrew](#homebrew) | `brew uninstall powerlevel10k; brew untap romkatv/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).
@@ -987,8 +967,6 @@ 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?
@@ -1156,7 +1134,6 @@ 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}` |
@@ -1208,7 +1185,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 lighter for more contrast. To do that, open
+might want to change the background color to something ligher 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.
@@ -1332,28 +1309,15 @@ 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 numbered colors look in your terminal, run the following command:
+To see how different 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?
@@ -1525,7 +1489,6 @@ 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)
@@ -1543,32 +1506,9 @@ 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
@@ -1753,15 +1693,10 @@ 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`.
-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
+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
`p10k configure` and checking that all glyphs render correctly.
### Cannot install the recommended font
@@ -1887,15 +1822,6 @@ 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
@@ -2092,16 +2018,3 @@ 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 d7be6722..aead8089 100644
--- a/config/p10k-classic.zsh
+++ b/config/p10k-classic.zsh
@@ -81,14 +81,12 @@
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
@@ -98,7 +96,6 @@
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 ]=========================
@@ -171,9 +168,6 @@
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.
@@ -243,7 +237,7 @@
.java-version
.perl-version
.php-version
- .tool-versions
+ .tool-version
.shorten_folder_marker
.svn
.terraform
@@ -429,17 +423,11 @@
res+=" ${modified}wip"
fi
- 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 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}"
# ⇠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+=" "
@@ -729,12 +717,6 @@
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.
@@ -770,21 +752,12 @@
# Nix shell color.
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
- # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
- # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
-
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# 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
@@ -811,8 +784,9 @@
# 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_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################################[ ram: free RAM ]#######################################
# RAM color.
@@ -894,19 +868,6 @@
# 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
@@ -1043,11 +1004,6 @@
##############[ 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='⭐'
@@ -1289,7 +1245,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|cmctl|sparkctl'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@@ -1376,7 +1332,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|cdk|terraform|pulumi|terragrunt'
+ typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|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.
@@ -1424,39 +1380,10 @@
# 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_OTHER_FOREGROUND=32
+ typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
# Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_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.
@@ -1677,7 +1604,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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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
@@ -1713,7 +1640,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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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 bf469df7..c40b3efa 100644
--- a/config/p10k-lean-8colors.zsh
+++ b/config/p10k-lean-8colors.zsh
@@ -81,14 +81,12 @@
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
@@ -97,7 +95,6 @@
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 ]=========================
@@ -234,7 +231,7 @@
.java-version
.perl-version
.php-version
- .tool-versions
+ .tool-version
.shorten_folder_marker
.svn
.terraform
@@ -277,6 +274,10 @@
# 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
@@ -420,17 +421,11 @@
res+=" ${modified}wip"
fi
- 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 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}"
# ⇠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+=" "
@@ -720,12 +715,6 @@
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.
@@ -761,21 +750,12 @@
# Nix shell color.
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=4
- # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
- # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
-
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# 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
@@ -869,19 +849,6 @@
# 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
@@ -1018,11 +985,6 @@
##############[ 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='⭐'
@@ -1225,7 +1187,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|cmctl|sparkctl'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@@ -1351,7 +1313,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|cdk|terraform|pulumi|terragrunt'
+ typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|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.
@@ -1399,39 +1361,10 @@
# 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_OTHER_FOREGROUND=4
+ typeset -g POWERLEVEL9K_AZURE_FOREGROUND=4
# Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_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.
@@ -1652,7 +1585,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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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
@@ -1688,7 +1621,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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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 1595a377..3009d464 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -81,14 +81,12 @@
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
@@ -97,7 +95,6 @@
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 ]=========================
@@ -234,7 +231,7 @@
.java-version
.perl-version
.php-version
- .tool-versions
+ .tool-version
.shorten_folder_marker
.svn
.terraform
@@ -420,17 +417,11 @@
res+=" ${modified}wip"
fi
- 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 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}"
# ⇠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+=" "
@@ -720,12 +711,6 @@
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,21 +746,12 @@
# Nix shell color.
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
- # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
- # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
-
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# 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
@@ -869,19 +845,6 @@
# 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
@@ -1018,11 +981,6 @@
##############[ 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='⭐'
@@ -1225,7 +1183,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|cmctl|sparkctl'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@@ -1351,7 +1309,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|cdk|terraform|pulumi|terragrunt'
+ typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|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.
@@ -1399,39 +1357,10 @@
# 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_OTHER_FOREGROUND=32
+ typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
# Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_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.
@@ -1652,7 +1581,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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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
@@ -1688,7 +1617,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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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 7a4d2441..97c1a207 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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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 355ee9bb..775b919e 100644
--- a/config/p10k-rainbow.zsh
+++ b/config/p10k-rainbow.zsh
@@ -81,14 +81,12 @@
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
@@ -98,7 +96,6 @@
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,9 +165,6 @@
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.
@@ -243,7 +237,7 @@
.java-version
.perl-version
.php-version
- .tool-versions
+ .tool-version
.shorten_folder_marker
.svn
.terraform
@@ -430,17 +424,11 @@
res+=" ${modified}wip"
fi
- 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 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}"
# ⇠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+=" "
@@ -748,14 +736,7 @@
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
@@ -796,22 +777,12 @@
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0
typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4
- # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
- # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
-
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# 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
@@ -843,8 +814,6 @@
# 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.
@@ -935,21 +904,6 @@
# 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
@@ -1096,11 +1050,6 @@
# 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='⭐'
@@ -1369,7 +1318,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|cmctl|sparkctl'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@@ -1458,7 +1407,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|cdk|terraform|pulumi|terragrunt'
+ typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|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.
@@ -1508,41 +1457,11 @@
# 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_OTHER_FOREGROUND=7
- typeset -g POWERLEVEL9K_AZURE_OTHER_BACKGROUND=4
+ typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7
+ typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4
# Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_AZURE_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.
@@ -1774,7 +1693,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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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
@@ -1811,7 +1730,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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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 6a204d29..a59e222b 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#instant-prompt.
+ # https://github.com/romkatv/powerlevel10k/blob/master/README.md#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 7a7cb005..e7505ef4 100644
--- a/font.md
+++ b/font.md
@@ -55,7 +55,6 @@ 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`.
@@ -63,7 +62,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.
- - **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
+ - **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*.
@@ -71,9 +70,7 @@ 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`. 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*.
+ and change *Font* to `MesloLGS NF`.
- **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 →
@@ -83,15 +80,12 @@ If you are using a different terminal, proceed with manual font installation.
- **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.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
+ - **Alacritty**: Create or open `~/.config/alacritty/alacritty.yml` and add the following section
+ to it:
+ ```yaml
+ font:
+ normal:
+ family: "MesloLGS NF"
```
- **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
```text
diff --git a/gitstatus/Makefile b/gitstatus/Makefile
index adb20e9d..450d5ea0 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 # -g -fsanitize=thread
+CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) -Wall -Werror # -g -fsanitize=thread
LDFLAGS += -pthread # -fsanitize=thread
LDLIBS += -lgit2 # -lprofiler -lunwind
@@ -44,14 +44,3 @@ 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 a6631f63..82a19981 100644
--- a/gitstatus/README.md
+++ b/gitstatus/README.md
@@ -255,7 +255,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 `core.untrackedcache` enabled and `core.fsmonitor` disabled
+* `git` with untracked cache enabled
* `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 +381,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 clearly visible. `__GI___fxstatat` is a flavor of `stat()`, and the other
+core of the algorithm are cleary 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.info b/gitstatus/build.info
index 9a4967e8..baa30b07 100644
--- a/gitstatus/build.info
+++ b/gitstatus/build.info
@@ -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-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6"
-libgit2_sha256="4ce11d71ee576dbbc410b9fa33a9642809cc1fa687b315f7c23eeb825b251e93"
+libgit2_version="tag-0ad3d776aa86dd607dc86dcd7f77ad3ed7ebec61"
+libgit2_sha256="c5d0117ae74d3ef244c26f10cce022019077dbc4563e6251fa9f56d36868ce74"
diff --git a/gitstatus/gitstatus.plugin.sh b/gitstatus/gitstatus.plugin.sh
index bfe16dc2..37b78f44 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
}
-# Retrieves status of a git repository from a directory under its working tree.
+# Retrives 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 b74396d3..228fea74 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}"
-# Retrieves status of a git repo from a directory under its working tree.
+# Retrives 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 f54c11ac..8ee28de0 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,14 +85,7 @@ 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.
-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_COMMAND=gitstatus_prompt_update
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 682675a2..82dceae1 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 evaluates to true. Otherwise
+// Does nothing if the expression evalutes 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 2a7533a3..4d4cf3da 100644
--- a/gitstatus/src/dir.h
+++ b/gitstatus/src/dir.h
@@ -25,7 +25,7 @@
namespace gitstatus {
-// On error, leaves entries unchanged and returns false. Does not throw.
+// On error, leaves entries unchaged 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 b7abe5db..46f3845c 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 directories in stdin.\n"
+ << "Print machine-readable status of the git repos for directores 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 entries to log whose log level is below this. Log levels in\n"
+ << " Don't write entires 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 remaining path\n"
+ << " If the first character is ':', it is removed and the remaning 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 bb373155..fd561e11 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 entries to log whose log level is below this. Log levels in increasing order:
+ // Don't write entires 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 a81594a4..d7ea7d3e 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 synchronization.
+ // that result from lazy cache initialization without synchrnonization.
// 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 8bd445c7..52cbaede 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 promises that this won't trigger.
+ // "sorted" in the header of packed-refs promisses that this won't trigger.
std::sort(name2id_.begin(), name2id_.end(), ByName);
}
diff --git a/internal/configure.zsh b/internal/configure.zsh
index 0e13bdec..3e880f23 100644
--- a/internal/configure.zsh
+++ b/internal/configure.zsh
@@ -18,6 +18,7 @@ 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 d34b2c0e..4a60756b 100644
--- a/internal/icons.zsh
+++ b/internal/icons.zsh
@@ -52,7 +52,6 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON '\uE271'$s #
LINUX_RASPBIAN_ICON '\uE271'$s #
LINUX_UBUNTU_ICON '\uE271'$s #
- LINUX_KALI_ICON '\uE271'$s #
LINUX_CENTOS_ICON '\uE271'$s #
LINUX_COREOS_ICON '\uE271'$s #
LINUX_ELEMENTARY_ICON '\uE271'$s #
@@ -73,9 +72,6 @@ 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_GUIX_ICON '\uE271'$s #
- LINUX_NEON_ICON '\uE271'$s #
SUNOS_ICON '\U1F31E'$q # 🌞
HOME_ICON '\uE12C'$s #
HOME_SUB_ICON '\uE18D'$s #
@@ -106,23 +102,10 @@ 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'
@@ -139,7 +122,6 @@ 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'
@@ -169,7 +151,6 @@ function _p9k_init_icons() {
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
- HISTORY_ICON 'hist'
)
;;
'awesome-fontconfig')
@@ -210,7 +191,6 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON '\uF17C'$s #
LINUX_RASPBIAN_ICON '\uF17C'$s #
LINUX_UBUNTU_ICON '\uF17C'$s #
- LINUX_KALI_ICON '\uF17C'$s #
LINUX_CENTOS_ICON '\uF17C'$s #
LINUX_COREOS_ICON '\uF17C'$s #
LINUX_ELEMENTARY_ICON '\uF17C'$s #
@@ -231,9 +211,6 @@ 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_GUIX_ICON '\uF17C'$s #
- LINUX_NEON_ICON '\uF17C'$s #
SUNOS_ICON '\uF185 ' #
HOME_ICON '\uF015'$s #
HOME_SUB_ICON '\uF07C'$s #
@@ -260,23 +237,10 @@ 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'
@@ -293,7 +257,6 @@ 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'
@@ -323,7 +286,6 @@ function _p9k_init_icons() {
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
- HISTORY_ICON 'hist'
)
;;
'awesome-mapped-fontconfig')
@@ -369,7 +331,6 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_RASPBIAN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_UBUNTU_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
- LINUX_KALI_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_CENTOS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_COREOS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_ELEMENTARY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
@@ -390,9 +351,6 @@ 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_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}"
@@ -419,23 +377,10 @@ 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}"
@@ -450,7 +395,6 @@ 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'
@@ -480,7 +424,6 @@ function _p9k_init_icons() {
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
- HISTORY_ICON 'hist'
)
;;
'nerdfont-v3')
@@ -538,13 +481,9 @@ function _p9k_init_icons() {
LINUX_VOID_ICON '\UF32E'$s #
LINUX_ARTIX_ICON '\UF31F'$s #
LINUX_UBUNTU_ICON '\uF31b'$s #
- LINUX_KALI_ICON '\uF327'$s #
- LINUX_RHEL_ICON '\UF111B'$s #
+ LINUX_RHEL_ICON '\uF316'$s #
LINUX_AMZN_ICON '\uF270'$s #
LINUX_ENDEAVOUROS_ICON '\UF322'$s #
- LINUX_ROCKY_ICON '\UF32B'$s #
- LINUX_GUIX_ICON '\UF325'$s #
- LINUX_NEON_ICON '\uF17C' #
LINUX_ICON '\uF17C' #
SUNOS_ICON '\uF185 ' #
HOME_ICON '\uF015'$s #
@@ -572,28 +511,10 @@ 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' #
@@ -603,21 +524,20 @@ function _p9k_init_icons() {
EXECUTION_TIME_ICON '\uF252'$s #
SSH_ICON '\uF489'$s #
VPN_ICON '\UF023' #
- KUBERNETES_ICON '\UF10FE' #
+ KUBERNETES_ICON '\F10FE' #
DROPBOX_ICON '\UF16B'$s #
DATE_ICON '\uF073 ' #
TIME_ICON '\uF017 ' #
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 '\uEBD8 ' #
+ AZURE_ICON '\UF0805' #
DIRENV_ICON '\u25BC' # ▼
FLUTTER_ICON 'F' # F
GCLOUD_ICON '\UF02AD' #
@@ -640,7 +560,6 @@ function _p9k_init_icons() {
SCALA_ICON '\uE737' #
TOOLBOX_ICON '\uE20F'$s #
ARCH_ICON '\uE266' #
- HISTORY_ICON '\uF1DA'$s #
)
;;
'nerdfont-complete'|'nerdfont-fontconfig')
@@ -698,13 +617,9 @@ function _p9k_init_icons() {
LINUX_VOID_ICON '\uF17C' #
LINUX_ARTIX_ICON '\uF17C' #
LINUX_UBUNTU_ICON '\uF31b'$s #
- LINUX_KALI_ICON '\uF17C' #
LINUX_RHEL_ICON '\uF316'$s #
LINUX_AMZN_ICON '\uF270'$s #
LINUX_ENDEAVOUROS_ICON '\uF17C' #
- LINUX_ROCKY_ICON '\uF17C' #
- LINUX_GUIX_ICON '\uF325'$s #
- LINUX_NEON_ICON '\uF17C' #
LINUX_ICON '\uF17C' #
SUNOS_ICON '\uF185 ' #
HOME_ICON '\uF015'$s #
@@ -732,23 +647,10 @@ 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' #
@@ -765,7 +667,6 @@ 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 ' #
@@ -795,7 +696,6 @@ function _p9k_init_icons() {
SCALA_ICON '\uE737' #
TOOLBOX_ICON '\uE20F'$s #
ARCH_ICON '\uE266' #
- HISTORY_ICON '\uF1DA'$s #
)
;;
ascii)
@@ -834,7 +734,6 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON 'debian'
LINUX_RASPBIAN_ICON 'pi'
LINUX_UBUNTU_ICON 'ubuntu'
- LINUX_KALI_ICON 'kali'
LINUX_CENTOS_ICON 'centos'
LINUX_COREOS_ICON 'coreos'
LINUX_ELEMENTARY_ICON 'elementary'
@@ -855,9 +754,6 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON 'rhel'
LINUX_AMZN_ICON 'amzn'
LINUX_ENDEAVOUROS_ICON 'edvos'
- LINUX_ROCKY_ICON 'rocky'
- LINUX_GUIX_ICON 'guix'
- LINUX_NEON_ICON 'neon'
SUNOS_ICON 'sunos'
HOME_ICON ''
HOME_SUB_ICON ''
@@ -884,23 +780,10 @@ 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'
@@ -917,7 +800,6 @@ 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'
@@ -947,7 +829,6 @@ function _p9k_init_icons() {
SCALA_ICON 'scala'
TOOLBOX_ICON 'toolbox'
ARCH_ICON 'arch'
- HISTORY_ICON 'hist'
)
;;
*)
@@ -988,7 +869,6 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON 'Deb'
LINUX_RASPBIAN_ICON 'RPi'
LINUX_UBUNTU_ICON 'Ubu'
- LINUX_KALI_ICON 'Kal'
LINUX_CENTOS_ICON 'Cen'
LINUX_COREOS_ICON 'Cor'
LINUX_ELEMENTARY_ICON 'Elm'
@@ -1009,9 +889,6 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON 'RH'
LINUX_AMZN_ICON 'Amzn'
LINUX_ENDEAVOUROS_ICON 'Edv'
- LINUX_ROCKY_ICON 'Roc'
- LINUX_GUIX_ICON 'Guix'
- LINUX_NEON_ICON 'Neon'
SUNOS_ICON 'Sun'
HOME_ICON ''
HOME_SUB_ICON ''
@@ -1038,23 +915,10 @@ 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'
@@ -1071,7 +935,6 @@ 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'
@@ -1101,7 +964,6 @@ 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 d2d261b2..cd49b689 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 # hexadecimal color code: #ffffff
+ elif [[ $1 == '#'[[:xdigit:]]## ]]; then # hexademical color code: #ffffff
_p9k__ret=${${(L)1}//ı/i}
else # named color: red
# Strip prifixes if there are any.
@@ -1314,7 +1314,7 @@ function _p9k_fvm_old() {
}
function _p9k_fvm_new() {
- _p9k_upglob .fvm/flutter_sdk @ && return 1
+ _p9k_upglob .fvm @ && 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,9 +1410,6 @@ _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} ))
@@ -1425,6 +1422,7 @@ _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
@@ -1749,9 +1747,16 @@ function _p9k_shorten_delim_len() {
# Percents are duplicated because this function is currently used only
# where the result is going to be percent-expanded.
function _p9k_url_escape() {
- emulate -L zsh -o no_multi_byte -o extended_glob
- local MATCH MBEGIN MEND
- _p9k__ret=${1//(#m)[^a-zA-Z0-9"\/:_.-!'()~"]/%%${(l:2::0:)$(([##16]#MATCH))}}
+ if [[ $1 == [a-zA-Z0-9"/:_.-!'()~ "]# ]]; then
+ _p9k__ret=${1// /%%20}
+ else
+ local c
+ _p9k__ret=
+ for c in ${(s::)1}; do
+ [[ $c == [a-zA-Z0-9"/:_.-!'()~"] ]] || printf -v c '%%%%%02X' $(( #c ))
+ _p9k__ret+=$c
+ done
+ fi
}
################################################################
@@ -1906,7 +1911,7 @@ prompt_dir() {
else
local key=
fi
- if ! _p9k_cache_ephemeral_get $0 $e $i $_p9k__cwd $p || [[ $key != $_p9k__cache_val[1] ]]; then
+ if ! _p9k_cache_ephemeral_get $0 $e $i $_p9k__cwd || [[ $key != $_p9k__cache_val[1] ]]; then
local rtail=${(j./.)rparts[i,-1]}
local parent=$_p9k__cwd[1,-2-$#rtail]
_p9k_prompt_length $delim
@@ -2319,11 +2324,7 @@ 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)"
- 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"
+ _p9k_cache_stat_set "${${(M)v:#Laravel Framework *}#Laravel Framework }"
fi
[[ -n $_p9k__cache_val[1] ]] || return
_p9k_prompt_segment "$0" "maroon" "white" 'LARAVEL_ICON' 0 '' "${_p9k__cache_val[1]//\%/%%}"
@@ -2426,45 +2427,18 @@ function _p9k_cached_cmd() {
}
################################################################
-# Segment to display Node version
+# Segment to diplay Node version
prompt_node_version() {
_p9k_upglob package.json -.
local -i idx=$?
- (( idx || ! _POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY )) || return
-
- local node=$commands[node]
- local -a file_deps env_deps
- if [[ $node == ${NODENV_ROOT:-$HOME/.nodenv}/shims/node ]]; then
- env_deps+=("$NODENV_VERSION")
- file_deps+=(${NODENV_ROOT:-$HOME/.nodenv}/version)
- if [[ $NODENV_DIR != (|.) ]]; then
- [[ $NODENV_DIR == /* ]] && local dir=$NODENV_DIR || local dir="$_p9k__cwd_a/$NODENV_DIR"
- dir=${dir:A}
- if [[ $dir != $_p9k__cwd_a ]]; then
- while true; do
- if [[ -e $dir/.node-version ]]; then
- file_deps+=($dir/.node-version)
- break
- fi
- [[ $dir == (/|.) ]] && break
- dir=${dir:h}
- done
- fi
- fi
- _p9k_upglob .node-version -. || file_deps+=($_p9k__parent_dirs[idx]/.node-version)
- elif (( idx )); then
- file_deps+=($_p9k__parent_dirs[idx]/package.json)
+ if (( idx )); then
+ _p9k_cached_cmd 0 $_p9k__parent_dirs[idx]/package.json node --version || return
+ else
+ (( _POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY )) && return
+ _p9k_cached_cmd 0 '' node --version || return
fi
-
- if ! _p9k_cache_stat_get "$0 $#env_deps ${(j: :)${(@q)env_deps}} ${(j: :)${(@q)file_deps}}" $file_deps $node; then
- local out
- out=$($node --version 2>/dev/null)
- _p9k_cache_stat_set $(( ! $? )) "$out"
- fi
- (( $_p9k__cache_val[1] )) || return
- local v=$_p9k__cache_val[2]
- [[ $v == v?* ]] || return
- _p9k_prompt_segment "$0" "green" "white" 'NODE_ICON' 0 '' "${${v#v}//\%/%%}"
+ [[ $_p9k__ret == v?* ]] || return
+ _p9k_prompt_segment "$0" "green" "white" 'NODE_ICON' 0 '' "${_p9k__ret#v}"
}
_p9k_prompt_node_version_init() {
@@ -2573,13 +2547,7 @@ _p9k_nvm_ls_current() {
prompt_nvm() {
[[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return
local current=$_p9k__ret
- (( _POWERLEVEL9K_NVM_SHOW_SYSTEM )) ||
- [[ $current != system ]] ||
- return
- (( _POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW )) ||
- ! _p9k_nvm_ls_default ||
- [[ $_p9k__ret != $current ]] ||
- return
+ ! _p9k_nvm_ls_default || [[ $_p9k__ret != $current ]] || return
_p9k_prompt_segment "$0" "magenta" "black" 'NODE_ICON' 0 '' "${${current#v}//\%/%%}"
}
@@ -3192,57 +3160,70 @@ instant_prompt_root_indicator() { prompt_root_indicator; }
################################################################
# Segment to display Rust version number
prompt_rust_version() {
- 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]
+ 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//\%/%%}"
}
-function _p9k_prompt_rust_version_init() {
- _p9k__async_segments_compute+='_p9k_rust_version_prefetch'
+_p9k_prompt_rust_version_init() {
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
@@ -3711,7 +3692,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 string we just generated, set the special
+ # To signal that we want to use the sting we just generated, set the special
# variable `ret' to something other than the default zero:
ret=1
return 0
@@ -3720,9 +3701,20 @@ 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)"
- _p9k_vcs_icon "$remote"
- vcs_visual_identifier=$_p9k__ret
+ 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
+
elif [[ "${hook_com[vcs]}" == "hg" ]]; then
vcs_visual_identifier='VCS_HG_ICON'
elif [[ "${hook_com[vcs]}" == "svn" ]]; then
@@ -3855,14 +3847,13 @@ function _p9k_vcs_status_purge() {
}
function _p9k_vcs_icon() {
- 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=
+ 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
}
function _p9k_vcs_render() {
@@ -3892,7 +3883,7 @@ function _p9k_vcs_render() {
state=CLEAN
fi
fi
- _p9k_vcs_icon "$VCS_STATUS_REMOTE_URL"
+ _p9k_vcs_icon
_p9k_prompt_segment prompt_vcs_$state "${__p9k_vcs_states[$state]}" "$_p9k_color1" "$_p9k__ret" 0 '' ""
return 0
fi
@@ -3945,8 +3936,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 compatibility.
- _p9k_vcs_icon "$VCS_STATUS_REMOTE_URL"
+ # of the GIT icon. That's what vcs_info does, so we do the same in the name of compatiblity.
+ _p9k_vcs_icon
icon=$_p9k__ret
fi
@@ -4243,49 +4234,6 @@ 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):
@@ -4295,21 +4243,11 @@ prompt_virtualenv() {
if (( _POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION )) && _p9k_python_version; then
msg="${_p9k__ret//\%/%%} "
fi
- 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
+ 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
msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER"
case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in
@@ -4666,10 +4604,9 @@ _p9k_prompt_java_version_init() {
}
prompt_azure() {
- local name cfg=${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json
- if _p9k_cache_stat_get $0 $cfg; then
- name=$_p9k__cache_val[1]
- else
+ local cfg=${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json
+ if ! _p9k_cache_stat_get $0 $cfg; then
+ local name
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
@@ -4677,7 +4614,6 @@ 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
@@ -4685,7 +4621,8 @@ prompt_azure() {
break
fi
done
- _p9k_prompt_segment "$0$state" "blue" "white" "AZURE_ICON" 0 '' "${name//\%/%%}"
+ [[ -n $_p9k__cache_val[1] ]] || return
+ _p9k_prompt_segment "$0$state" "blue" "white" "AZURE_ICON" 0 '' "${_p9k__cache_val[1]//\%/%%}"
}
_p9k_prompt_azure_init() {
@@ -4955,18 +4892,6 @@ 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 '' ''
@@ -5038,11 +4963,13 @@ function prompt_nix_shell() {
}
_p9k_prompt_nix_shell_init() {
- typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"=$_p9k_nix_shell_cond
+ typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${IN_NIX_SHELL:#0}${${path[(I)/nix/store/*]}:#0}'
}
function instant_prompt_nix_shell() {
- _p9k_prompt_segment prompt_nix_shell 4 $_p9k_color1 NIX_SHELL_ICON 1 "$_p9k_nix_shell_cond" '${(M)IN_NIX_SHELL:#(pure|impure)}'
+ _p9k_prompt_segment prompt_nix_shell 4 $_p9k_color1 NIX_SHELL_ICON 1 \
+ '${IN_NIX_SHELL:#0}${${path[(I)/nix/store/*]}:#0}' \
+ '${(M)IN_NIX_SHELL:#(pure|impure)}'
}
function prompt_terraform() {
@@ -5066,16 +4993,12 @@ _p9k_prompt_terraform_init() {
}
function prompt_terraform_version() {
- 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
+ _p9k_cached_cmd 0 '' terraform --version || return
+ local v=${_p9k__ret#Terraform v}
+ (( $#v < $#_p9k__ret )) || return
+ v=${v%%$'\n'*}
[[ -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() {
@@ -5124,11 +5047,8 @@ 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=()
@@ -5234,10 +5154,7 @@ function _p9k_taskwarrior_check_data() {
}
function _p9k_taskwarrior_init_data() {
- local -a stat files=(
- $_p9k_taskwarrior_data_dir/{pending,completed}.data
- $_p9k_taskwarrior_data_dir/taskchampion.sqlite3
- )
+ local -a stat files=($_p9k_taskwarrior_data_dir/{pending,completed}.data)
_p9k_taskwarrior_data_files=($^files(N))
_p9k_taskwarrior_data_non_files=(${files:|_p9k_taskwarrior_data_files})
if (( $#_p9k_taskwarrior_data_files )); then
@@ -5264,9 +5181,7 @@ 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=()
- # 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
+ if (( $#ts )); then
_p9k_taskwarrior_next_due=${${(on)ts}[1]}
(( _p9k_taskwarrior_next_due > EPOCHSECONDS )) || _p9k_taskwarrior_next_due=$((EPOCHSECONDS+60))
fi
@@ -5775,31 +5690,6 @@ _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() {
@@ -6691,12 +6581,9 @@ function _p9k_clear_instant_prompt() {
unset _z4h_saved_screen
fi
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
- local unexpected=${${content//$'\e[?'<->'c'}//$'\e['<->' q'}
- unexpected=${(S)unexpected//$'\eP'(|*[^$'\e'])($'\e\e')#$'\e\\'}
- unexpected=${(S)unexpected//$'\e'[^$'\a\e']#($'\a'|$'\e\\')}
+ local unexpected=${(S)${${content//$'\e[?'<->'c'}//$'\e['<->' q'}//$'\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'
@@ -6740,9 +6627,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#instant-prompt\ahttps://github.com/romkatv/powerlevel10k#instant-prompt\e]8;;\a}"
+ 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}"
else
- echo - "${(%):-https://github.com/romkatv/powerlevel10k#instant-prompt}"
+ echo - "${(%):-https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt}"
fi
echo -E - ""
echo - "${(%):-%3F-- console output produced during zsh initialization follows --%f}"
@@ -7454,36 +7341,6 @@ _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
@@ -7655,8 +7512,6 @@ _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
@@ -7738,7 +7593,6 @@ _p9k_init_params() {
_p9k_declare -i POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM -1
_p9k_declare -i POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM -1
_p9k_declare -b POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS 0
- _p9k_declare -F POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC 10
_p9k_declare -b POWERLEVEL9K_DISABLE_GITSTATUS 0
_p9k_declare -e POWERLEVEL9K_VI_INSERT_MODE_STRING "INSERT"
_p9k_declare -e POWERLEVEL9K_VI_COMMAND_MODE_STRING "NORMAL"
@@ -7804,12 +7658,6 @@ _p9k_init_params() {
# If set to true, time will update every second.
_p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0
- _p9k_declare -b POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH 0
- typeset -g _p9k_nix_shell_cond='${IN_NIX_SHELL:#0}'
- if (( _POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH )); then
- _p9k_nix_shell_cond+='${path[(r)/nix/store/*]}'
- fi
-
local -i i=1
while (( i <= $#_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS )); do
local segment=${${(U)_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[i]}//İ/I}
@@ -8382,17 +8230,9 @@ _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
@@ -8517,8 +8357,8 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit
fi
- _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=$'v141\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
+ _p9k__param_pat+=$__p9k_force_term_shell_integration$'\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'
@@ -8590,14 +8430,7 @@ 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_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
+ _p9k_transient_prompt+=')%b%k%f%s%u '
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
@@ -8624,25 +8457,18 @@ 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#installation\ahttps://github.com/romkatv/powerlevel10k#installation\e]8;;\a.}"
+ >&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.}"
else
- >&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k#installation.}"
+ >&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation.}"
fi
if (( $+zsh_defer_options )); then
>&2 echo -E - ""
@@ -9082,8 +8904,6 @@ _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
- 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})
}
@@ -9483,7 +9303,6 @@ 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.10
unset VSCODE_SHELL_INTEGRATION
_p9k_init_ssh
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index 8d20675c..ecc9a476 100644
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -767,11 +767,6 @@ function ask_quotes() {
}
function ask_arrow() {
- # This condition holds as long as zsh is compiled with unicode 9 support.
- if (( ${(m)#${(g::)1}} != 1 )); then
- cap_arrow=0
- return
- fi
[[ -n $2 ]] && add_widget 0 flowing -c "$2"
add_widget 0 flowing -c %BDoes this look like an%b "%2Fupwards arrow%f%B?%b"
add_widget 0 flowing -c reference: "$(href https://graphemica.com/%F0%9F%A0%89)"
@@ -795,39 +790,6 @@ function ask_arrow() {
return 0
}
-function print_indented() {
- local -i max_width=$1
- local text=$2
- local -i indent='(wizard_columns - max_width) / 2'
- print -P "${(l:$indent:: :)}$text"
-}
-
-function ask_width() {
- add_widget 0 flowing -c %BWhat digit is the%b "%2Fdownwards arrow%f" %Bpointing "at?%b"
- add_widget 0 print -P ""
- add_widget 0 print_indented 11 '%3F\UF0734%f %3F\UF0734%f %3F\UF0734%f %2F\UF072E%f'
- add_widget 0 print_indented 11 ' 111222'
- add_widget 0 print -P ""
- add_widget 3
- add_widget 0 print -P "%B(1) It is pointing at '1'.%b"
- add_widget 0 print -P ""
- add_widget 1
- add_widget 0 print -P "%B(2) It is pointing at '2'.%b"
- add_widget 0 print -P ""
- add_widget 1
- add_widget 0 print -P "%B(3) Something else.%b"
- add_widget 0 print -P ""
- add_widget 2
- add_widget 0 print -P "(r) Restart from the beginning."
- ask 123r
- case $choice in
- r) return 1;;
- 1) cap_arrow=1;;
- 2|3) cap_arrow=0;;
- esac
- return 0
-}
-
function ask_icon_padding() {
if [[ $POWERLEVEL9K_MODE == (powerline|compatible|ascii) ]]; then
POWERLEVEL9K_ICON_PADDING=none
@@ -1075,19 +1037,19 @@ function ask_time() {
add_widget 0 flowing -c "%BShow current time?%b"
add_widget 0 print
add_widget 1
- add_widget 0 print -P "%B(n) No.%b"
+ add_widget 0 print -P "%B(1) No.%b"
add_prompt time=
- add_widget 0 print -P "%B(1) 12-hour format.%b"
- add_prompt time=$time_12h
add_widget 0 print -P "%B(2) 24-hour format.%b"
add_prompt time=$time_24h
+ add_widget 0 print -P "%B(3) 12-hour format.%b"
+ add_prompt time=$time_12h
add_widget 0 print -P "(r) Restart from the beginning."
- ask n12r
+ ask 123r
case $choice in
r) return 1;;
- n) time=;;
- 1) time=$time_12h; options+='12h time';;
+ 1) time=;;
2) time=$time_24h; options+='24h time';;
+ 3) time=$time_12h; options+='12h time';;
esac
return 0
}
@@ -1126,26 +1088,18 @@ function os_icon_name() {
if [[ -r /etc/os-release ]]; then
local lines=(${(f)"$($__p9k_cfg_path
}
@@ -2033,7 +1985,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:]]##(|--[[: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:]]##($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'
@@ -2115,7 +2067,7 @@ while true; do
unset pure_use_rprompt
- if [[ -o multibyte && $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
+ if [[ $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
ask_font || continue
ask_diamond || continue
if [[ $AWESOME_GLYPHS_LOADED == 1 ]]; then
@@ -2143,9 +2095,6 @@ while true; do
POWERLEVEL9K_MODE=awesome-fontconfig
else
ask_arrow '\UF0737' || continue
- if (( cap_arrow )); then
- ask_width || continue
- fi
if (( cap_arrow )); then
POWERLEVEL9K_MODE=nerdfont-v3
else