Compare commits

...

165 Commits

Author SHA1 Message Date
Roman Perepelitsa 2b7da93df0 docs: fixup for #2718 5 months ago
Roman Perepelitsa 821b25dc32 Merge branch 'eliwss0-patch-1' 5 months ago
Eli Weiss 4a2ef610ef
Add instructions on setting Conemu font
Add instructions on setting font to MesloLGS NF in Conemu
5 months ago
Roman Perepelitsa df8ed16343 wizard: prefer POWERLEVEL9K_MODE=nerdfont-v3 over nerdfont-complete"
The preference for nerdfont-complete was necessitated by a bug
in Windows Terminal that has since been fixed.

This reverts commit b474978b2e.

  wizard: prefer POWERLEVEL9K_MODE=nerdfont-complete over nerdfont-v3

See the reverted commit for details on the Windows Terminal bug.
5 months ago
Roman Perepelitsa bde5ca4c2a
docs: the project is on life support 6 months ago
Elan Ruusamäe 16e5848426
Doc: Use shorter readme link (#2671)
Since it links to readme on default branch (permalink), can just omit that all making links shorter.
6 months ago
Roman Perepelitsa 3395c828b2 docs: mention that vscode terminal does not respect foreground colors chosen by the user by default 6 months ago
Roman Perepelitsa b28d68f44b allow ~/.timewarrior to be a symbolic link (#2603) 7 months ago
Roman Perepelitsa 01e3f0b4ba bump version 7 months ago
Roman Perepelitsa 808ba80ab0 fail more gracefully on timewarrior v3.0.1 (#2648) 7 months ago
Alejandro Armas 178fcda348
Update README.md Fix Typo (#2637)
Removes the extra ')' in the yazi segment meaning
7 months ago
Alexander Blum bcef7cafdf
fixes taskwarrior init data for taskwarrior v3 (#2635) 7 months ago
Roman Perepelitsa aeff1153d4 handle unquoted `prompt` when parsing pyenv.cfg 7 months ago
Roman Perepelitsa 7c2ce29c3f Merge branch 'hodeinavarro-hodei-pyenv-prompt-2628' 7 months ago
Hodei Navarro d6a0fed1d9
Ease regex pattern when reading pyenv.cfg prompt value
This commit provides support for virtualenv-like pyenv.cfg configuration files, where the `prompt` value is a plain text rather than a quoted string.
Before the commit, `prompt = My custom prompt` would not match the regex, returning a fallback of the $VIRTUAL_ENV directory name.
After the commit, both venv-like `prompt = 'My custom prompt'` and virtualenv-like `prompt = My custom prompt` are supported.

Closes #2628
7 months ago
Mohammad Al Zouabi da9b03777c
remove duplicate POWERLEVEL9K_DIR_SHOW_WRITABLE from p10k-lean-8colors.zsh (#2610) 8 months ago
Roman Perepelitsa 3fe8706d24 Merge commit '45627c528b4e3d8949a1e5c72ee3fe7cac516d8d' 8 months ago
Roman Perepelitsa 45627c528b Squashed 'gitstatus/' changes from 215063d4..62177e89
62177e89 build: drop -Werror

git-subtree-dir: gitstatus
git-subtree-split: 62177e89b2b04baf242cd1526cc2661041dda0fb
8 months ago
Roman Perepelitsa a7f13e420e bump version 8 months ago
Roman Perepelitsa 55c8f74c38 Revert "remove `DISABLE_UPDATE_PROMPT=true` from instant prompt"
This reverts commit 07a971d310.
8 months ago
Roman Perepelitsa 50794faba4 Revert "add p10k-deactivate-instant-prompt"
This reverts commit 93d074a82b.
8 months ago
Roman Perepelitsa a3f7dabcae cleanup 8 months ago
Roman Perepelitsa 93d074a82b add p10k-deactivate-instant-prompt
Function p10k-deactivate-instant-prompt is defined when and only when
instant prompt is active. Invoking it erases and deactivates instant
prompt.
8 months ago
Roman Perepelitsa 07a971d310 remove `DISABLE_UPDATE_PROMPT=true` from instant prompt
If this breaks your shell, it means you are using an old version of
oh-my-zsh, which predates this commit:

fe0dd8226d

You need to upgrade oh-my-zsh by running the following command:

    omz update
8 months ago
Roman Perepelitsa 6836bfe2da
fix heads in the wizard (#2605)
fixed on the phone, hence the dumb diff
8 months ago
Roman Perepelitsa 0fdca5b1e6 always offer the flat heads option in the wizard (#2600) 8 months ago
Roman Perepelitsa d39e426835 docs: mention sessions in the font instructions for MobaXterm (#2599) 8 months ago
Roman Perepelitsa 0cc19ac2ed use nf-md-redhat as the RHEL logo when on nerdfont-v3 (#2583) 9 months ago
Roman Perepelitsa b973805f01 cleanup and bump version (#2576) 9 months ago
Roman Perepelitsa b379cf6225 Merge branch 'cybershoe-2575-raspberry-pi-os-logo' 9 months ago
Adam Schumacher bb16e366c3 Undelete ubuntu. I shouldn't code this tired. 9 months ago
Adam Schumacher 31d99b694c Fix in wizard.zsh 9 months ago
Adam Schumacher bfbc65e63d whitespace 9 months ago
Adam Schumacher 12e0592ac8 Still keep debian 9 months ago
Adam Schumacher 9e3418d319 Detect rpi os based on apt source 9 months ago
Roman Perepelitsa 17cd9e354a when looking for .fvm/flutter_sdk, require that the last segment is a symlink rather than .fvm (#2573) 9 months ago
Roman Perepelitsa 8e2a22d80b cleanup and bump version (#2572) 9 months ago
Roman Perepelitsa 5ef7487648 Merge branch 'weirdgiraffe-master' 9 months ago
weirdgiraffe f880e18769
update readme 9 months ago
weirdgiraffe 665257d059
add themes support 9 months ago
weirdgiraffe 67cedd3edc
add visual expansion to wizard 9 months ago
weirdgiraffe eb8f96f808
add prompt segment for yazi levels 9 months ago
weirdgiraffe 1aa91f0069
add icon for yazi level 9 months ago
Roman Perepelitsa 5bba4b849b skip batteries with "Unknown" status (#2562) 9 months ago
Roman Perepelitsa ce7c242337 bump versions 9 months ago
Ulices 34ee1c6bbb
fix: use correct sourcehut repository url (#2556)
sourcehut.org is the website of the organization but
sr.ht is the website were the repositories are hosted.
9 months ago
Roman Perepelitsa 62341054d8 set the default value of LINUX_NEON_ICON to a glyph that exists in the recommended font (#2553) 10 months ago
Roman Perepelitsa be39c4ea5a Merge branch 'And9815-master' 10 months ago
Andrea adc238fa1d neon support 10 months ago
Andrea 6f4520cc13 add neon support 10 months ago
Roman Perepelitsa 307bce24d1 docs: fix a link to zsh-theme-powerlevel10k archlinux package 10 months ago
Roman Perepelitsa 35833ea15f docs: document per_directory_history segment (#2384) 10 months ago
Roman Perepelitsa bd0fa8a08f docs: fix a link 10 months ago
Roman Perepelitsa a6fa4e4304 faq: [oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found 10 months ago
Roman Perepelitsa ab6a863e23 docs: mention truecolor 10 months ago
Roman Perepelitsa 8fefef2285 rewrite the handling of custom prompt in virtualenv (#2540) 10 months ago
Roman Perepelitsa ecf91710c0 Merge branch 'mickolka-feature/virtualenv-custom-prompt' 10 months ago
Roman Perepelitsa d774adcb85 Merge branch 'feature/virtualenv-custom-prompt' of https://github.com/mickolka/powerlevel10k into mickolka-feature/virtualenv-custom-prompt 10 months ago
Roman Perepelitsa 30ba16ecd8 font: update alacritty instructions (#2539)
Alacritty has switched from yaml to toml for its config file.
10 months ago
Mikalai Rahachou 4d7925c983
Add parsing of pyvenv.cfg 10 months ago
Roman Perepelitsa c180a5e040 font: fix foot instructions (#2536) 10 months ago
Roman Perepelitsa 75724ec65e Merge branch 'LlemonDuck-patch-1' 10 months ago
Rhea 9be438f862
add foot font instructions
This adds instructions to the README for users of [foot](https://codeberg.org/dnkl/foot) to enable the MesloLGS Nerd Font as the default in their terminal.
10 months ago
Roman Perepelitsa cda24b72b7 bump version 10 months ago
Roman Perepelitsa f5d5abfe1f fix a silly bug introduced in the last commit (#2534) 10 months ago
Roman Perepelitsa 651033c3df work around a bug in laravel that results in colorized output (#2534) 10 months ago
Roman Perepelitsa d804048efc fix a bug in DCS detection within instant prompt output (#2518) 10 months ago
Roman Perepelitsa cc6ed4be41 add `cdk` to POWERLEVEL9K_AWS_SHOW_ON_COMMAND (#1104) 11 months ago
Roman Perepelitsa dec881651c Squashed 'gitstatus/' changes from 38d35b959..215063d47
215063d47 update libgit2 ref (#414)

git-subtree-dir: gitstatus
git-subtree-split: 215063d4703b944f66cc7cc92543205586a35485
11 months ago
Roman Perepelitsa d70eedb345 Merge commit 'dec881651ccbd90f7f68b2a2012cf4870741d0dd' 11 months ago
Roman Perepelitsa 36cce9a088 wizard: replace rm with zf_rm (#2504) 11 months ago
Roman Perepelitsa 3cc18b5e08 Merge branch 'oe7drt-openbsd-wizard' 11 months ago
Dominic Reich 44f754d711
use "rm" instead of "unlink" to delete old config file 11 months ago
Roman Perepelitsa 47b0187a67 docs: add a note about `p10k reload` (#2006) 11 months ago
Roman Perepelitsa b9a2d846ef docs: clarify that powerlevel10k does not install new commands (#2498) 12 months ago
Roman Perepelitsa 7fd76370f5 be a lot more strict when matching the remote git URL (#2493)
When you choose "Many icons" option in the configuration wizard,
git repositories with a remote receive an icon that depends on
the remote's URL. In the past the matching of the URL was rather
lax: both https://foo.bar/github.com and https://github.com.foo.bar/
were recognized as belonging to github.com. This is no longer the
case.

If you start seeing the plain "git" icon where you were used to
seeing a github/gitlab/etc logo, please open an issue. Make sure
to mention the remote URL of your repo.

This change also allows you to specify the mapping from remote URLs
to icons. Here's an example:

    typeset -g POWERLEVEL9K_VCS_GIT_REMOTE_ICONS=(
      '*@my-company.com:*' VCS_GIT_MY_COMPANY_ICON
      '?*'                 VCS_GIT_ICON
      '*'                  ''
    )

    POWERLEVEL9K_VCS_GIT_MY_COMPANY_ICON='my-company-logo'

The matching is done in the specified order: the first match wins.
12 months ago
Roman Perepelitsa 9547f22822 s/VCS_GIT_ARCH_ICON/VCS_GIT_ARCHLINUX_ICON/ (#2493) 12 months ago
Roman Perepelitsa c39e5304a1 add VCS_GIT_GITEA_ICON and VCS_GIT_SOURCEHUT_ICON (#2493) 12 months ago
Roman Perepelitsa 096a731db3 define usable defaults for VCS_*_ICON (#2493) 12 months ago
Roman Perepelitsa 783588c17f Merge branch 'add_remotes' of https://github.com/hasecilu/powerlevel10k 12 months ago
Roman Perepelitsa 211c90343f wizard: recognize `source -- ~.p10k.zsh` in .zshrc 12 months ago
hasecilu 47d5397baa
Add various remote git server instances
Currently only icons for big providers of git hosting service are available.

Organizations of open source software usually manage their own instances.

Adding the remote addresses of some of this organizations will let us to
identify via a glyph icon the provider of the source code.
12 months ago
hasecilu 92bee79642
Add icons for VCS_GIT usage
The icons are from organizations that manage a git instance by themselves.
12 months ago
Roman Perepelitsa 174ce9bf01 recognize azure devops git remote HTTPS URLs (#2472) 1 year ago
Roman Perepelitsa 18f0bec1bb use newer icons for azure and azure devops (#2472) 1 year ago
Roman Perepelitsa 430616734a make terraform_version compatible with tfenv (#2049) 1 year ago
Roman Perepelitsa c7fa7d6748 make rust_version segment compatible with the new rustup toolchain file (#2413) 1 year ago
Roman Perepelitsa 862440ae11 add an icon for azure to vcs (#2447) 1 year ago
Roman Perepelitsa 873c4ff09c fix the path to powerlevel10k when installing with homebrew (#2429) 1 year ago
Roman Perepelitsa 215b20e087 bump version 1 year ago
Jussi Timperi be4c68fd0a
add Guix System icon (#2424) 1 year ago
Roman Perepelitsa f8595a35bf use powerlevel10k from homebrew/core when installing with brew 1 year ago
Nanda Lopes 011b8469ab
typo: s/.tool-version/.tool-versions/ in all configs 1 year ago
Roman Perepelitsa d8041e4700 Squashed 'gitstatus/' changes from bdaad2e8d..38d35b959
38d35b959 cleanup
7e7b5e807 bash prompt: set PROMPT_COMMAND in a nicer and more robust manner (#403)
7ee9227de Merge branch 'samiam-append_prompt'
198ed58ce Revert "Update README to append to PROMPT_COMMAND"
8b6a229fa Switch to using var assignment for backward compatibility
693f9efa0 Update README to append to PROMPT_COMMAND
a48175ce1 Append to PROMPT_COMMAND to play nice with other prompt programs

git-subtree-dir: gitstatus
git-subtree-split: 38d35b95926e09d07b8cf78edade7cee7a9a1dcf
1 year ago
Roman Perepelitsa f04ce05d92 Merge commit 'd8041e4700ace779aaf42e19c3de2d25a14dbae8' 1 year ago
Roman Perepelitsa 9401ed17c0 Squashed 'gitstatus/' changes from abb4f6a52..bdaad2e8d
bdaad2e8d Makefile: remove the explicit check for the existence of $(CXX)
6d32e0272 Merge branch 'criadoperez-fix/makefile'
c0e3c250e improved Makefile

git-subtree-dir: gitstatus
git-subtree-split: bdaad2e8d0e6e2f9928e067c85de8096b87e21fa
1 year ago
Roman Perepelitsa 69d726d9fb Merge commit '9401ed17c0a8c3d1654214a204b8d5b5f7ccf386' 1 year ago
Roman Perepelitsa 22cb2f79dd Squashed 'gitstatus/' changes from 4b47ca047..abb4f6a52
abb4f6a52 fix typos in docs and comments
958ae4e6d docs: explicitly mention that core.fsmonitor was disable in git benchmarks (#370)

git-subtree-dir: gitstatus
git-subtree-split: abb4f6a5225d12f51ffd8196060804b0c770482e
1 year ago
Roman Perepelitsa 2d9c1f271b Merge commit '22cb2f79ddb89a368dd823e815fa1b0587ff1b6a' 1 year ago
Alejandro Criado-Pérez 717f9a1881
fix typos in docs and comments 1 year ago
Roman Perepelitsa f851f41fc1 remove MULTIBYTE requirement from the configuration wizard (#2397) 1 year ago
Roman Perepelitsa 9bb15e9ffb docs: rephrase "Git status looks incorrect" section 1 year ago
Roman Perepelitsa ef401ad02a Merge branch 'fzakaria-skip-hash' 1 year ago
Farid Zakaria a8fa0e2a1b Add documentation explaining lack of support for skipHash
libgit2 does not support skipHash which causes the prompt to be
incorrect for repos that have it toggled.

Add the documentation for this gap.

fixes #2387
1 year ago
Roman Perepelitsa 68104494a7 bump version + cleanup (#2391) 1 year ago
Roman Perepelitsa baf03bf48e Merge branch 'mgkurtz-mgk/rocky' 1 year ago
Markus Kurtz 367c667de6 Add rocky icon to wizard 1 year ago
Markus Kurtz 12aa3fa3c4 Add rocky icon 1 year ago
Roman Perepelitsa 7e9a79f3f1 new segment: per_directory_history (#2384) 1 year ago
Roman Perepelitsa 1d96f5e066 unquote ID in /etc/os-release (#2388) 1 year ago
Roman Perepelitsa e8aa8cce7f unquote ID in /etc/os-release (#2388) 1 year ago
Roman Perepelitsa 646bae0dd6 docs: Terminus is now called Tabby 1 year ago
Roman Perepelitsa 4cc0ea0081 Merge branch 'hugivar-master' 1 year ago
hugo 2453fd27e2
Update README.md as Terminus is now known as Tabby 1 year ago
Roman Perepelitsa 932954a8b1 do not display an indicator when a git branch is up to date with a remote
https://github.com/romkatv/powerlevel10k/issues/2361 requested an indicator for
up to date branches, which was added in
20323d6f8c.

Since then, 3 users complained about the new indicator:

- https://github.com/romkatv/powerlevel10k/issues/2377
- https://github.com/romkatv/powerlevel10k/issues/2380
- https://github.com/romkatv/powerlevel10k/issues/2361#issuecomment-1630731045

On one hand we have one request to add a feature. On the other hand we have
three complaints about the feature's existence. The feature is going away.
1 year ago
Roman Perepelitsa 93d97b7eba better comments 1 year ago
Roman Perepelitsa 078497570f clean up the handling of POWERLEVEL9K_AZURE_CLASSES and put it in all configs (#2379)
This reverts commit 343d4f44e5, reversing
changes made to 4dca4bdfbb.
1 year ago
Roman Perepelitsa 343d4f44e5 Merge branch 'benm-stm-bug/sub-patterns-colors-for-azure' 1 year ago
BEN MANSOUR Mohamed Rafik 0c28fec137 fix pattern coloration for azure defined classes 1 year ago
Roman Perepelitsa 4dca4bdfbb bug fix: honor POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR in instant prompt (#2376) 1 year ago
Roman Perepelitsa 20323d6f8c display `=` in git status if up to date with the remote (#2361) 1 year ago
Roman Perepelitsa 017395a266 release v1.19.0 1 year ago
Koen van Zuijlen ab8bac01e2
Add sparkctl to POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND (#2346) 1 year ago
Roman Perepelitsa 360dcd3907 respect XDG_DATA_HOME when looking for the timewarrior data directory (#2344)
The logic for finding the data directory is as follows:

1. Find the root directory:
  1.1 If TIMEWARRIORDB is set, use that.
  1.2 Else if ~/.timewarrior is an existing directory, use that.
  1.3 Else if XDG_DATA_HOME is set, use $XDG_DATA_HOME/timewarrior.
  1.4 Else use ~/.local/share/timewarrior.
2. Append "/data" to the root directory.
1 year ago
Roman Perepelitsa 944f52fc43 move chezmoi_shell in the docs closer to other shell indicator segments 1 year ago
Roman Perepelitsa cc4878aef2 fix chezmoi segment and rename it to chezmoi_shell (#2311)
- Link to the project's homepage rather than its source code.
- Move `chezmoi_shell` next to all the other *shell indicator* segments.
- Use a shade of blue that resembes the color on chezmoi.io.
- Don't go beyond 8 colors in 8-color configs.
- Remove the segment from the *pure* config.
- Fix whitespace padding on `CHEZMOI_ICON`.
- Use the appropriate icon with all fonts (the same as `HOME`).
- Add missing `CHEZMOI_ICON` definitions for "powerline" and "ascii" font modes.
- Remove the redundant literal "chezmoi" content from the segment.
- Fix instant prompt so that the segment is shown only when `$CHEZMOI` is non-empty.
1 year ago
Roman Perepelitsa c775a3ffd5 Merge branch 'Alkindi42-feat/add-chezmoi-prompt' 1 year ago
Roman Perepelitsa 416bdf1ca3 Merge branch 'feat/add-chezmoi-prompt' of https://github.com/Alkindi42/powerlevel10k into Alkindi42-feat/add-chezmoi-prompt 1 year ago
Alkindi42 3ecef8c6a5 feat(chezmoi): add instant_prompt_chezmoi 1 year ago
Alkindi42 7b19746580 feat: add color and custom icon 1 year ago
kvanzuijlen e4b8925478 Added cert manager cmctl to POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND 1 year ago
Roman Perepelitsa 79753faacb add a comment within .p10k.zsh explaining the use of "_joined" (#2332) 1 year ago
Roman Perepelitsa 3ce7bac4ff Merge branch 'warp' 1 year ago
Alkindi42 9ed51ec315 doc: add chezmoi prompt in the README 2 years ago
Alkindi42 6db5920bb9 feat: add chezmoi icon 2 years ago
Alkindi42 29c0b25850 feat: enable chezmoi prompt in configurations 2 years ago
Skyler 951d695789 Update README.md
Fixed a small bug in alpine linux hyperlink under Installation
2 years ago
Alkindi42 6740f08f61 chezmoi: add chezmoi prompt 2 years ago
Roman Perepelitsa 8cce84643f set P9K_VERSION (#2307) 2 years ago
Roman Perepelitsa a69aa22fa8 show the right cwd when some part of it gets renamed (#2304) 2 years ago
Roman Perepelitsa f4a7e6d0e0 force shell integration when running under warp (#2307) 2 years ago
Roman Perepelitsa 7bb3f05318 annotate right prompt for warp (#2307) 2 years ago
Arthur McLain 9b47a22f13 Update README.md 2 years ago
Roman Perepelitsa 1dcd882593 set P9K_STARTUP_CONSOLE_OUTPUT to assist in debugging startup console output problems 2 years ago
Roman Perepelitsa 064f4d2209 whitelist DCS in startup console output (#2299) 2 years ago
Roman Perepelitsa 0a9eb73e16 nvm: change the default value of POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW back to false (#2296) 2 years ago
Roman Perepelitsa 016512f493 nvm: change the default value of POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW to true and fix the way it is used (#2296) 2 years ago
Roman Perepelitsa 7039779c19 Merge branch 'zaidhaan-nvm-always-show' 2 years ago
Zaidhaan Hussain 4ed8aae324 nvm: implement POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW and default to false 2 years ago
Zaidhaan Hussain 5d16c106ed nvm: implement POWERLEVEL9K_NVM_SHOW_SYSTEM and default to true 2 years ago
Roman Perepelitsa 0af598cbed wizard: add a screen for detecting faulty terminals that render glyphs such as U+F0001 as wide (e.g., Windows Terminal) 2 years ago
Roman Perepelitsa ce0bee979b wizard: check for unicode 9 support before asking about U+F0737 2 years ago
Roman Perepelitsa dff735c261 increase the default value of POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC from 5 to 10 2 years ago
Roman Perepelitsa 630c1868df add POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC 2 years ago
Roman Perepelitsa bbea8d2d06 use U+F327 (Kali Linux logo) only with POWERLEVEL9K_MODE=nerdfont-v3 (#2281) 2 years ago
Roman Perepelitsa 6f8dec7a76 Merge branch 'zerom0-master' 2 years ago
Martin Mosler 94c4428ddc added icon for kali linux 2 years ago
Roman Perepelitsa 045f006c50 correctly resolve node_version when using nodenv (#2268) 2 years ago
Roman Perepelitsa c1b5b2c8aa Merge branch 'LucasLarson-clock_mnemonic' 2 years ago
Lucas Larson 954f38d589
use less surprising input for clock option
for the three clock options (no clock, a 12-hour clock, or a 24-hour
clock), use the first character of the option as the input to
fix #2266.

This pull request is a reissue of – and supersession of – #2267,
which was pushed on a branch with non-ASCII characters in the name.

Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
2 years ago
Roman Perepelitsa f27d192eb2 bump version 2 years ago
Roman Perepelitsa bab655fb1f do not infer nix_shell from PATH unless POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH is set to true (#2246) 2 years ago
Roman Perepelitsa fb1287fedb simplify _p9k_url_escape 2 years ago
Roman Perepelitsa 1cff22491b fix the kubernetes icon (#2217) 2 years ago
Roman Perepelitsa b474978b2e wizard: prefer POWERLEVEL9K_MODE=nerdfont-complete over nerdfont-v3
Apparently Windows Terminal has a bug. To reproduce:

    print -P '\UF0737%K{red} %k'

The expected output:

    x_

Here 'x' signifies any glyph of width 1, and '_' signifies a red
block.

The actual output:

    x _

Notice the space.

The output of the following two commands is as expected:

    print -P '\UFC35%K{red} %k'
    print -P '\UFC35x'
2 years ago

@ -2,6 +2,11 @@
[![Gitter](https://badges.gitter.im/powerlevel10k/community.svg)]( [![Gitter](https://badges.gitter.im/powerlevel10k/community.svg)](
https://gitter.im/powerlevel10k/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) https://gitter.im/powerlevel10k/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
- **THE PROJECT HAS VERY LIMITED SUPPORT**
- **NO NEW FEATURES ARE IN THE WORKS**
- **MOST BUGS WILL GO UNFIXED**
- **HELP REQUESTS WILL BE IGNORED**
Powerlevel10k is a theme for Zsh. It emphasizes [speed](#uncompromising-performance), Powerlevel10k is a theme for Zsh. It emphasizes [speed](#uncompromising-performance),
[flexibility](#extremely-customizable) and [out-of-the-box experience](#configuration-wizard). [flexibility](#extremely-customizable) and [out-of-the-box experience](#configuration-wizard).
@ -300,10 +305,11 @@ To ~~ridiculous~~ extravagant:
### Batteries included ### Batteries included
Powerlevel10k comes with dozens of built-in high quality segments. When you run `p10k configure` Powerlevel10k comes with dozens of built-in high quality prompt segments that can display
and choose any style except [Pure](#pure-compatibility), many of these segments get enabled by information from a variety of sources. When you run `p10k configure` and choose any style
default while others can be manually enabled by opening `~/.p10k.zsh` and uncommenting them. You can except [Pure](#pure-compatibility), many of these segments get enabled by
enable as many segments as you like. It won't slow down your prompt or Zsh startup. default while others can be manually enabled by opening `~/.p10k.zsh` and uncommenting them.
You can enable as many segments as you like. It won't slow down your prompt or Zsh startup.
| Segment | Meaning | | Segment | Meaning |
|--------:|---------| |--------:|---------|
@ -338,6 +344,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `nix_shell` | [nix shell](https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) indicator | | `nix_shell` | [nix shell](https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) indicator |
| `nnn` | [nnn](https://github.com/jarun/nnn) shell | | `nnn` | [nnn](https://github.com/jarun/nnn) shell |
| `lf` | [lf](https://github.com/gokcehan/lf) shell | | `lf` | [lf](https://github.com/gokcehan/lf) shell |
| `chezmoi_shell` | [chezmoi](https://www.chezmoi.io/) shell |
| `nodeenv` | node.js environment from [nodeenv](https://github.com/ekalinin/nodeenv) | | `nodeenv` | node.js environment from [nodeenv](https://github.com/ekalinin/nodeenv) |
| `nodenv` | node.js environment from [nodenv](https://github.com/nodenv/nodenv) | | `nodenv` | node.js environment from [nodenv](https://github.com/nodenv/nodenv) |
| `node_version` | [node.js](https://nodejs.org/) version | | `node_version` | [node.js](https://nodejs.org/) version |
@ -345,6 +352,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `nvm` | node.js environment from [nvm](https://github.com/nvm-sh/nvm) | | `nvm` | node.js environment from [nvm](https://github.com/nvm-sh/nvm) |
| `os_icon` | your OS logo (apple for macOS, swirl for debian, etc.) | | `os_icon` | your OS logo (apple for macOS, swirl for debian, etc.) |
| `package` | `name@version` from [package.json](https://docs.npmjs.com/files/package.json) | | `package` | `name@version` from [package.json](https://docs.npmjs.com/files/package.json) |
| `per_directory_history` | Oh My Zsh [per-directory-history](https://github.com/jimhester/per-directory-history) local/global indicator |
| `perlbrew` | perl version from [perlbrew](https://github.com/gugod/App-perlbrew) | | `perlbrew` | perl version from [perlbrew](https://github.com/gugod/App-perlbrew) |
| `phpenv` | php environment from [phpenv](https://github.com/phpenv/phpenv) | | `phpenv` | php environment from [phpenv](https://github.com/phpenv/phpenv) |
| `php_version` | [php](https://www.php.net/) version | | `php_version` | [php](https://www.php.net/) version |
@ -355,6 +363,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `pyenv` | python environment from [pyenv](https://github.com/pyenv/pyenv) | | `pyenv` | python environment from [pyenv](https://github.com/pyenv/pyenv) |
| `ram` | free RAM | | `ram` | free RAM |
| `ranger` | [ranger](https://github.com/ranger/ranger) shell | | `ranger` | [ranger](https://github.com/ranger/ranger) shell |
| `yazi` | [yazi](https://github.com/sxyazi/yazi) shell |
| `rbenv` | ruby environment from [rbenv](https://github.com/rbenv/rbenv) | | `rbenv` | ruby environment from [rbenv](https://github.com/rbenv/rbenv) |
| `rust_version` | [rustc](https://www.rust-lang.org) version | | `rust_version` | [rustc](https://www.rust-lang.org) version |
| `rvm` | ruby environment from [rvm](https://rvm.io) | | `rvm` | ruby environment from [rvm](https://rvm.io) |
@ -395,6 +404,11 @@ it out of the box.
Type `p10k help segment` for reference. Type `p10k help segment` for reference.
*Note*: If you modify `POWERLEVEL9K_*` parameters in an already initialized interactive shell (as
opposed to editing `~/.p10k.zsh`), the changes might not be immediately effective. To apply the
modifications, invoke `p10k reload`. Setting `POWERLEVEL9K_DISABLE_HOT_RELOAD=false` eliminates the
necessity for `p10k reload` but results in a marginally slower prompt.
*Tip*: Prefix names of your own segments with `my_` to avoid clashes with future versions of *Tip*: Prefix names of your own segments with `my_` to avoid clashes with future versions of
Powerlevel10k. Powerlevel10k.
@ -415,7 +429,7 @@ Powerlevel10k.
- [Zap](#zap) - [Zap](#zap)
- [Homebrew](#homebrew) - [Homebrew](#homebrew)
- [Arch Linux](#arch-linux) - [Arch Linux](#arch-linux)
- [Alpine Linux](#arch-linux) - [Alpine Linux](#alpine-linux)
- [Fig](#fig) - [Fig](#fig)
### Manual ### Manual
@ -508,8 +522,8 @@ Add `plug "romkatv/powerlevel10k"` to `~/.zshrc`.
### Homebrew ### Homebrew
```zsh ```zsh
brew install romkatv/powerlevel10k/powerlevel10k brew install powerlevel10k
echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
``` ```
### Arch Linux ### Arch Linux
@ -523,7 +537,7 @@ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zs
referenced above is the official Powerlevel10k package. referenced above is the official Powerlevel10k package.
There is also [zsh-theme-powerlevel10k]( There is also [zsh-theme-powerlevel10k](
https://www.archlinux.org/packages/community/x86_64/zsh-theme-powerlevel10k/) community package. https://www.archlinux.org/packages/extra/x86_64/zsh-theme-powerlevel10k/) package.
Historically, [it has been breaking often and for extended periods of time]( Historically, [it has been breaking often and for extended periods of time](
https://github.com/romkatv/powerlevel10k/pull/786). **Do not use it.** https://github.com/romkatv/powerlevel10k/pull/786). **Do not use it.**
@ -661,6 +675,7 @@ If you are using a different terminal, proceed with manual font installation.
- **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click - **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click
either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set
*Font face* to `MesloLGS NF`. *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 → - **IntelliJ** (and other IDEs by Jet Brains): Open *IDE → Edit → Preferences → Editor →
Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font
name to `MesloLGS NF`. name to `MesloLGS NF`.
@ -668,7 +683,7 @@ If you are using a different terminal, proceed with manual font installation.
*Meslo Nerd Font*. *Meslo Nerd Font*.
- **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select - **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select
*MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font. *MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font.
- **Terminus**: Open *Settings → Appearance* and set *Font* to `MesloLGS NF`. - **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
- **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General* - **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General*
tab (should be selected already), uncheck *Use the system fixed width font* (if not already) tab (should be selected already), uncheck *Use the system fixed width font* (if not already)
and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*. and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.
@ -676,7 +691,9 @@ If you are using a different terminal, proceed with manual font installation.
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`. tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.
Exit the Preferences dialog by clicking *Close*. Exit the Preferences dialog by clicking *Close*.
- **MobaXterm**: Open *Settings**Configuration**Terminal* → (under *Terminal look and feel*) - **MobaXterm**: Open *Settings**Configuration**Terminal* → (under *Terminal look and feel*)
and change *Font* to `MesloLGS NF`. and change *Font* to `MesloLGS NF`. If you have *sessions*, you need to change the font in each
of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal
Settings* → *Font settings*.
- **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable - **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable
*Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`. *Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
To change the font for the remote host connections, go to *Preferences → Terminal Options → To change the font for the remote host connections, go to *Preferences → Terminal Options →
@ -686,12 +703,15 @@ If you are using a different terminal, proceed with manual font installation.
- **Yakuake**: Click *≡**Manage Profiles**New**Appearance*. Click *Choose* next to the - **Yakuake**: Click *≡**Manage Profiles**New**Appearance*. Click *Choose* next to the
*Font* dropdown, select `MesloLGS NF` and click *OK*. Click *OK* to save the profile. Select the *Font* dropdown, select `MesloLGS NF` and click *OK*. Click *OK* to save the profile. Select the
new profile and click *Set as Default*. new profile and click *Set as Default*.
- **Alacritty**: Create or open `~/.config/alacritty/alacritty.yml` and add the following section - **Alacritty**: Create or open `~/.config/alacritty/alacritty.toml` and add the following
to it: section to it:
```yaml ```toml
font: [font.normal]
normal: family = "MesloLGS NF"
family: "MesloLGS NF" ```
- **foot**: Create or open `~/.config/foot/foot.ini` and add the following section to it:
```ini
font=MesloLGS NF:size=12
``` ```
- **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it: - **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
```text ```text
@ -839,7 +859,7 @@ The command to update Powerlevel10k depends on how it was installed.
| [Zplugin](#zplugin) | `zplugin update` | | [Zplugin](#zplugin) | `zplugin update` |
| [Zinit](#zinit) | `zinit update` | | [Zinit](#zinit) | `zinit update` |
| [Zi](#zi) | `zi update` | | [Zi](#zi) | `zi update` |
| [Zap](#zap) | `zap --update` | | [Zap](#zap) | `zap update` |
| [Homebrew](#homebrew) | `brew update && brew upgrade` | | [Homebrew](#homebrew) | `brew update && brew upgrade` |
| [Arch Linux](#arch-linux) | `yay -S --noconfirm zsh-theme-powerlevel10k-git` | | [Arch Linux](#arch-linux) | `yay -S --noconfirm zsh-theme-powerlevel10k-git` |
| [Alpine Linux](#alpine-linux) | `apk update && apk upgrade` | | [Alpine Linux](#alpine-linux) | `apk update && apk upgrade` |
@ -893,8 +913,8 @@ The command to update Powerlevel10k depends on how it was installed.
| [Zplugin](#zplugin) | `zplugin delete romkatv/powerlevel10k` | | [Zplugin](#zplugin) | `zplugin delete romkatv/powerlevel10k` |
| [Zinit](#zinit) | `zinit delete romkatv/powerlevel10k` | | [Zinit](#zinit) | `zinit delete romkatv/powerlevel10k` |
| [Zi](#zi) | `zi delete romkatv/powerlevel10k` | | [Zi](#zi) | `zi delete romkatv/powerlevel10k` |
| [Zap](#zap) | `zsh -ic 'zap --clean'` | | [Zap](#zap) | `zsh -ic 'zap clean'` |
| [Homebrew](#homebrew) | `brew uninstall powerlevel10k; brew untap romkatv/powerlevel10k` | | [Homebrew](#homebrew) | `brew uninstall powerlevel10k` |
| [Arch Linux](#arch-linux) | `yay -R --noconfirm zsh-theme-powerlevel10k-git` | | [Arch Linux](#arch-linux) | `yay -R --noconfirm zsh-theme-powerlevel10k-git` |
| [Alpine Linux](#alpine-linux) | `apk del zsh-theme-powerlevel10k` | | [Alpine Linux](#alpine-linux) | `apk del zsh-theme-powerlevel10k` |
6. Restart Zsh. [Do not use `source ~/.zshrc`](#weird-things-happen-after-typing-source-zshrc). 6. Restart Zsh. [Do not use `source ~/.zshrc`](#weird-things-happen-after-typing-source-zshrc).
@ -967,6 +987,8 @@ Powerlevel10k does not affect:
- Prompt parameters other than `PS1` and `RPS1`. - Prompt parameters other than `PS1` and `RPS1`.
- Zsh options other than those [related to prompt]( - Zsh options other than those [related to prompt](
http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting). http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting).
- The set of available commands. Powerlevel10k does not install any new commands
with the only exception of `p10k`.
### I'm using Powerlevel9k with Oh My Zsh. How do I migrate? ### I'm using Powerlevel9k with Oh My Zsh. How do I migrate?
@ -1134,6 +1156,7 @@ feature:master wip ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42
| `feature` | current branch; replaced with `#tag` or `@commit` if not on a branch | `git status --ignore-submodules=dirty` | | `feature` | current branch; replaced with `#tag` or `@commit` if not on a branch | `git status --ignore-submodules=dirty` |
| `master` | remote tracking branch; only shown if different from local branch | `git rev-parse --abbrev-ref --symbolic-full-name @{upstream}` | | `master` | remote tracking branch; only shown if different from local branch | `git rev-parse --abbrev-ref --symbolic-full-name @{upstream}` |
| `wip` | the latest commit's summary contains "wip" or "WIP" | `git show --pretty=%s --no-patch HEAD` | | `wip` | the latest commit's summary contains "wip" or "WIP" | `git show --pretty=%s --no-patch HEAD` |
| `=` | up to date with the remote (neither ahead nor behind) | `git rev-list --count HEAD...@{upstream}` |
| `⇣42` | this many commits behind the remote | `git rev-list --right-only --count HEAD...@{upstream}` | | `⇣42` | this many commits behind the remote | `git rev-list --right-only --count HEAD...@{upstream}` |
| `⇡42` | this many commits ahead of the remote | `git rev-list --left-only --count HEAD...@{upstream}` | | `⇡42` | this many commits ahead of the remote | `git rev-list --left-only --count HEAD...@{upstream}` |
| `⇠42` | this many commits behind the push remote | `git rev-list --right-only --count HEAD...@{push}` | | `⇠42` | this many commits behind the push remote | `git rev-list --right-only --count HEAD...@{push}` |
@ -1185,7 +1208,7 @@ completes, Powerlevel10k refreshes prompt with new information, this time with c
When using *Rainbow* style, Git status is displayed as black on grey while it's still being When using *Rainbow* style, Git status is displayed as black on grey while it's still being
computed. Depending on the terminal color palette, this may be difficult to read. In this case you computed. Depending on the terminal color palette, this may be difficult to read. In this case you
might want to change the background color to something ligher for more contrast. To do that, open might want to change the background color to something lighter for more contrast. To do that, open
`~/.p10k.zsh`, search for `POWERLEVEL9K_VCS_LOADING_BACKGROUND`, uncomment it if it's commented out, `~/.p10k.zsh`, search for `POWERLEVEL9K_VCS_LOADING_BACKGROUND`, uncomment it if it's commented out,
and change the value. and change the value.
@ -1309,15 +1332,28 @@ terminals. Many terminals also support customization of these colors through col
Type `source ~/.p10k.zsh` to apply your changes to the current Zsh session. Type `source ~/.p10k.zsh` to apply your changes to the current Zsh session.
To see how different colors look in your terminal, run the following command: To see how different numbered colors look in your terminal, run the following command:
```zsh ```zsh
for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done
``` ```
If your terminal supports truecolor, you can use 24-bit colors in the `#RRGGBB` format in addition
to the numbered colors.
```zsh
typeset -g POWERLEVEL9K_TIME_FOREGROUND='#FF0000'
```
*Related:* *Related:*
- [Directory is difficult to see in prompt when using Rainbow style.]( - [Directory is difficult to see in prompt when using Rainbow style.](
#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style) #directory-is-difficult-to-see-in-prompt-when-using-rainbow-style)
- [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)
By default, VSCode Terminal may arbitrarily replace the foreground color of your choice with a
different color. This behavior can be
[turned off](https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio) in
VSCode settings.
### Why does Powerlevel10k spawn extra processes? ### Why does Powerlevel10k spawn extra processes?
@ -1489,6 +1525,7 @@ Powerlevel10k are released. This may change in the future but not soon.
## Troubleshooting ## Troubleshooting
- [`[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found`](#oh-my-zsh-theme-powerlevel10kpowerlevel10k-not-found)
- [Question mark in prompt](#question-mark-in-prompt) - [Question mark in prompt](#question-mark-in-prompt)
- [Icons, glyphs or powerline symbols don't render](#icons-glyphs-or-powerline-symbols-dont-render) - [Icons, glyphs or powerline symbols don't render](#icons-glyphs-or-powerline-symbols-dont-render)
- [Sub-pixel imperfections around powerline symbols](#sub-pixel-imperfections-around-powerline-symbols) - [Sub-pixel imperfections around powerline symbols](#sub-pixel-imperfections-around-powerline-symbols)
@ -1506,9 +1543,32 @@ Powerlevel10k are released. This may change in the future but not soon.
- [Transient prompt stops working after some time](#transient-prompt-stops-working-after-some-time) - [Transient prompt stops working after some time](#transient-prompt-stops-working-after-some-time)
- [Cannot make Powerlevel10k work with my plugin manager](#cannot-make-powerlevel10k-work-with-my-plugin-manager) - [Cannot make Powerlevel10k work with my plugin manager](#cannot-make-powerlevel10k-work-with-my-plugin-manager)
- [Directory is difficult to see in prompt when using Rainbow style](#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style) - [Directory is difficult to see in prompt when using Rainbow style](#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style)
- [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)
- [Horrific mess when resizing terminal window](#horrific-mess-when-resizing-terminal-window) - [Horrific mess when resizing terminal window](#horrific-mess-when-resizing-terminal-window)
- [Icons cut off in Konsole](#icons-cut-off-in-konsole) - [Icons cut off in Konsole](#icons-cut-off-in-konsole)
- [Arch Linux logo has a dot in the bottom right corner](#arch-linux-logo-has-a-dot-in-the-bottom-right-corner) - [Arch Linux logo has a dot in the bottom right corner](#arch-linux-logo-has-a-dot-in-the-bottom-right-corner)
- [Incorrect git status in prompt](#incorrect-git-status-in-prompt)
### `[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found`
When opening a terminal, or starting zsh manually, you may encounter this error message:
```text
[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found
```
1. First, run `typeset -p P9K_VERSION` to check whether Powerlevel10k has been loaded.
- If `typeset -p P9K_VERSION` succeeds and prints something like `typeset P9K_VERSION=1.19.14`
(the version could be different), remove the following line from `~/.zshrc`:
```zsh
ZSH_THEME="powerlevel10k/powerlevel10k"
```
- If `typeset -p P9K_VERSION` fails with the error `typeset: no such variable: P9K_VERSION`, run
the following command:
```zsh
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
```
2. Restart Zsh with `exec zsh`.
### Question mark in prompt ### Question mark in prompt
@ -1693,10 +1753,15 @@ and make sure that `TERM` environment variable is set correctly. Verify with
If there is no UTF-8 locale on the system, configuration wizard won't offer prompt styles that use If there is no UTF-8 locale on the system, configuration wizard won't offer prompt styles that use
Unicode characters. *Fix*: Install a UTF-8 locale. Verify with `locale -a`. Unicode characters. *Fix*: Install a UTF-8 locale. Verify with `locale -a`.
When a UTF-8 locale is available, the first few questions asked by the configuration wizard assess Another case in which configuration wizard may not offer Unicode prompt styles is when the
capabilities of the terminal font. If your answers indicate that some glyphs don't render correctly, `MULTIBYTE` shell option is disabled. *Fix*: Enable the `MULTIBYTE` option, or rather don't disable
configuration wizard won't offer prompt styles that use them. *Fix*: Restart your terminal and it (this option is enabled in Zsh by default). Verify with `print -r -- ${options[MULTIBYTE]}`.
install [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). Verify by running
When `MULTIBYTE` is enabled and a UTF-8 locale is available, the first few questions asked by the
configuration wizard assess capabilities of the terminal font. If your answers indicate that some
glyphs don't render correctly, configuration wizard won't offer prompt styles that use them. *Fix*:
Restart your terminal and install
[the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). Verify by running
`p10k configure` and checking that all glyphs render correctly. `p10k configure` and checking that all glyphs render correctly.
### Cannot install the recommended font ### Cannot install the recommended font
@ -1822,6 +1887,15 @@ There are several ways to fix this.
`POWERLEVEL9K_DIR_ANCHOR_FOREGROUND` and `POWERLEVEL9K_DIR_ANCHOR_BOLD`. You can find them in `POWERLEVEL9K_DIR_ANCHOR_FOREGROUND` and `POWERLEVEL9K_DIR_ANCHOR_BOLD`. You can find them in
`~/.p10k.zsh`. `~/.p10k.zsh`.
*Related*: [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)
### Incorrect foreground color in VSCode Terminal
By default, VSCode Terminal may arbitrarily replace the foreground color of your choice with a
different color. This behavior can be
[turned off](https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio) in
VSCode settings.
### Horrific mess when resizing terminal window ### Horrific mess when resizing terminal window
When you resize a terminal window horizontally back and forth a few times, you might see this ugly When you resize a terminal window horizontally back and forth a few times, you might see this ugly
@ -2018,3 +2092,16 @@ Some fonts have this incorrect dotted icon in bold typeface. There are two ways
```zsh ```zsh
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' # not bold typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' # not bold
``` ```
### Incorrect git status in prompt
Powerlevel10k uses [gitstatusd](https://github.com/romkatv/gitstatus) to inspect the state of git
repositories. The project relies on the [libgit2](https://github.com/libgit2/libgit2) library, which
has some gaps in its implementation. Under some conditions, this may result in discrepancies between
the real state of a git repository (reflected by `git status`) and what gets shown in the
Powerlevel10k prompt.
Most notably, [libgit2 does not support `skipHash`](https://github.com/libgit2/libgit2/issues/6531).
If you see incorrect git status in prompt, run `git config -l` and check whether `skipHash` is
enabled. If it is, consider disabling it. Keep in mind that `skipHash` may be implicitly enabled
when activating certain git features, such as `manyFiles`.

@ -81,12 +81,14 @@
context # user@hostname context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger) ranger # ranger shell (https://github.com/ranger/ranger)
yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn) nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf) lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr) xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh) vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/) midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 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) # vi_mode # vi mode (you don't need this if you've enabled prompt_char)
# vpn_ip # virtual private network indicator # vpn_ip # virtual private network indicator
# load # CPU load # load # CPU load
@ -96,6 +98,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli) todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture # cpu_arch # CPU architecture
# time # current time # time # current time
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
@ -168,6 +171,9 @@
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
# Separator between different-color segments on the right. # Separator between different-color segments on the right.
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' 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. # The right end of left prompt.
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
# The left end of right prompt. # The left end of right prompt.
@ -237,7 +243,7 @@
.java-version .java-version
.perl-version .perl-version
.php-version .php-version
.tool-version .tool-versions
.shorten_folder_marker .shorten_folder_marker
.svn .svn
.terraform .terraform
@ -423,11 +429,17 @@
res+=" ${modified}wip" res+=" ${modified}wip"
fi fi
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
# ⇣42 if behind the remote. # ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}" (( 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. # ⇡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 && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}" (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
# Tip: Uncomment the next line to display '=' if up to date with the remote.
# res+=" ${clean}="
fi
# ⇠42 if behind the push remote. # ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}" (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@ -718,6 +730,12 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color. # Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
@ -752,12 +770,21 @@
# Nix shell color. # Nix shell color.
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 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. # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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 ]################################## ##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage. # Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
@ -784,9 +811,8 @@
# Text and color for insert vi mode. # Text and color for insert vi mode.
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66 typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################################[ ram: free RAM ]####################################### ######################################[ ram: free RAM ]#######################################
# RAM color. # RAM color.
@ -868,6 +894,19 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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_arch: CPU architecture ]################################
# CPU architecture color. # CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172 typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
@ -1004,6 +1043,11 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color. # Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 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. # Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1245,7 +1289,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools. # Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext. # Tip: Remove the next line to always show kubecontext.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor' typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with # Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts. # different contexts.
@ -1332,7 +1376,7 @@
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# #[ 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. # Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws. # Tip: Remove the next line to always show aws.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # 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. # in each pair defines a pattern against which the current AWS profile gets matched.
@ -1380,10 +1424,39 @@
# Show azure only when the command you are typing invokes one of these tools. # Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure. # Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 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. # Azure account name color.
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the command you are typing invokes one of these tools. # Show gcloud only when the command you are typing invokes one of these tools.
@ -1604,7 +1677,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # 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 # is to generate the prompt segment for display in instant prompt. See
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# #
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # 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 # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@ -1640,7 +1713,7 @@
# it incompatible with your zsh configuration files. # it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output # - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood # during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during # - 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 # 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. # seen the warning, or if you are unsure what this all means.

@ -81,12 +81,14 @@
context # user@hostname context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger) ranger # ranger shell (https://github.com/ranger/ranger)
yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn) nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf) lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr) xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh) vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/) midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 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 # vpn_ip # virtual private network indicator
# load # CPU load # load # CPU load
# disk_usage # disk usage # disk_usage # disk usage
@ -95,6 +97,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli) todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture # cpu_arch # CPU architecture
# time # current time # time # current time
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
@ -231,7 +234,7 @@
.java-version .java-version
.perl-version .perl-version
.php-version .php-version
.tool-version .tool-versions
.shorten_folder_marker .shorten_folder_marker
.svn .svn
.terraform .terraform
@ -274,10 +277,6 @@
# the full directory that was used in previous commands. # the full directory that was used in previous commands.
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false 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 # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
# and POWERLEVEL9K_DIR_CLASSES below. # and POWERLEVEL9K_DIR_CLASSES below.
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
@ -421,11 +420,17 @@
res+=" ${modified}wip" res+=" ${modified}wip"
fi fi
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
# ⇣42 if behind the remote. # ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}" (( 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. # ⇡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 && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}" (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
# Tip: Uncomment the next line to display '=' if up to date with the remote.
# res+=" ${clean}="
fi
# ⇠42 if behind the push remote. # ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}" (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@ -716,6 +721,12 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color. # Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=3 typeset -g POWERLEVEL9K_NNN_FOREGROUND=3
@ -750,12 +761,21 @@
# Nix shell color. # Nix shell color.
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=4 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. # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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 ]################################## ##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage. # Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=2 typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=2
@ -849,6 +869,19 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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_arch: CPU architecture ]################################
# CPU architecture color. # CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=3 typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=3
@ -985,6 +1018,11 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color. # Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=2 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. # Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1187,7 +1225,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools. # Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext. # Tip: Remove the next line to always show kubecontext.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor' typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with # Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts. # different contexts.
@ -1313,7 +1351,7 @@
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# #[ 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. # Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws. # Tip: Remove the next line to always show aws.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # 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. # in each pair defines a pattern against which the current AWS profile gets matched.
@ -1361,10 +1399,39 @@
# Show azure only when the command you are typing invokes one of these tools. # Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure. # Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 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. # Azure account name color.
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=4 typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=4
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the command you are typing invokes one of these tools. # Show gcloud only when the command you are typing invokes one of these tools.
@ -1585,7 +1652,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # 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 # is to generate the prompt segment for display in instant prompt. See
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# #
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # 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 # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@ -1621,7 +1688,7 @@
# it incompatible with your zsh configuration files. # it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output # - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood # during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during # - 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 # 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. # seen the warning, or if you are unsure what this all means.

@ -81,12 +81,14 @@
context # user@hostname context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger) ranger # ranger shell (https://github.com/ranger/ranger)
yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn) nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf) lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr) xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh) vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/) midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 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 # vpn_ip # virtual private network indicator
# load # CPU load # load # CPU load
# disk_usage # disk usage # disk_usage # disk usage
@ -95,6 +97,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli) todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture # cpu_arch # CPU architecture
# time # current time # time # current time
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
@ -231,7 +234,7 @@
.java-version .java-version
.perl-version .perl-version
.php-version .php-version
.tool-version .tool-versions
.shorten_folder_marker .shorten_folder_marker
.svn .svn
.terraform .terraform
@ -417,11 +420,17 @@
res+=" ${modified}wip" res+=" ${modified}wip"
fi fi
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
# ⇣42 if behind the remote. # ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}" (( 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. # ⇡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 && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}" (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
# Tip: Uncomment the next line to display '=' if up to date with the remote.
# res+=" ${clean}="
fi
# ⇠42 if behind the push remote. # ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}" (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@ -712,6 +721,12 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color. # Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
@ -746,12 +761,21 @@
# Nix shell color. # Nix shell color.
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 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. # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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 ]################################## ##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage. # Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
@ -845,6 +869,19 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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_arch: CPU architecture ]################################
# CPU architecture color. # CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172 typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
@ -981,6 +1018,11 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color. # Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 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. # Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1183,7 +1225,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools. # Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext. # Tip: Remove the next line to always show kubecontext.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor' typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with # Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts. # different contexts.
@ -1309,7 +1351,7 @@
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# #[ 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. # Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws. # Tip: Remove the next line to always show aws.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # 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. # in each pair defines a pattern against which the current AWS profile gets matched.
@ -1357,10 +1399,39 @@
# Show azure only when the command you are typing invokes one of these tools. # Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure. # Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 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. # Azure account name color.
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the command you are typing invokes one of these tools. # Show gcloud only when the command you are typing invokes one of these tools.
@ -1581,7 +1652,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # 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 # is to generate the prompt segment for display in instant prompt. See
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# #
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # 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 # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@ -1617,7 +1688,7 @@
# it incompatible with your zsh configuration files. # it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output # - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood # during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during # - 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 # 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. # seen the warning, or if you are unsure what this all means.

@ -169,7 +169,7 @@
# it incompatible with your zsh configuration files. # it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output # - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood # during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during # - 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 # 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. # seen the warning, or if you are unsure what this all means.

@ -81,12 +81,14 @@
context # user@hostname context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger) ranger # ranger shell (https://github.com/ranger/ranger)
yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn) nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf) lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr) xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh) vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/) midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 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) # vi_mode # vi mode (you don't need this if you've enabled prompt_char)
# vpn_ip # virtual private network indicator # vpn_ip # virtual private network indicator
# load # CPU load # load # CPU load
@ -96,6 +98,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli) todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture # cpu_arch # CPU architecture
# time # current time # time # current time
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
@ -165,6 +168,9 @@
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
# Separator between different-color segments on the right. # Separator between different-color segments on the right.
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' 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. # The right end of left prompt.
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
# The left end of right prompt. # The left end of right prompt.
@ -237,7 +243,7 @@
.java-version .java-version
.perl-version .perl-version
.php-version .php-version
.tool-version .tool-versions
.shorten_folder_marker .shorten_folder_marker
.svn .svn
.terraform .terraform
@ -424,11 +430,17 @@
res+=" ${modified}wip" res+=" ${modified}wip"
fi fi
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
# ⇣42 if behind the remote. # ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}" (( 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. # ⇡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 && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}" (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
# Tip: Uncomment the next line to display '=' if up to date with the remote.
# res+=" ${clean}="
fi
# ⇠42 if behind the push remote. # ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}" (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@ -737,6 +749,13 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color. # Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 typeset -g POWERLEVEL9K_NNN_FOREGROUND=0
@ -777,12 +796,22 @@
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0
typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 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. # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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 ]################################## ##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage. # Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3 typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3
@ -814,6 +843,8 @@
# Text and color for insert vi mode. # Text and color for insert vi mode.
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8
# Custom icon.
# typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################################[ ram: free RAM ]####################################### ######################################[ ram: free RAM ]#######################################
# RAM color. # RAM color.
@ -904,6 +935,21 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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_arch: CPU architecture ]################################
# CPU architecture color. # CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=0 typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=0
@ -1050,6 +1096,11 @@
# Nvm color. # Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 typeset -g POWERLEVEL9K_NVM_FOREGROUND=0
typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 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. # Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1318,7 +1369,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools. # Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext. # Tip: Remove the next line to always show kubecontext.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor' typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with # Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts. # different contexts.
@ -1407,7 +1458,7 @@
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# #[ 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. # Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws. # Tip: Remove the next line to always show aws.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # 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. # in each pair defines a pattern against which the current AWS profile gets matched.
@ -1457,11 +1508,41 @@
# Show azure only when the command you are typing invokes one of these tools. # Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure. # Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 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. # Azure account name color.
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7 typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=7
typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4 typeset -g POWERLEVEL9K_AZURE_OTHER_BACKGROUND=4
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the command you are typing invokes one of these tools. # Show gcloud only when the command you are typing invokes one of these tools.
@ -1693,7 +1774,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # 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 # is to generate the prompt segment for display in instant prompt. See
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# #
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # 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 # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@ -1730,7 +1811,7 @@
# it incompatible with your zsh configuration files. # it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output # - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood # during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during # - 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 # 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. # seen the warning, or if you are unsure what this all means.

@ -87,7 +87,7 @@
# it incompatible with your zsh configuration files. # it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output # - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood # during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during # - 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 # 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. # seen the warning, or if you are unsure what this all means.

@ -55,6 +55,7 @@ If you are using a different terminal, proceed with manual font installation.
- **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click - **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click
either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set
*Font face* to `MesloLGS NF`. *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 → - **IntelliJ** (and other IDEs by Jet Brains): Open *IDE → Edit → Preferences → Editor →
Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font
name to `MesloLGS NF`. name to `MesloLGS NF`.
@ -62,7 +63,7 @@ If you are using a different terminal, proceed with manual font installation.
*Meslo Nerd Font*. *Meslo Nerd Font*.
- **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select - **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select
*MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font. *MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font.
- **Terminus**: Open *Settings → Appearance* and set *Font* to `MesloLGS NF`. - **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
- **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General* - **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General*
tab (should be selected already), uncheck *Use the system fixed width font* (if not already) tab (should be selected already), uncheck *Use the system fixed width font* (if not already)
and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*. and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.
@ -70,7 +71,9 @@ If you are using a different terminal, proceed with manual font installation.
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`. tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.
Exit the Preferences dialog by clicking *Close*. Exit the Preferences dialog by clicking *Close*.
- **MobaXterm**: Open *Settings**Configuration**Terminal* → (under *Terminal look and feel*) - **MobaXterm**: Open *Settings**Configuration**Terminal* → (under *Terminal look and feel*)
and change *Font* to `MesloLGS NF`. and change *Font* to `MesloLGS NF`. If you have *sessions*, you need to change the font in each
of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal
Settings* → *Font settings*.
- **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable - **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable
*Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`. *Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
To change the font for the remote host connections, go to *Preferences → Terminal Options → To change the font for the remote host connections, go to *Preferences → Terminal Options →
@ -80,12 +83,15 @@ If you are using a different terminal, proceed with manual font installation.
- **Yakuake**: Click *≡**Manage Profiles**New**Appearance*. Click *Choose* next to the - **Yakuake**: Click *≡**Manage Profiles**New**Appearance*. Click *Choose* next to the
*Font* dropdown, select `MesloLGS NF` and click *OK*. Click *OK* to save the profile. Select the *Font* dropdown, select `MesloLGS NF` and click *OK*. Click *OK* to save the profile. Select the
new profile and click *Set as Default*. new profile and click *Set as Default*.
- **Alacritty**: Create or open `~/.config/alacritty/alacritty.yml` and add the following section - **Alacritty**: Create or open `~/.config/alacritty/alacritty.toml` and add the following
to it: section to it:
```yaml ```toml
font: [font.normal]
normal: family = "MesloLGS NF"
family: "MesloLGS NF" ```
- **foot**: Create or open `~/.config/foot/foot.ini` and add the following section to it:
```ini
font=MesloLGS NF:size=12
``` ```
- **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it: - **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
```text ```text

@ -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 # Sized delete is implemented as __ZdlPvm in /usr/lib/libc++.1.dylib but this symbol is
# missing in macOS prior to 10.13. # missing in macOS prior to 10.13.
CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) -Wall -Werror # -g -fsanitize=thread CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) -Wall # -g -fsanitize=thread
LDFLAGS += -pthread # -fsanitize=thread LDFLAGS += -pthread # -fsanitize=thread
LDLIBS += -lgit2 # -lprofiler -lunwind LDLIBS += -lgit2 # -lprofiler -lunwind
@ -44,3 +44,14 @@ pkg: zwc
GITSTATUS_DAEMON= GITSTATUS_CACHE_DIR=$(shell pwd)/usrbin ./install -f GITSTATUS_DAEMON= GITSTATUS_CACHE_DIR=$(shell pwd)/usrbin ./install -f
-include $(OBJS:.o=.dep) -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"

@ -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: Three functionally equivalent tools for computing git status were benchmarked:
* `gitstatusd` * `gitstatusd`
* `git` with untracked cache enabled * `git` with `core.untrackedcache` enabled and `core.fsmonitor` disabled
* `lg2` -- a demo/example executable from [libgit2](https://github.com/romkatv/libgit2) that * `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 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 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 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 see that gitstatusd took 62 seconds in total compared to libgit2's 232 seconds. System calls at the
core of the algorithm are cleary visible. `__GI___fxstatat` is a flavor of `stat()`, and the other core of the algorithm are clearly visible. `__GI___fxstatat` is a flavor of `stat()`, and the other
three calls -- `__libc_openat64`, `__libc_close` and `__GI___fxstat` are responsible for opening 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 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 apart from these calls. The rest of the code accounts for 3.77 seconds of CPU time -- 32 times less

@ -18,5 +18,5 @@ gitstatus_version="v1.5.4"
# #
# If sha256 of ./deps/libgit2-${libgit2_version}.tar.gz doesn't match, # If sha256 of ./deps/libgit2-${libgit2_version}.tar.gz doesn't match,
# build gets aborted. # build gets aborted.
libgit2_version="tag-0ad3d776aa86dd607dc86dcd7f77ad3ed7ebec61" libgit2_version="tag-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6"
libgit2_sha256="c5d0117ae74d3ef244c26f10cce022019077dbc4563e6251fa9f56d36868ce74" libgit2_sha256="4ce11d71ee576dbbc410b9fa33a9642809cc1fa687b315f7c23eeb825b251e93"

@ -290,7 +290,7 @@ function gitstatus_stop() {
unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE _GITSTATUS_CLIENT_PID unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE _GITSTATUS_CLIENT_PID
} }
# Retrives status of a git repository from a directory under its working tree. # Retrieves status of a git repository from a directory under its working tree.
# #
# Usage: gitstatus_query [OPTION]... # Usage: gitstatus_query [OPTION]...
# #

@ -59,7 +59,7 @@ zmodload -F zsh/files b:zf_rm || return
typeset -g _gitstatus_plugin_dir"${1:-}"="${${(%):-%x}:A:h}" typeset -g _gitstatus_plugin_dir"${1:-}"="${${(%):-%x}:A:h}"
# Retrives status of a git repo from a directory under its working tree. # Retrieves status of a git repo from a directory under its working tree.
# #
## Usage: gitstatus_query [OPTION]... NAME ## Usage: gitstatus_query [OPTION]... NAME
# #

@ -2,7 +2,7 @@
# Source gitstatus.plugin.sh from $GITSTATUS_DIR or from the same directory # Source gitstatus.plugin.sh from $GITSTATUS_DIR or from the same directory
# in which the current script resides if the variable isn't set. # 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 source "$GITSTATUS_DIR" || return
elif [[ "${BASH_SOURCE[0]}" == */* ]]; then elif [[ "${BASH_SOURCE[0]}" == */* ]]; then
source "${BASH_SOURCE[0]%/*}/gitstatus.plugin.sh" || return source "${BASH_SOURCE[0]%/*}/gitstatus.plugin.sh" || return
@ -85,7 +85,14 @@ function gitstatus_prompt_update() {
gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1 gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1
# On every prompt, fetch git status and set GITSTATUS_PROMPT. # On every prompt, fetch git status and set GITSTATUS_PROMPT.
if [[ -z "${PROMPT_COMMAND[*]}" ]]; then
PROMPT_COMMAND=gitstatus_prompt_update PROMPT_COMMAND=gitstatus_prompt_update
elif [[ ! "${PROMPT_COMMAND[*]}" =~ [[:space:]\;]?gitstatus_prompt_update[[:space:]\;]? ]]; then
# Note: If PROMPT_COMMAND is an array, this will modify its first element.
PROMPT_COMMAND=$'gitstatus_prompt_update\n'"$PROMPT_COMMAND"
fi
# Retain 3 trailing components of the current directory.
PROMPT_DIRTRIM=3 PROMPT_DIRTRIM=3
# Enable promptvars so that ${GITSTATUS_PROMPT} in PS1 is expanded. # Enable promptvars so that ${GITSTATUS_PROMPT} in PS1 is expanded.

@ -23,7 +23,7 @@
#include <stdexcept> #include <stdexcept>
// The argument must be an expression convertible to bool. // The argument must be an expression convertible to bool.
// Does nothing if the expression evalutes to true. Otherwise // Does nothing if the expression evaluates to true. Otherwise
// it's equivalent to LOG(FATAL). // it's equivalent to LOG(FATAL).
#define CHECK(cond...) \ #define CHECK(cond...) \
static_cast<void>(0), (!!(cond)) ? static_cast<void>(0) : LOG(FATAL) << #cond << ": " static_cast<void>(0), (!!(cond)) ? static_cast<void>(0) : LOG(FATAL) << #cond << ": "

@ -25,7 +25,7 @@
namespace gitstatus { namespace gitstatus {
// On error, leaves entries unchaged and returns false. Does not throw. // On error, leaves entries unchanged and returns false. Does not throw.
// //
// On success, appends names of files from the specified directory to entries and returns true. // 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 // Every appended entry is a null-terminated string. At -1 offset is its d_type. All elements

@ -61,7 +61,7 @@ size_t ParseSizeT(const char* s) {
void PrintUsage() { void PrintUsage() {
std::cout << "Usage: gitstatusd [OPTION]...\n" std::cout << "Usage: gitstatusd [OPTION]...\n"
<< "Print machine-readable status of the git repos for directores in stdin.\n" << "Print machine-readable status of the git repos for directories in stdin.\n"
<< "\n" << "\n"
<< "OPTIONS\n" << "OPTIONS\n"
<< " -l, --lock-fd=NUM [default=-1]\n" << " -l, --lock-fd=NUM [default=-1]\n"
@ -78,7 +78,7 @@ void PrintUsage() {
<< " maximum performance.\n" << " maximum performance.\n"
<< "\n" << "\n"
<< " -v, --log-level=STR [default=INFO]\n" << " -v, --log-level=STR [default=INFO]\n"
<< " Don't write entires to log whose log level is below this. Log levels in\n" << " Don't write entries to log whose log level is below this. Log levels in\n"
<< " increasing order: DEBUG, INFO, WARN, ERROR, FATAL.\n" << " increasing order: DEBUG, INFO, WARN, ERROR, FATAL.\n"
<< "\n" << "\n"
<< " -r, --repo-ttl-seconds=NUM [default=3600]\n" << " -r, --repo-ttl-seconds=NUM [default=3600]\n"
@ -141,7 +141,7 @@ void PrintUsage() {
<< "\n" << "\n"
<< " 1. Request ID. Any string. Can be empty.\n" << " 1. Request ID. Any string. Can be empty.\n"
<< " 2. Path to the directory for which git stats are being requested.\n" << " 2. Path to the directory for which git stats are being requested.\n"
<< " If the first character is ':', it is removed and the remaning path\n" << " If the first character is ':', it is removed and the remaining path\n"
<< " is treated as GIT_DIR.\n" << " is treated as GIT_DIR.\n"
<< " 3. (Optional) '1' to disable computation of anything that requires reading\n" << " 3. (Optional) '1' to disable computation of anything that requires reading\n"
<< " git index; '0' for the default behavior of computing everything.\n" << " git index; '0' for the default behavior of computing everything.\n"

@ -62,7 +62,7 @@ struct Options : Limits {
// If non-negative, send signal 0 to the specified PID when not receiving any requests for one // If non-negative, send signal 0 to the specified PID when not receiving any requests for one
// second; exit if signal sending fails. // second; exit if signal sending fails.
int parent_pid = -1; int parent_pid = -1;
// Don't write entires to log whose log level is below this. Log levels in increasing order: // Don't write entries to log whose log level is below this. Log levels in increasing order:
// DEBUG, INFO, WARN, ERROR, FATAL. // DEBUG, INFO, WARN, ERROR, FATAL.
LogLevel log_level = INFO; LogLevel log_level = INFO;
// Close git repositories that haven't been used for this long. This is meant to release resources // Close git repositories that haven't been used for this long. This is meant to release resources

@ -155,7 +155,7 @@ IndexStats Repo::GetIndexStats(const git_oid* head, git_config* cfg) {
VERIFY(!git_repository_index(&git_index_, repo_)) << GitError(); VERIFY(!git_repository_index(&git_index_, repo_)) << GitError();
// Query an attribute (doesn't matter which) to initialize repo's attribute // Query an attribute (doesn't matter which) to initialize repo's attribute
// cache. It's a workaround for synchronization bugs (data races) in libgit2 // cache. It's a workaround for synchronization bugs (data races) in libgit2
// that result from lazy cache initialization without synchrnonization. // that result from lazy cache initialization without synchronization.
// Thankfully, subsequent cache reads and writes are properly synchronized. // Thankfully, subsequent cache reads and writes are properly synchronized.
const char* attr; const char* attr;
VERIFY(!git_attr_get(&attr, repo_, 0, "x", "x")) << GitError(); VERIFY(!git_attr_get(&attr, repo_, 0, "x", "x")) << GitError();

@ -268,7 +268,7 @@ void TagDb::ParsePack() {
} }
if (!std::is_sorted(name2id_.begin(), name2id_.end(), ByName)) { if (!std::is_sorted(name2id_.begin(), name2id_.end(), ByName)) {
// "sorted" in the header of packed-refs promisses that this won't trigger. // "sorted" in the header of packed-refs promises that this won't trigger.
std::sort(name2id_.begin(), name2id_.end(), ByName); std::sort(name2id_.begin(), name2id_.end(), ByName);
} }

@ -18,7 +18,6 @@ function _p9k_can_configure() {
typeset -g __p9k_cfg_path=${__p9k_cfg_path_o:A} 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]}//\%/%%} 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 } [[ -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_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 } [[ ! -d $__p9k_cfg_path ]] || { $0_error "$__p9k_cfg_path_u is a directory"; return 1 }

@ -52,6 +52,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON '\uE271'$s #  LINUX_DEBIAN_ICON '\uE271'$s # 
LINUX_RASPBIAN_ICON '\uE271'$s #  LINUX_RASPBIAN_ICON '\uE271'$s # 
LINUX_UBUNTU_ICON '\uE271'$s #  LINUX_UBUNTU_ICON '\uE271'$s # 
LINUX_KALI_ICON '\uE271'$s # 
LINUX_CENTOS_ICON '\uE271'$s #  LINUX_CENTOS_ICON '\uE271'$s # 
LINUX_COREOS_ICON '\uE271'$s #  LINUX_COREOS_ICON '\uE271'$s # 
LINUX_ELEMENTARY_ICON '\uE271'$s #  LINUX_ELEMENTARY_ICON '\uE271'$s # 
@ -72,6 +73,9 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON '\uE271'$s #  LINUX_RHEL_ICON '\uE271'$s # 
LINUX_AMZN_ICON '\uE271'$s #  LINUX_AMZN_ICON '\uE271'$s # 
LINUX_ENDEAVOUROS_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 # 🌞 SUNOS_ICON '\U1F31E'$q # 🌞
HOME_ICON '\uE12C'$s #  HOME_ICON '\uE12C'$s # 
HOME_SUB_ICON '\uE18D'$s #  HOME_SUB_ICON '\uE18D'$s # 
@ -102,10 +106,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uE20E ' # VCS_GIT_GITHUB_ICON '\uE20E ' #
VCS_GIT_BITBUCKET_ICON '\uE20E ' # VCS_GIT_BITBUCKET_ICON '\uE20E ' #
VCS_GIT_GITLAB_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_HG_ICON '\uE1C3 ' # 
VCS_SVN_ICON 'svn'$q VCS_SVN_ICON 'svn'$q
RUST_ICON 'R' RUST_ICON 'R'
PYTHON_ICON '\uE63C'$s #  (doesn't always work) PYTHON_ICON '\uE63C'$s #  (doesn't always work)
CHEZMOI_ICON '\uE12C'$s # 
SWIFT_ICON 'Swift' SWIFT_ICON 'Swift'
GO_ICON 'Go' GO_ICON 'Go'
GOLANG_ICON 'Go' GOLANG_ICON 'Go'
@ -122,6 +139,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎ JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐ RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'
@ -151,6 +169,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala' SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢ TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch' ARCH_ICON 'arch'
HISTORY_ICON 'hist'
) )
;; ;;
'awesome-fontconfig') 'awesome-fontconfig')
@ -191,6 +210,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON '\uF17C'$s #  LINUX_DEBIAN_ICON '\uF17C'$s # 
LINUX_RASPBIAN_ICON '\uF17C'$s #  LINUX_RASPBIAN_ICON '\uF17C'$s # 
LINUX_UBUNTU_ICON '\uF17C'$s #  LINUX_UBUNTU_ICON '\uF17C'$s # 
LINUX_KALI_ICON '\uF17C'$s # 
LINUX_CENTOS_ICON '\uF17C'$s #  LINUX_CENTOS_ICON '\uF17C'$s # 
LINUX_COREOS_ICON '\uF17C'$s #  LINUX_COREOS_ICON '\uF17C'$s # 
LINUX_ELEMENTARY_ICON '\uF17C'$s #  LINUX_ELEMENTARY_ICON '\uF17C'$s # 
@ -211,6 +231,9 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON '\uF17C'$s #  LINUX_RHEL_ICON '\uF17C'$s # 
LINUX_AMZN_ICON '\uF17C'$s #  LINUX_AMZN_ICON '\uF17C'$s # 
LINUX_ENDEAVOUROS_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 ' #  SUNOS_ICON '\uF185 ' # 
HOME_ICON '\uF015'$s #  HOME_ICON '\uF015'$s # 
HOME_SUB_ICON '\uF07C'$s #  HOME_SUB_ICON '\uF07C'$s # 
@ -237,10 +260,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uF113 ' #  VCS_GIT_GITHUB_ICON '\uF113 ' # 
VCS_GIT_BITBUCKET_ICON '\uF171 ' #  VCS_GIT_BITBUCKET_ICON '\uF171 ' # 
VCS_GIT_GITLAB_ICON '\uF296 ' #  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_HG_ICON '\uF0C3 ' # 
VCS_SVN_ICON 'svn'$q VCS_SVN_ICON 'svn'$q
RUST_ICON '\uE6A8' #  RUST_ICON '\uE6A8' # 
PYTHON_ICON '\uE63C'$s #  PYTHON_ICON '\uE63C'$s # 
CHEZMOI_ICON '\uF015'$s # 
SWIFT_ICON 'Swift' SWIFT_ICON 'Swift'
GO_ICON 'Go' GO_ICON 'Go'
GOLANG_ICON 'Go' GOLANG_ICON 'Go'
@ -257,6 +293,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎ JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐ RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'
@ -286,6 +323,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala' SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢ TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch' ARCH_ICON 'arch'
HISTORY_ICON 'hist'
) )
;; ;;
'awesome-mapped-fontconfig') 'awesome-mapped-fontconfig')
@ -331,6 +369,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" 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_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_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_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_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}" LINUX_ELEMENTARY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
@ -351,6 +390,9 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" 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_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_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 }" 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_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}" HOME_SUB_ICON "${CODEPOINT_OF_AWESOME_FOLDER_OPEN:+\\u$CODEPOINT_OF_AWESOME_FOLDER_OPEN$s}"
@ -377,10 +419,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON "${CODEPOINT_OF_AWESOME_GITHUB_ALT:+\\u$CODEPOINT_OF_AWESOME_GITHUB_ALT }" 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_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_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_HG_ICON "${CODEPOINT_OF_AWESOME_FLASK:+\\u$CODEPOINT_OF_AWESOME_FLASK }"
VCS_SVN_ICON 'svn'$q VCS_SVN_ICON 'svn'$q
RUST_ICON '\uE6A8' #  RUST_ICON '\uE6A8' # 
PYTHON_ICON '\U1F40D' # 🐍 PYTHON_ICON '\U1F40D' # 🐍
CHEZMOI_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME$s}"
SWIFT_ICON '\uE655'$s #  SWIFT_ICON '\uE655'$s # 
PUBLIC_IP_ICON "${CODEPOINT_OF_AWESOME_GLOBE:+\\u$CODEPOINT_OF_AWESOME_GLOBE$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}" LOCK_ICON "${CODEPOINT_OF_AWESOME_LOCK:+\\u$CODEPOINT_OF_AWESOME_LOCK}"
@ -395,6 +450,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎ JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐ RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'
@ -424,6 +480,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala' SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢ TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch' ARCH_ICON 'arch'
HISTORY_ICON 'hist'
) )
;; ;;
'nerdfont-v3') 'nerdfont-v3')
@ -481,9 +538,13 @@ function _p9k_init_icons() {
LINUX_VOID_ICON '\UF32E'$s #  LINUX_VOID_ICON '\UF32E'$s # 
LINUX_ARTIX_ICON '\UF31F'$s #  LINUX_ARTIX_ICON '\UF31F'$s # 
LINUX_UBUNTU_ICON '\uF31b'$s #  LINUX_UBUNTU_ICON '\uF31b'$s # 
LINUX_RHEL_ICON '\uF316'$s #  LINUX_KALI_ICON '\uF327'$s # 
LINUX_RHEL_ICON '\UF111B'$s # 󱄛
LINUX_AMZN_ICON '\uF270'$s #  LINUX_AMZN_ICON '\uF270'$s # 
LINUX_ENDEAVOUROS_ICON '\UF322'$s #  LINUX_ENDEAVOUROS_ICON '\UF322'$s # 
LINUX_ROCKY_ICON '\UF32B'$s # 
LINUX_GUIX_ICON '\UF325'$s # 
LINUX_NEON_ICON '\uF17C' # 
LINUX_ICON '\uF17C' #  LINUX_ICON '\uF17C' # 
SUNOS_ICON '\uF185 ' #  SUNOS_ICON '\uF185 ' # 
HOME_ICON '\uF015'$s #  HOME_ICON '\uF015'$s # 
@ -511,10 +572,28 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uF113 ' #  VCS_GIT_GITHUB_ICON '\uF113 ' # 
VCS_GIT_BITBUCKET_ICON '\uE703 ' #  VCS_GIT_BITBUCKET_ICON '\uE703 ' # 
VCS_GIT_GITLAB_ICON '\uF296 ' #  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_HG_ICON '\uF0C3 ' # 
VCS_SVN_ICON '\uE72D'$q #  VCS_SVN_ICON '\uE72D'$q # 
RUST_ICON '\uE7A8'$q #  RUST_ICON '\uE7A8'$q # 
PYTHON_ICON '\UE73C ' #  PYTHON_ICON '\UE73C ' # 
CHEZMOI_ICON '\uF015'$s # 
SWIFT_ICON '\uE755' #  SWIFT_ICON '\uE755' # 
GO_ICON '\uE626' #  GO_ICON '\uE626' # 
GOLANG_ICON '\uE626' #  GOLANG_ICON '\uE626' # 
@ -524,20 +603,21 @@ function _p9k_init_icons() {
EXECUTION_TIME_ICON '\uF252'$s #  EXECUTION_TIME_ICON '\uF252'$s # 
SSH_ICON '\uF489'$s #  SSH_ICON '\uF489'$s # 
VPN_ICON '\UF023' #  VPN_ICON '\UF023' # 
KUBERNETES_ICON '\F10FE' # 󱃾 KUBERNETES_ICON '\UF10FE' # 󱃾
DROPBOX_ICON '\UF16B'$s #  DROPBOX_ICON '\UF16B'$s # 
DATE_ICON '\uF073 ' #  DATE_ICON '\uF073 ' # 
TIME_ICON '\uF017 ' #  TIME_ICON '\uF017 ' # 
JAVA_ICON '\uE738' #  JAVA_ICON '\uE738' # 
LARAVEL_ICON '\ue73f'$q #  LARAVEL_ICON '\ue73f'$q # 
RANGER_ICON '\uF00b ' #  RANGER_ICON '\uF00b ' # 
YAZI_ICON '\uF00b ' # 
MIDNIGHT_COMMANDER_ICON 'mc' # mc MIDNIGHT_COMMANDER_ICON 'mc' # mc
VIM_ICON '\uE62B' #  VIM_ICON '\uE62B' # 
TERRAFORM_ICON '\uF1BB ' #  TERRAFORM_ICON '\uF1BB ' # 
PROXY_ICON '\u2194' # ↔ PROXY_ICON '\u2194' # ↔
DOTNET_ICON '\uE77F' #  DOTNET_ICON '\uE77F' # 
DOTNET_CORE_ICON '\uE77F' #  DOTNET_CORE_ICON '\uE77F' # 
AZURE_ICON '\UF0805' # 󰠅 AZURE_ICON '\uEBD8 ' # 
DIRENV_ICON '\u25BC' # ▼ DIRENV_ICON '\u25BC' # ▼
FLUTTER_ICON 'F' # F FLUTTER_ICON 'F' # F
GCLOUD_ICON '\UF02AD' # 󰊭 GCLOUD_ICON '\UF02AD' # 󰊭
@ -560,6 +640,7 @@ function _p9k_init_icons() {
SCALA_ICON '\uE737' #  SCALA_ICON '\uE737' # 
TOOLBOX_ICON '\uE20F'$s #  TOOLBOX_ICON '\uE20F'$s # 
ARCH_ICON '\uE266' #  ARCH_ICON '\uE266' # 
HISTORY_ICON '\uF1DA'$s # 
) )
;; ;;
'nerdfont-complete'|'nerdfont-fontconfig') 'nerdfont-complete'|'nerdfont-fontconfig')
@ -617,9 +698,13 @@ function _p9k_init_icons() {
LINUX_VOID_ICON '\uF17C' #  LINUX_VOID_ICON '\uF17C' # 
LINUX_ARTIX_ICON '\uF17C' #  LINUX_ARTIX_ICON '\uF17C' # 
LINUX_UBUNTU_ICON '\uF31b'$s #  LINUX_UBUNTU_ICON '\uF31b'$s # 
LINUX_KALI_ICON '\uF17C' # 
LINUX_RHEL_ICON '\uF316'$s #  LINUX_RHEL_ICON '\uF316'$s # 
LINUX_AMZN_ICON '\uF270'$s #  LINUX_AMZN_ICON '\uF270'$s # 
LINUX_ENDEAVOUROS_ICON '\uF17C' #  LINUX_ENDEAVOUROS_ICON '\uF17C' # 
LINUX_ROCKY_ICON '\uF17C' # 
LINUX_GUIX_ICON '\uF325'$s # 
LINUX_NEON_ICON '\uF17C' # 
LINUX_ICON '\uF17C' #  LINUX_ICON '\uF17C' # 
SUNOS_ICON '\uF185 ' #  SUNOS_ICON '\uF185 ' # 
HOME_ICON '\uF015'$s #  HOME_ICON '\uF015'$s # 
@ -647,10 +732,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uF113 ' #  VCS_GIT_GITHUB_ICON '\uF113 ' # 
VCS_GIT_BITBUCKET_ICON '\uE703 ' #  VCS_GIT_BITBUCKET_ICON '\uE703 ' # 
VCS_GIT_GITLAB_ICON '\uF296 ' #  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_HG_ICON '\uF0C3 ' # 
VCS_SVN_ICON '\uE72D'$q #  VCS_SVN_ICON '\uE72D'$q # 
RUST_ICON '\uE7A8'$q #  RUST_ICON '\uE7A8'$q # 
PYTHON_ICON '\UE73C ' #  PYTHON_ICON '\UE73C ' # 
CHEZMOI_ICON '\uF015'$s # 
SWIFT_ICON '\uE755' #  SWIFT_ICON '\uE755' # 
GO_ICON '\uE626' #  GO_ICON '\uE626' # 
GOLANG_ICON '\uE626' #  GOLANG_ICON '\uE626' # 
@ -667,6 +765,7 @@ function _p9k_init_icons() {
JAVA_ICON '\uE738' #  JAVA_ICON '\uE738' # 
LARAVEL_ICON '\ue73f'$q #  LARAVEL_ICON '\ue73f'$q # 
RANGER_ICON '\uF00b ' #  RANGER_ICON '\uF00b ' # 
YAZI_ICON '\uF00b ' # 
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON '\uE62B' #  VIM_ICON '\uE62B' # 
TERRAFORM_ICON '\uF1BB ' #  TERRAFORM_ICON '\uF1BB ' # 
@ -696,6 +795,7 @@ function _p9k_init_icons() {
SCALA_ICON '\uE737' #  SCALA_ICON '\uE737' # 
TOOLBOX_ICON '\uE20F'$s #  TOOLBOX_ICON '\uE20F'$s # 
ARCH_ICON '\uE266' #  ARCH_ICON '\uE266' # 
HISTORY_ICON '\uF1DA'$s # 
) )
;; ;;
ascii) ascii)
@ -734,6 +834,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON 'debian' LINUX_DEBIAN_ICON 'debian'
LINUX_RASPBIAN_ICON 'pi' LINUX_RASPBIAN_ICON 'pi'
LINUX_UBUNTU_ICON 'ubuntu' LINUX_UBUNTU_ICON 'ubuntu'
LINUX_KALI_ICON 'kali'
LINUX_CENTOS_ICON 'centos' LINUX_CENTOS_ICON 'centos'
LINUX_COREOS_ICON 'coreos' LINUX_COREOS_ICON 'coreos'
LINUX_ELEMENTARY_ICON 'elementary' LINUX_ELEMENTARY_ICON 'elementary'
@ -754,6 +855,9 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON 'rhel' LINUX_RHEL_ICON 'rhel'
LINUX_AMZN_ICON 'amzn' LINUX_AMZN_ICON 'amzn'
LINUX_ENDEAVOUROS_ICON 'edvos' LINUX_ENDEAVOUROS_ICON 'edvos'
LINUX_ROCKY_ICON 'rocky'
LINUX_GUIX_ICON 'guix'
LINUX_NEON_ICON 'neon'
SUNOS_ICON 'sunos' SUNOS_ICON 'sunos'
HOME_ICON '' HOME_ICON ''
HOME_SUB_ICON '' HOME_SUB_ICON ''
@ -780,10 +884,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '' VCS_GIT_GITHUB_ICON ''
VCS_GIT_BITBUCKET_ICON '' VCS_GIT_BITBUCKET_ICON ''
VCS_GIT_GITLAB_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_HG_ICON ''
VCS_SVN_ICON '' VCS_SVN_ICON ''
RUST_ICON 'rust' RUST_ICON 'rust'
PYTHON_ICON 'py' PYTHON_ICON 'py'
CHEZMOI_ICON 'chezmoi'
SWIFT_ICON 'swift' SWIFT_ICON 'swift'
GO_ICON 'go' GO_ICON 'go'
GOLANG_ICON 'go' GOLANG_ICON 'go'
@ -800,6 +917,7 @@ function _p9k_init_icons() {
JAVA_ICON 'java' JAVA_ICON 'java'
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON 'ranger' RANGER_ICON 'ranger'
YAZI_ICON 'yazi'
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'
@ -829,6 +947,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala' SCALA_ICON 'scala'
TOOLBOX_ICON 'toolbox' TOOLBOX_ICON 'toolbox'
ARCH_ICON 'arch' ARCH_ICON 'arch'
HISTORY_ICON 'hist'
) )
;; ;;
*) *)
@ -869,6 +988,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON 'Deb' LINUX_DEBIAN_ICON 'Deb'
LINUX_RASPBIAN_ICON 'RPi' LINUX_RASPBIAN_ICON 'RPi'
LINUX_UBUNTU_ICON 'Ubu' LINUX_UBUNTU_ICON 'Ubu'
LINUX_KALI_ICON 'Kal'
LINUX_CENTOS_ICON 'Cen' LINUX_CENTOS_ICON 'Cen'
LINUX_COREOS_ICON 'Cor' LINUX_COREOS_ICON 'Cor'
LINUX_ELEMENTARY_ICON 'Elm' LINUX_ELEMENTARY_ICON 'Elm'
@ -889,6 +1009,9 @@ function _p9k_init_icons() {
LINUX_RHEL_ICON 'RH' LINUX_RHEL_ICON 'RH'
LINUX_AMZN_ICON 'Amzn' LINUX_AMZN_ICON 'Amzn'
LINUX_ENDEAVOUROS_ICON 'Edv' LINUX_ENDEAVOUROS_ICON 'Edv'
LINUX_ROCKY_ICON 'Roc'
LINUX_GUIX_ICON 'Guix'
LINUX_NEON_ICON 'Neon'
SUNOS_ICON 'Sun' SUNOS_ICON 'Sun'
HOME_ICON '' HOME_ICON ''
HOME_SUB_ICON '' HOME_SUB_ICON ''
@ -915,10 +1038,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '' VCS_GIT_GITHUB_ICON ''
VCS_GIT_BITBUCKET_ICON '' VCS_GIT_BITBUCKET_ICON ''
VCS_GIT_GITLAB_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_HG_ICON ''
VCS_SVN_ICON '' VCS_SVN_ICON ''
RUST_ICON 'R' RUST_ICON 'R'
PYTHON_ICON 'Py' PYTHON_ICON 'Py'
CHEZMOI_ICON 'Chez'
SWIFT_ICON 'Swift' SWIFT_ICON 'Swift'
GO_ICON 'Go' GO_ICON 'Go'
GOLANG_ICON 'Go' GOLANG_ICON 'Go'
@ -935,6 +1071,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎ JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐ RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'
@ -964,6 +1101,7 @@ function _p9k_init_icons() {
SCALA_ICON 'scala' SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢ TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch' ARCH_ICON 'arch'
HISTORY_ICON 'hist'
) )
;; ;;
esac esac

@ -532,7 +532,7 @@ _p9k_get_icon() {
_p9k_translate_color() { _p9k_translate_color() {
if [[ $1 == <-> ]]; then # decimal color code: 255 if [[ $1 == <-> ]]; then # decimal color code: 255
_p9k__ret=${(l.3..0.)1} _p9k__ret=${(l.3..0.)1}
elif [[ $1 == '#'[[:xdigit:]]## ]]; then # hexademical color code: #ffffff elif [[ $1 == '#'[[:xdigit:]]## ]]; then # hexadecimal color code: #ffffff
_p9k__ret=${${(L)1}//ı/i} _p9k__ret=${${(L)1}//ı/i}
else # named color: red else # named color: red
# Strip prifixes if there are any. # Strip prifixes if there are any.
@ -1314,7 +1314,7 @@ function _p9k_fvm_old() {
} }
function _p9k_fvm_new() { function _p9k_fvm_new() {
_p9k_upglob .fvm @ && return 1 _p9k_upglob .fvm/flutter_sdk @ && return 1
local sdk=$_p9k__parent_dirs[$?]/.fvm/flutter_sdk local sdk=$_p9k__parent_dirs[$?]/.fvm/flutter_sdk
if [[ ${sdk:A} == (#b)*/versions/([^/]##) ]]; then if [[ ${sdk:A} == (#b)*/versions/([^/]##) ]]; then
_p9k_prompt_segment prompt_fvm blue $_p9k_color1 FLUTTER_ICON 0 '' ${match[1]//\%/%%} _p9k_prompt_segment prompt_fvm blue $_p9k_color1 FLUTTER_ICON 0 '' ${match[1]//\%/%%}
@ -1410,6 +1410,9 @@ _p9k_prompt_battery_set_args() {
local -i is_full=1 is_calculating is_charching local -i is_full=1 is_calculating is_charching
local dir local dir
for dir in $bats; do 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 local -i pow=0 full=0
if _p9k_read_file $dir/(energy_full|charge_full|charge_counter)(N); then if _p9k_read_file $dir/(energy_full|charge_full|charge_counter)(N); then
(( energy_full += ${full::=_p9k__ret} )) (( energy_full += ${full::=_p9k__ret} ))
@ -1422,7 +1425,6 @@ _p9k_prompt_battery_set_args() {
elif _p9k_read_file $dir/(energy|charge)_now(N); then elif _p9k_read_file $dir/(energy|charge)_now(N); then
(( energy_now += _p9k__ret )) (( energy_now += _p9k__ret ))
fi fi
_p9k_read_file $dir/status(N) && local bat_status=$_p9k__ret || continue
[[ $bat_status != Full ]] && is_full=0 [[ $bat_status != Full ]] && is_full=0
[[ $bat_status == Charging ]] && is_charching=1 [[ $bat_status == Charging ]] && is_charching=1
[[ $bat_status == (Charging|Discharging) && $pow == 0 ]] && is_calculating=1 [[ $bat_status == (Charging|Discharging) && $pow == 0 ]] && is_calculating=1
@ -1747,16 +1749,9 @@ function _p9k_shorten_delim_len() {
# Percents are duplicated because this function is currently used only # Percents are duplicated because this function is currently used only
# where the result is going to be percent-expanded. # where the result is going to be percent-expanded.
function _p9k_url_escape() { function _p9k_url_escape() {
if [[ $1 == [a-zA-Z0-9"/:_.-!'()~ "]# ]]; then emulate -L zsh -o no_multi_byte -o extended_glob
_p9k__ret=${1// /%%20} local MATCH MBEGIN MEND
else _p9k__ret=${1//(#m)[^a-zA-Z0-9"\/:_.-!'()~"]/%%${(l:2::0:)$(([##16]#MATCH))}}
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
} }
################################################################ ################################################################
@ -1911,7 +1906,7 @@ prompt_dir() {
else else
local key= local key=
fi fi
if ! _p9k_cache_ephemeral_get $0 $e $i $_p9k__cwd || [[ $key != $_p9k__cache_val[1] ]]; then if ! _p9k_cache_ephemeral_get $0 $e $i $_p9k__cwd $p || [[ $key != $_p9k__cache_val[1] ]]; then
local rtail=${(j./.)rparts[i,-1]} local rtail=${(j./.)rparts[i,-1]}
local parent=$_p9k__cwd[1,-2-$#rtail] local parent=$_p9k__cwd[1,-2-$#rtail]
_p9k_prompt_length $delim _p9k_prompt_length $delim
@ -2324,7 +2319,11 @@ prompt_laravel_version() {
[[ -r $app ]] || return [[ -r $app ]] || return
if ! _p9k_cache_stat_get $0 $dir/artisan $app; then if ! _p9k_cache_stat_get $0 $dir/artisan $app; then
local v="$(php $dir/artisan --version 2> /dev/null)" local v="$(php $dir/artisan --version 2> /dev/null)"
_p9k_cache_stat_set "${${(M)v:#Laravel Framework *}#Laravel Framework }" v="${${(M)v:#Laravel Framework *}#Laravel Framework }"
# In some versions the output is colorized.
# https://github.com/romkatv/powerlevel10k/issues/2534
v=${${v#$'\e['<->m}%$'\e['<->m}
_p9k_cache_stat_set "$v"
fi fi
[[ -n $_p9k__cache_val[1] ]] || return [[ -n $_p9k__cache_val[1] ]] || return
_p9k_prompt_segment "$0" "maroon" "white" 'LARAVEL_ICON' 0 '' "${_p9k__cache_val[1]//\%/%%}" _p9k_prompt_segment "$0" "maroon" "white" 'LARAVEL_ICON' 0 '' "${_p9k__cache_val[1]//\%/%%}"
@ -2427,18 +2426,45 @@ function _p9k_cached_cmd() {
} }
################################################################ ################################################################
# Segment to diplay Node version # Segment to display Node version
prompt_node_version() { prompt_node_version() {
_p9k_upglob package.json -. _p9k_upglob package.json -.
local -i idx=$? local -i idx=$?
if (( idx )); then (( idx || ! _POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY )) || return
_p9k_cached_cmd 0 $_p9k__parent_dirs[idx]/package.json node --version || return
else local node=$commands[node]
(( _POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY )) && return local -a file_deps env_deps
_p9k_cached_cmd 0 '' node --version || return 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 fi
[[ $_p9k__ret == v?* ]] || return [[ $dir == (/|.) ]] && break
_p9k_prompt_segment "$0" "green" "white" 'NODE_ICON' 0 '' "${_p9k__ret#v}" 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)
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_prompt_node_version_init() { _p9k_prompt_node_version_init() {
@ -2547,7 +2573,13 @@ _p9k_nvm_ls_current() {
prompt_nvm() { prompt_nvm() {
[[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return [[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return
local current=$_p9k__ret local current=$_p9k__ret
! _p9k_nvm_ls_default || [[ $_p9k__ret != $current ]] || return (( _POWERLEVEL9K_NVM_SHOW_SYSTEM )) ||
[[ $current != system ]] ||
return
(( _POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW )) ||
! _p9k_nvm_ls_default ||
[[ $_p9k__ret != $current ]] ||
return
_p9k_prompt_segment "$0" "magenta" "black" 'NODE_ICON' 0 '' "${${current#v}//\%/%%}" _p9k_prompt_segment "$0" "magenta" "black" 'NODE_ICON' 0 '' "${${current#v}//\%/%%}"
} }
@ -3160,68 +3192,55 @@ instant_prompt_root_indicator() { prompt_root_indicator; }
################################################################ ################################################################
# Segment to display Rust version number # Segment to display Rust version number
prompt_rust_version() { 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]
}
function _p9k_prompt_rust_version_init() {
_p9k__async_segments_compute+='_p9k_rust_version_prefetch'
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[rustc]'
}
_p9k_rust_version_prefetch() {
local rustc=$commands[rustc]
if [[ -z $rustc ]] ||
{ (( _POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY )) && _p9k_upglob Cargo.toml -. }; then
unset P9K_RUST_VERSION unset P9K_RUST_VERSION
if (( _POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY )); then return
_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 fi
if ! _p9k_cache_stat_get $0_v$toolchain $rustc $deps; then _p9k_worker_invoke rust_version \
_p9k_cache_stat_set "$($rustc --version 2>/dev/null)" "_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 fi
local v=${${_p9k__cache_val[1]#rustc }%% *}
[[ -n $v ]] || return [[ $v != $P9K_RUST_VERSION ]] || return
typeset -g P9K_RUST_VERSION=$_p9k__cache_val[1] typeset -g P9K_RUST_VERSION=$v
_p9k_prompt_segment "$0" "darkorange" "$_p9k_color1" 'RUST_ICON' 0 '' "${v//\%/%%}" _p9k_print_params P9K_RUST_VERSION
echo -E - 'reset=1'
} }
_p9k_prompt_rust_version_init() { _p9k_prompt_rust_version_sync() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[rustc]' if [[ -n $REPLY ]]; then
eval $REPLY
_p9k_worker_reply $REPLY
fi
} }
# RSpec test ratio # RSpec test ratio
@ -3692,7 +3711,7 @@ function +vi-hg-bookmarks() {
if [[ -n "${hgbmarks[@]}" ]]; then if [[ -n "${hgbmarks[@]}" ]]; then
hook_com[hg-bookmark-string]=" $(print_icon 'VCS_BOOKMARK_ICON')${hgbmarks[@]}" hook_com[hg-bookmark-string]=" $(print_icon 'VCS_BOOKMARK_ICON')${hgbmarks[@]}"
# To signal that we want to use the sting we just generated, set the special # To signal that we want to use the string we just generated, set the special
# variable `ret' to something other than the default zero: # variable `ret' to something other than the default zero:
ret=1 ret=1
return 0 return 0
@ -3701,20 +3720,9 @@ function +vi-hg-bookmarks() {
function +vi-vcs-detect-changes() { function +vi-vcs-detect-changes() {
if [[ "${hook_com[vcs]}" == "git" ]]; then if [[ "${hook_com[vcs]}" == "git" ]]; then
local remote="$(git ls-remote --get-url 2> /dev/null)" local remote="$(git ls-remote --get-url 2> /dev/null)"
if [[ "$remote" =~ "github" ]] then _p9k_vcs_icon "$remote"
vcs_visual_identifier='VCS_GIT_GITHUB_ICON' vcs_visual_identifier=$_p9k__ret
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 elif [[ "${hook_com[vcs]}" == "hg" ]]; then
vcs_visual_identifier='VCS_HG_ICON' vcs_visual_identifier='VCS_HG_ICON'
elif [[ "${hook_com[vcs]}" == "svn" ]]; then elif [[ "${hook_com[vcs]}" == "svn" ]]; then
@ -3847,13 +3855,14 @@ function _p9k_vcs_status_purge() {
} }
function _p9k_vcs_icon() { function _p9k_vcs_icon() {
case "$VCS_STATUS_REMOTE_URL" in local pat icon
*github*) _p9k__ret=VCS_GIT_GITHUB_ICON;; for pat icon in "${(@)_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS}"; do
*bitbucket*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; if [[ $1 == $~pat ]]; then
*stash*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; _p9k__ret=$icon
*gitlab*) _p9k__ret=VCS_GIT_GITLAB_ICON;; return
*) _p9k__ret=VCS_GIT_ICON;; fi
esac done
_p9k__ret=
} }
function _p9k_vcs_render() { function _p9k_vcs_render() {
@ -3883,7 +3892,7 @@ function _p9k_vcs_render() {
state=CLEAN state=CLEAN
fi fi
fi fi
_p9k_vcs_icon _p9k_vcs_icon "$VCS_STATUS_REMOTE_URL"
_p9k_prompt_segment prompt_vcs_$state "${__p9k_vcs_states[$state]}" "$_p9k_color1" "$_p9k__ret" 0 '' "" _p9k_prompt_segment prompt_vcs_$state "${__p9k_vcs_states[$state]}" "$_p9k_color1" "$_p9k__ret" 0 '' ""
return 0 return 0
fi fi
@ -3936,8 +3945,8 @@ function _p9k_vcs_render() {
fi fi
# It's weird that removing vcs-detect-changes from POWERLEVEL9K_VCS_GIT_HOOKS gets rid # It's weird that removing vcs-detect-changes from POWERLEVEL9K_VCS_GIT_HOOKS gets rid
# of the GIT icon. That's what vcs_info does, so we do the same in the name of compatiblity. # of the GIT icon. That's what vcs_info does, so we do the same in the name of compatibility.
_p9k_vcs_icon _p9k_vcs_icon "$VCS_STATUS_REMOTE_URL"
icon=$_p9k__ret icon=$_p9k__ret
fi fi
@ -4234,6 +4243,49 @@ instant_prompt_vi_mode() {
fi 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 # Virtualenv: current working virtualenv
# More information on virtualenv (Python): # More information on virtualenv (Python):
@ -4243,12 +4295,22 @@ prompt_virtualenv() {
if (( _POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION )) && _p9k_python_version; then if (( _POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION )) && _p9k_python_version; then
msg="${_p9k__ret//\%/%%} " msg="${_p9k__ret//\%/%%} "
fi 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} local v=${VIRTUAL_ENV:t}
if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then
v=$VIRTUAL_ENV_PROMPT[2,-3] v=$VIRTUAL_ENV_PROMPT[2,-3]
elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then
v=${VIRTUAL_ENV:h:t} v=${VIRTUAL_ENV:h:t}
fi fi
fi
msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER" msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER"
case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in
false) false)
@ -4604,9 +4666,10 @@ _p9k_prompt_java_version_init() {
} }
prompt_azure() { prompt_azure() {
local cfg=${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json local name cfg=${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json
if ! _p9k_cache_stat_get $0 $cfg; then if _p9k_cache_stat_get $0 $cfg; then
local name name=$_p9k__cache_val[1]
else
if (( $+commands[jq] )) && name="$(jq -r '[.subscriptions[]|select(.isDefault==true)|.name][]|strings' $cfg 2>/dev/null)"; then if (( $+commands[jq] )) && name="$(jq -r '[.subscriptions[]|select(.isDefault==true)|.name][]|strings' $cfg 2>/dev/null)"; then
name=${name%%$'\n'*} name=${name%%$'\n'*}
elif ! name="$(az account show --query name --output tsv 2>/dev/null)"; then elif ! name="$(az account show --query name --output tsv 2>/dev/null)"; then
@ -4614,6 +4677,7 @@ prompt_azure() {
fi fi
_p9k_cache_stat_set "$name" _p9k_cache_stat_set "$name"
fi fi
[[ -n $name ]] || return
local pat class state local pat class state
for pat class in "${_POWERLEVEL9K_AZURE_CLASSES[@]}"; do for pat class in "${_POWERLEVEL9K_AZURE_CLASSES[@]}"; do
if [[ $name == ${~pat} ]]; then if [[ $name == ${~pat} ]]; then
@ -4621,8 +4685,7 @@ prompt_azure() {
break break
fi fi
done done
[[ -n $_p9k__cache_val[1] ]] || return _p9k_prompt_segment "$0$state" "blue" "white" "AZURE_ICON" 0 '' "${name//\%/%%}"
_p9k_prompt_segment "$0$state" "blue" "white" "AZURE_ICON" 0 '' "${_p9k__cache_val[1]//\%/%%}"
} }
_p9k_prompt_azure_init() { _p9k_prompt_azure_init() {
@ -4892,6 +4955,18 @@ function instant_prompt_ranger() {
_p9k_prompt_segment prompt_ranger $_p9k_color1 yellow RANGER_ICON 1 '$RANGER_LEVEL' '$RANGER_LEVEL' _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() { function prompt_midnight_commander() {
local -i len=$#_p9k__prompt _p9k__has_upglob local -i len=$#_p9k__prompt _p9k__has_upglob
_p9k_prompt_segment $0 $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '' '' _p9k_prompt_segment $0 $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '' ''
@ -4963,13 +5038,11 @@ function prompt_nix_shell() {
} }
_p9k_prompt_nix_shell_init() { _p9k_prompt_nix_shell_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${IN_NIX_SHELL:#0}${${path[(I)/nix/store/*]}:#0}' typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"=$_p9k_nix_shell_cond
} }
function instant_prompt_nix_shell() { function instant_prompt_nix_shell() {
_p9k_prompt_segment prompt_nix_shell 4 $_p9k_color1 NIX_SHELL_ICON 1 \ _p9k_prompt_segment prompt_nix_shell 4 $_p9k_color1 NIX_SHELL_ICON 1 "$_p9k_nix_shell_cond" '${(M)IN_NIX_SHELL:#(pure|impure)}'
'${IN_NIX_SHELL:#0}${${path[(I)/nix/store/*]}:#0}' \
'${(M)IN_NIX_SHELL:#(pure|impure)}'
} }
function prompt_terraform() { function prompt_terraform() {
@ -4993,12 +5066,16 @@ _p9k_prompt_terraform_init() {
} }
function prompt_terraform_version() { function prompt_terraform_version() {
_p9k_cached_cmd 0 '' terraform --version || return local v cfg terraform=${commands[terraform]}
local v=${_p9k__ret#Terraform v} _p9k_upglob .terraform-version -. || cfg=$_p9k__parent_dirs[$?]/.terraform-version
(( $#v < $#_p9k__ret )) || return if _p9k_cache_stat_get $0.$TFENV_TERRAFORM_VERSION $terraform $cfg; then
v=${v%%$'\n'*} v=$_p9k__cache_val[1]
else
v=${${"$(terraform --version 2>/dev/null)"#Terraform v}%%$'\n'*} || v=
_p9k_cache_stat_set "$v"
fi
[[ -n $v ]] || return [[ -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() { _p9k_prompt_terraform_version_init() {
@ -5047,8 +5124,11 @@ function _p9k_timewarrior_clear() {
} }
function prompt_timewarrior() { 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 -a stat
local dir=${TIMEWARRIORDB:-~/.timewarrior}/data
[[ $dir == $_p9k_timewarrior_dir ]] || _p9k_timewarrior_clear [[ $dir == $_p9k_timewarrior_dir ]] || _p9k_timewarrior_clear
if [[ -n $_p9k_timewarrior_file_name ]]; then if [[ -n $_p9k_timewarrior_file_name ]]; then
zstat -A stat +mtime -- $dir $_p9k_timewarrior_file_name 2>/dev/null || stat=() zstat -A stat +mtime -- $dir $_p9k_timewarrior_file_name 2>/dev/null || stat=()
@ -5154,7 +5234,10 @@ function _p9k_taskwarrior_check_data() {
} }
function _p9k_taskwarrior_init_data() { function _p9k_taskwarrior_init_data() {
local -a stat files=($_p9k_taskwarrior_data_dir/{pending,completed}.data) local -a stat files=(
$_p9k_taskwarrior_data_dir/{pending,completed}.data
$_p9k_taskwarrior_data_dir/taskchampion.sqlite3
)
_p9k_taskwarrior_data_files=($^files(N)) _p9k_taskwarrior_data_files=($^files(N))
_p9k_taskwarrior_data_non_files=(${files:|_p9k_taskwarrior_data_files}) _p9k_taskwarrior_data_non_files=(${files:|_p9k_taskwarrior_data_files})
if (( $#_p9k_taskwarrior_data_files )); then if (( $#_p9k_taskwarrior_data_files )); then
@ -5181,7 +5264,9 @@ function _p9k_taskwarrior_init_data() {
local -a ts local -a ts
ts=($(command task +PENDING -OVERDUE list rc.verbose=nothing rc.color=0 rc._forcecolor=0 \ 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 2>/dev/null)) || ts=() rc.report.list.labels= rc.report.list.columns=due.epoch </dev/null 2>/dev/null)) || ts=()
if (( $#ts )); then # The second condition is a workaround for a bug in taskwarrior v3.0.1.
# https://github.com/romkatv/powerlevel10k/issues/2648.
if (( $#ts && ! ${#${(@)ts:#(|-)<->(|.<->)}} )); then
_p9k_taskwarrior_next_due=${${(on)ts}[1]} _p9k_taskwarrior_next_due=${${(on)ts}[1]}
(( _p9k_taskwarrior_next_due > EPOCHSECONDS )) || _p9k_taskwarrior_next_due=$((EPOCHSECONDS+60)) (( _p9k_taskwarrior_next_due > EPOCHSECONDS )) || _p9k_taskwarrior_next_due=$((EPOCHSECONDS+60))
fi fi
@ -5690,6 +5775,31 @@ _p9k_prompt_cpu_arch_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[machine]$commands[arch]' 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 # 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. # YSU_HARDCORE=1. See https://github.com/romkatv/powerlevel10k/issues/427.
_p9k_preexec1() { _p9k_preexec1() {
@ -6581,9 +6691,12 @@ function _p9k_clear_instant_prompt() {
unset _z4h_saved_screen unset _z4h_saved_screen
fi fi
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed] print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
local unexpected=${(S)${${content//$'\e[?'<->'c'}//$'\e['<->' q'}//$'\e'[^$'\a\e']#($'\a'|$'\e\\')} local unexpected=${${content//$'\e[?'<->'c'}//$'\e['<->' q'}
unexpected=${(S)unexpected//$'\eP'(|*[^$'\e'])($'\e\e')#$'\e\\'}
unexpected=${(S)unexpected//$'\e'[^$'\a\e']#($'\a'|$'\e\\')}
# Visual Studio Code prints this garbage. # Visual Studio Code prints this garbage.
unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'} unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'}
typeset -g P9K_STARTUP_CONSOLE_OUTPUT=("$content" "$unexpected")
if [[ -n $unexpected ]]; then if [[ -n $unexpected ]]; then
local omz1='[Oh My Zsh] Would you like to update? [Y/n]: ' local omz1='[Oh My Zsh] Would you like to update? [Y/n]: '
local omz2='Updating Oh My Zsh' local omz2='Updating Oh My Zsh'
@ -6627,9 +6740,9 @@ function _p9k_clear_instant_prompt() {
echo -E - "" echo -E - ""
echo -E - "${(%):-For details, see:}" echo -E - "${(%):-For details, see:}"
if (( _p9k_term_has_href )); then if (( _p9k_term_has_href )); then
echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\e]8;;\a}" echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k#instant-prompt\ahttps://github.com/romkatv/powerlevel10k#instant-prompt\e]8;;\a}"
else else
echo - "${(%):-https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt}" echo - "${(%):-https://github.com/romkatv/powerlevel10k#instant-prompt}"
fi fi
echo -E - "" echo -E - ""
echo - "${(%):-%3F-- console output produced during zsh initialization follows --%f}" echo - "${(%):-%3F-- console output produced during zsh initialization follows --%f}"
@ -7341,6 +7454,36 @@ _p9k_init_params() {
_p9k_declare -b POWERLEVEL9K_VCS_CONFLICTED_STATE 0 _p9k_declare -b POWERLEVEL9K_VCS_CONFLICTED_STATE 0
_p9k_declare -b POWERLEVEL9K_HIDE_BRANCH_ICON 0 _p9k_declare -b POWERLEVEL9K_HIDE_BRANCH_ICON 0
_p9k_declare -b POWERLEVEL9K_VCS_HIDE_TAGS 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 _p9k_declare -i POWERLEVEL9K_CHANGESET_HASH_LENGTH 8
# Specifies the maximum number of elements in the cache. When the cache grows over this limit, # 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 # it gets cleared. This is meant to avoid memory leaks when a rogue prompt is filling the cache
@ -7512,6 +7655,8 @@ _p9k_init_params() {
_p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0
_p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global _p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global
_p9k_declare -b POWERLEVEL9K_NODENV_SHOW_SYSTEM 1 _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 -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0
_p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global _p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global
_p9k_declare -b POWERLEVEL9K_RBENV_SHOW_SYSTEM 1 _p9k_declare -b POWERLEVEL9K_RBENV_SHOW_SYSTEM 1
@ -7593,6 +7738,7 @@ _p9k_init_params() {
_p9k_declare -i POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM -1 _p9k_declare -i POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM -1
_p9k_declare -i POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM -1 _p9k_declare -i POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM -1
_p9k_declare -b POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS 0 _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 -b POWERLEVEL9K_DISABLE_GITSTATUS 0
_p9k_declare -e POWERLEVEL9K_VI_INSERT_MODE_STRING "INSERT" _p9k_declare -e POWERLEVEL9K_VI_INSERT_MODE_STRING "INSERT"
_p9k_declare -e POWERLEVEL9K_VI_COMMAND_MODE_STRING "NORMAL" _p9k_declare -e POWERLEVEL9K_VI_COMMAND_MODE_STRING "NORMAL"
@ -7658,6 +7804,12 @@ _p9k_init_params() {
# If set to true, time will update every second. # If set to true, time will update every second.
_p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0 _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 local -i i=1
while (( i <= $#_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS )); do while (( i <= $#_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS )); do
local segment=${${(U)_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[i]}//İ/I} local segment=${${(U)_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[i]}//İ/I}
@ -8230,9 +8382,17 @@ _p9k_init_prompt() {
if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then
_p9k_prompt_prefix_left+=$'%{\e]133;A\a%}' _p9k_prompt_prefix_left+=$'%{\e]133;A\a%}'
_p9k_prompt_suffix_left+=$'%{\e]133;B\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 if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then
_p9k_prompt_prefix_left+=$'%{\ePtmux;\e\e]133;A\a\e\\%}' _p9k_prompt_prefix_left+=$'%{\ePtmux;\e\e]133;A\a\e\\%}'
_p9k_prompt_suffix_left+=$'%{\ePtmux;\e\e]133;B\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
fi fi
@ -8357,8 +8517,8 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1 [[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit _p9k_deinit
fi fi
_p9k__param_pat=$'v141\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' _p9k__param_pat=${(q)P9K_VERSION}$'\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
_p9k__param_pat+=$__p9k_force_term_shell_integration$'\1' _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1'${(q)TERM_PROGRAM}$'\1'
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'${#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_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' _p9k__param_pat+=$'$GITSTATUS_CACHE_DIR\1$GITSTATUS_AUTO_INSTALL\1${ZLE_RPROMPT_INDENT:-1}\1'
@ -8431,6 +8591,13 @@ function _p9k_init_cacheable() {
_p9k_param prompt_prompt_char_ERROR_VIINS CONTENT_EXPANSION '${P9K_CONTENT}' _p9k_param prompt_prompt_char_ERROR_VIINS CONTENT_EXPANSION '${P9K_CONTENT}'
_p9k_transient_prompt+='${:-"'$_p9k__ret'"}' _p9k_transient_prompt+='${:-"'$_p9k__ret'"}'
_p9k_transient_prompt+=')%b%k%f%s%u' _p9k_transient_prompt+=')%b%k%f%s%u'
_p9k_get_icon '' LEFT_SEGMENT_END_SEPARATOR
if [[ $_p9k__ret != (| ) ]]; then
_p9k__ret+=%b%k%f
# Not escaped for historical reasons.
_p9k__ret='${:-"'$_p9k__ret'"}'
fi
_p9k_transient_prompt+=$_p9k__ret
if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then
_p9k_transient_prompt=$'%{\e]133;A\a%}'$_p9k_transient_prompt$'%{\e]133;B\a%}' _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 if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then
@ -8457,18 +8624,25 @@ function _p9k_init_cacheable() {
if [[ -r /etc/os-release ]]; then if [[ -r /etc/os-release ]]; then
local lines=(${(f)"$(</etc/os-release)"}) local lines=(${(f)"$(</etc/os-release)"})
lines=(${(@M)lines:#ID=*}) lines=(${(@M)lines:#ID=*})
(( $#lines == 1 )) && os_release_id=${lines[1]#ID=} (( $#lines == 1 )) && os_release_id=${(Q)${lines[1]#ID=}}
elif [[ -e /etc/artix-release ]]; then elif [[ -e /etc/artix-release ]]; then
os_release_id=artix os_release_id=artix
fi fi
case $os_release_id in case $os_release_id in
*arch*) _p9k_set_os Linux LINUX_ARCH_ICON;; *arch*) _p9k_set_os Linux LINUX_ARCH_ICON;;
*debian*) _p9k_set_os Linux LINUX_DEBIAN_ICON;;
*raspbian*) _p9k_set_os Linux LINUX_RASPBIAN_ICON;; *raspbian*) _p9k_set_os Linux LINUX_RASPBIAN_ICON;;
*debian*)
if [[ -f /etc/apt/sources.list.d/raspi.list ]]; then
_p9k_set_os Linux LINUX_RASPBIAN_ICON
else
_p9k_set_os Linux LINUX_DEBIAN_ICON
fi
;;
*ubuntu*) _p9k_set_os Linux LINUX_UBUNTU_ICON;; *ubuntu*) _p9k_set_os Linux LINUX_UBUNTU_ICON;;
*elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;; *elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;;
*fedora*) _p9k_set_os Linux LINUX_FEDORA_ICON;; *fedora*) _p9k_set_os Linux LINUX_FEDORA_ICON;;
*coreos*) _p9k_set_os Linux LINUX_COREOS_ICON;; *coreos*) _p9k_set_os Linux LINUX_COREOS_ICON;;
*kali*) _p9k_set_os Linux LINUX_KALI_ICON;;
*gentoo*) _p9k_set_os Linux LINUX_GENTOO_ICON;; *gentoo*) _p9k_set_os Linux LINUX_GENTOO_ICON;;
*mageia*) _p9k_set_os Linux LINUX_MAGEIA_ICON;; *mageia*) _p9k_set_os Linux LINUX_MAGEIA_ICON;;
*centos*) _p9k_set_os Linux LINUX_CENTOS_ICON;; *centos*) _p9k_set_os Linux LINUX_CENTOS_ICON;;
@ -8486,6 +8660,9 @@ function _p9k_init_cacheable() {
*rhel*) _p9k_set_os Linux LINUX_RHEL_ICON;; *rhel*) _p9k_set_os Linux LINUX_RHEL_ICON;;
amzn) _p9k_set_os Linux LINUX_AMZN_ICON;; amzn) _p9k_set_os Linux LINUX_AMZN_ICON;;
endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;; endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;;
rocky) _p9k_set_os Linux LINUX_ROCKY_ICON;;
guix) _p9k_set_os Linux LINUX_GUIX_ICON;;
neon) _p9k_set_os Linux LINUX_NEON_ICON;;
*) _p9k_set_os Linux LINUX_ICON;; *) _p9k_set_os Linux LINUX_ICON;;
esac esac
;; ;;
@ -8636,7 +8813,7 @@ _p9k_init_vcs() {
() { () {
trap 'return 130' INT trap 'return 130' INT
{ {
gitstatus_start_p9k_ POWERLEVEL9K gitstatus_start_p9k_ -t $_POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC POWERLEVEL9K
} always { } always {
trap ':' INT trap ':' INT
} }
@ -8680,6 +8857,7 @@ _p9k_init_vcs() {
-d $_POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM \ -d $_POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM \
-c $_POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM \ -c $_POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM \
-m $_POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \ -m $_POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \
-t $_POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC \
${${_POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS:#0}:+-e} \ ${${_POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS:#0}:+-e} \
POWERLEVEL9K POWERLEVEL9K
} always { } always {
@ -8829,9 +9007,9 @@ _p9k_init() {
>&2 echo -E - "" >&2 echo -E - ""
>&2 echo -E - "${(%):- - %BRecommended%b: Change the way Powerlevel10k is loaded from %B$__p9k_zshrc_u%b.}" >&2 echo -E - "${(%):- - %BRecommended%b: Change the way Powerlevel10k is loaded from %B$__p9k_zshrc_u%b.}"
if (( _p9k_term_has_href )); then if (( _p9k_term_has_href )); then
>&2 echo - "${(%):- See \e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\e]8;;\a.}" >&2 echo - "${(%):- See \e]8;;https://github.com/romkatv/powerlevel10k#installation\ahttps://github.com/romkatv/powerlevel10k#installation\e]8;;\a.}"
else else
>&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation.}" >&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k#installation.}"
fi fi
if (( $+zsh_defer_options )); then if (( $+zsh_defer_options )); then
>&2 echo -E - "" >&2 echo -E - ""
@ -8904,6 +9082,8 @@ _p9k_precmd_first() {
if [[ -n $KITTY_SHELL_INTEGRATION && KITTY_SHELL_INTEGRATION[(wIe)no-prompt-mark] -eq 0 ]]; then if [[ -n $KITTY_SHELL_INTEGRATION && KITTY_SHELL_INTEGRATION[(wIe)no-prompt-mark] -eq 0 ]]; then
KITTY_SHELL_INTEGRATION+=' no-prompt-mark' KITTY_SHELL_INTEGRATION+=' no-prompt-mark'
(( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1 (( $+__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 fi
typeset -ga precmd_functions=(${precmd_functions:#_p9k_precmd_first}) typeset -ga precmd_functions=(${precmd_functions:#_p9k_precmd_first})
} }
@ -9303,6 +9483,7 @@ 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 zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null
fi fi
typeset -g P9K_VERSION=1.20.10
unset VSCODE_SHELL_INTEGRATION unset VSCODE_SHELL_INTEGRATION
_p9k_init_ssh _p9k_init_ssh

@ -767,6 +767,11 @@ function ask_quotes() {
} }
function ask_arrow() { 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" [[ -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 %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)" add_widget 0 flowing -c reference: "$(href https://graphemica.com/%F0%9F%A0%89)"
@ -790,6 +795,39 @@ function ask_arrow() {
return 0 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() { function ask_icon_padding() {
if [[ $POWERLEVEL9K_MODE == (powerline|compatible|ascii) ]]; then if [[ $POWERLEVEL9K_MODE == (powerline|compatible|ascii) ]]; then
POWERLEVEL9K_ICON_PADDING=none POWERLEVEL9K_ICON_PADDING=none
@ -1037,19 +1075,19 @@ function ask_time() {
add_widget 0 flowing -c "%BShow current time?%b" add_widget 0 flowing -c "%BShow current time?%b"
add_widget 0 print add_widget 0 print
add_widget 1 add_widget 1
add_widget 0 print -P "%B(1) No.%b" add_widget 0 print -P "%B(n) No.%b"
add_prompt time= 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_widget 0 print -P "%B(2) 24-hour format.%b"
add_prompt time=$time_24h 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." add_widget 0 print -P "(r) Restart from the beginning."
ask 123r ask n12r
case $choice in case $choice in
r) return 1;; r) return 1;;
1) time=;; n) time=;;
1) time=$time_12h; options+='12h time';;
2) time=$time_24h; options+='24h time';; 2) time=$time_24h; options+='24h time';;
3) time=$time_12h; options+='12h time';;
esac esac
return 0 return 0
} }
@ -1088,18 +1126,26 @@ function os_icon_name() {
if [[ -r /etc/os-release ]]; then if [[ -r /etc/os-release ]]; then
local lines=(${(f)"$(</etc/os-release)"}) local lines=(${(f)"$(</etc/os-release)"})
lines=(${(@M)lines:#ID=*}) lines=(${(@M)lines:#ID=*})
(( $#lines == 1 )) && os_release_id=${lines[1]#ID=} (( $#lines == 1 )) && os_release_id=${(Q)${lines[1]#ID=}}
elif [[ -e /etc/artix-release ]]; then elif [[ -e /etc/artix-release ]]; then
os_release_id=artix os_release_id=artix
fi fi
case $os_release_id in case $os_release_id in
*arch*) echo LINUX_ARCH_ICON;; *arch*) echo LINUX_ARCH_ICON;;
*debian*) echo LINUX_DEBIAN_ICON;; *raspbian*) echo LINUX_RASPBIAN_ICON;;
*debian*)
if [[ -f /etc/apt/sources.list.d/raspi.list ]]; then
echo LINUX_RASPBIAN_ICON
else
echo LINUX_DEBIAN_ICON
fi
;;
*raspbian*) echo LINUX_RASPBIAN_ICON;; *raspbian*) echo LINUX_RASPBIAN_ICON;;
*ubuntu*) echo LINUX_UBUNTU_ICON;; *ubuntu*) echo LINUX_UBUNTU_ICON;;
*elementary*) echo LINUX_ELEMENTARY_ICON;; *elementary*) echo LINUX_ELEMENTARY_ICON;;
*fedora*) echo LINUX_FEDORA_ICON;; *fedora*) echo LINUX_FEDORA_ICON;;
*coreos*) echo LINUX_COREOS_ICON;; *coreos*) echo LINUX_COREOS_ICON;;
*kali*) echo LINUX_KALI_ICON;;
*gentoo*) echo LINUX_GENTOO_ICON;; *gentoo*) echo LINUX_GENTOO_ICON;;
*mageia*) echo LINUX_MAGEIA_ICON;; *mageia*) echo LINUX_MAGEIA_ICON;;
*centos*) echo LINUX_CENTOS_ICON;; *centos*) echo LINUX_CENTOS_ICON;;
@ -1117,6 +1163,9 @@ function os_icon_name() {
*rhel*) echo LINUX_RHEL_ICON;; *rhel*) echo LINUX_RHEL_ICON;;
amzn) echo LINUX_AMZN_ICON;; amzn) echo LINUX_AMZN_ICON;;
endeavouros) echo LINUX_ENDEAVOUROS_ICON;; endeavouros) echo LINUX_ENDEAVOUROS_ICON;;
rocky) echo LINUX_ROCKY_ICON;;
guix) echo LINUX_GUIX_ICON;;
neon) echo LINUX_NEON_ICON;;
*) echo LINUX_ICON;; *) echo LINUX_ICON;;
esac esac
;; ;;
@ -1240,42 +1289,34 @@ function ask_heads() {
fi fi
local extra local extra
add_widget 0 flowing -c "%BPrompt Heads%b" add_widget 0 flowing -c "%BPrompt Heads%b"
if (( cap_diamond )); then add_widget 0 print -Pl " head" "%B(1) Flat.%b |" " v"
add_widget 0 print -Pl " head" "%B(1) Sharp.%b |" " v" add_widget 3 print -P "%B(1) Flat.%b"
add_widget 3 print -P "%B(1) Sharp.%b" add_prompt_n left_head= right_head=
add_prompt_n left_head=$right_triangle right_head=$left_triangle
add_widget 0 print add_widget 0 print
add_widget 2 add_widget 2
else
add_widget 0 print
add_widget 1
add_widget 0 print -P "%B(1) Flat.%b"
add_prompt left_head= right_head=
fi
add_widget 0 print -P "%B(2) Blurred.%b" add_widget 0 print -P "%B(2) Blurred.%b"
add_prompt left_head=$fade_out right_head=$fade_in add_prompt left_head=$fade_out right_head=$fade_in
if [[ $POWERLEVEL9K_MODE == nerdfont-* ]]; then if (( cap_diamond )); then
extra+=3 extra+=3
add_widget 0 print -P "%B(3) Slanted.%b" add_widget 0 print -P "%B(3) Sharp.%b"
add_prompt left_head=$down_triangle right_head=$up_triangle add_prompt left_head=$right_triangle right_head=$left_triangle
if [[ $POWERLEVEL9K_MODE == nerdfont-* ]]; then
extra+=4 extra+=4
add_widget 0 print -P "%B(4) Round.%b" add_widget 0 print -P "%B(4) Slanted.%b"
add_prompt left_head=$down_triangle right_head=$up_triangle
extra+=5
add_widget 0 print -P "%B(5) Round.%b"
add_prompt left_head=$right_circle right_head=$left_circle add_prompt left_head=$right_circle right_head=$left_circle
fi fi
fi
add_widget 0 print -P "(r) Restart from the beginning." add_widget 0 print -P "(r) Restart from the beginning."
ask 12${extra}r ask 12${extra}r
case $choice in case $choice in
r) return 1;; r) return 1;;
1) 1)
if (( cap_diamond )); then
left_head=$right_triangle
right_head=$left_triangle
options+='sharp heads'
else
left_head= left_head=
right_head= right_head=
options+='flat heads' options+='flat heads'
fi
;; ;;
2) 2)
left_head=$fade_out left_head=$fade_out
@ -1283,11 +1324,16 @@ function ask_heads() {
options+='blurred heads' options+='blurred heads'
;; ;;
3) 3)
left_head=$right_triangle
right_head=$left_triangle
options+='sharp heads'
;;
4)
left_head=$down_triangle left_head=$down_triangle
right_head=$up_triangle right_head=$up_triangle
options+='slanted heads' options+='slanted heads'
;; ;;
4) 5)
left_head=$right_circle left_head=$right_circle
right_head=$left_circle right_head=$left_circle
options+='round heads' options+='round heads'
@ -1460,7 +1506,7 @@ function ask_empty_line() {
} }
function print_instant_prompt_link() { function print_instant_prompt_link() {
local link='https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt' local link='https://github.com/romkatv/powerlevel10k#instant-prompt'
(( wizard_columns < $#link )) && return (( wizard_columns < $#link )) && return
print print
flowing -c "$(href $link)" flowing -c "$(href $link)"
@ -1701,6 +1747,8 @@ function generate_config() {
sub NORDVPN_VISUAL_IDENTIFIER_EXPANSION "'nord'" sub NORDVPN_VISUAL_IDENTIFIER_EXPANSION "'nord'"
uncomment 'typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION' uncomment 'typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION'
sub RANGER_VISUAL_IDENTIFIER_EXPANSION "'▲'" sub RANGER_VISUAL_IDENTIFIER_EXPANSION "'▲'"
uncomment 'typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION'
sub YAZI_VISUAL_IDENTIFIER_EXPANSION "'▲'"
uncomment 'typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION' uncomment 'typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION'
sub KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION "'○'" sub KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION "'○'"
uncomment 'typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION' uncomment 'typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION'
@ -1909,7 +1957,7 @@ function generate_config() {
command mkdir -p -- ${__p9k_cfg_path:h} || return command mkdir -p -- ${__p9k_cfg_path:h} || return
if [[ -e $__p9k_cfg_path ]]; then if [[ -e $__p9k_cfg_path ]]; then
unlink $__p9k_cfg_path || return zf_rm -f -- $__p9k_cfg_path || return
fi fi
print -lr -- "$header" "$lines[@]" >$__p9k_cfg_path print -lr -- "$header" "$lines[@]" >$__p9k_cfg_path
} }
@ -1985,7 +2033,7 @@ function check_zshrc_integration() {
local h9='"$ZDOTDIR"/.p10k.zsh' local h9='"$ZDOTDIR"/.p10k.zsh'
local h10='$POWERLEVEL9K_CONFIG_FILE' local h10='$POWERLEVEL9K_CONFIG_FILE'
local h11='"$POWERLEVEL9K_CONFIG_FILE"' local h11='"$POWERLEVEL9K_CONFIG_FILE"'
if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##($f1|$f2|$f3|$f4|$g1|$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|$h8|$h9|$h10|$h11)(|[[:space:]]*|'#'*)} ]]; then if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##(|--[[:space:]]##)($f1|$f2|$f3|$f4|$g1|$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|$h8|$h9|$h10|$h11)(|[[:space:]]*|'#'*)} ]]; then
zshrc_has_cfg=1 zshrc_has_cfg=1
fi fi
local pre='${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh' local pre='${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh'
@ -2067,7 +2115,7 @@ while true; do
unset pure_use_rprompt unset pure_use_rprompt
if [[ $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then if [[ -o multibyte && $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
ask_font || continue ask_font || continue
ask_diamond || continue ask_diamond || continue
if [[ $AWESOME_GLYPHS_LOADED == 1 ]]; then if [[ $AWESOME_GLYPHS_LOADED == 1 ]]; then
@ -2095,6 +2143,9 @@ while true; do
POWERLEVEL9K_MODE=awesome-fontconfig POWERLEVEL9K_MODE=awesome-fontconfig
else else
ask_arrow '\UF0737' || continue ask_arrow '\UF0737' || continue
if (( cap_arrow )); then
ask_width || continue
fi
if (( cap_arrow )); then if (( cap_arrow )); then
POWERLEVEL9K_MODE=nerdfont-v3 POWERLEVEL9K_MODE=nerdfont-v3
else else

Loading…
Cancel
Save