Compare commits

...

479 Commits

Author SHA1 Message Date
Roman Perepelitsa 2b7da93df0 docs: fixup for #2718 10 months ago
Roman Perepelitsa 821b25dc32 Merge branch 'eliwss0-patch-1' 10 months ago
Eli Weiss 4a2ef610ef
Add instructions on setting Conemu font
Add instructions on setting font to MesloLGS NF in Conemu
10 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.
10 months ago
Roman Perepelitsa bde5ca4c2a
docs: the project is on life support 11 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.
11 months ago
Roman Perepelitsa 3395c828b2 docs: mention that vscode terminal does not respect foreground colors chosen by the user by default 11 months ago
Roman Perepelitsa b28d68f44b allow ~/.timewarrior to be a symbolic link (#2603) 12 months ago
Roman Perepelitsa 01e3f0b4ba bump version 12 months ago
Roman Perepelitsa 808ba80ab0 fail more gracefully on timewarrior v3.0.1 (#2648) 12 months ago
Alejandro Armas 178fcda348
Update README.md Fix Typo (#2637)
Removes the extra ')' in the yazi segment meaning
1 year ago
Alexander Blum bcef7cafdf
fixes taskwarrior init data for taskwarrior v3 (#2635) 1 year ago
Roman Perepelitsa aeff1153d4 handle unquoted `prompt` when parsing pyenv.cfg 1 year ago
Roman Perepelitsa 7c2ce29c3f Merge branch 'hodeinavarro-hodei-pyenv-prompt-2628' 1 year 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
1 year ago
Mohammad Al Zouabi da9b03777c
remove duplicate POWERLEVEL9K_DIR_SHOW_WRITABLE from p10k-lean-8colors.zsh (#2610) 1 year ago
Roman Perepelitsa 3fe8706d24 Merge commit '45627c528b4e3d8949a1e5c72ee3fe7cac516d8d' 1 year ago
Roman Perepelitsa 45627c528b Squashed 'gitstatus/' changes from 215063d4..62177e89
62177e89 build: drop -Werror

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

git-subtree-dir: gitstatus
git-subtree-split: 215063d4703b944f66cc7cc92543205586a35485
1 year ago
Roman Perepelitsa d70eedb345 Merge commit 'dec881651ccbd90f7f68b2a2012cf4870741d0dd' 1 year ago
Roman Perepelitsa 36cce9a088 wizard: replace rm with zf_rm (#2504) 1 year ago
Roman Perepelitsa 3cc18b5e08 Merge branch 'oe7drt-openbsd-wizard' 1 year ago
Dominic Reich 44f754d711
use "rm" instead of "unlink" to delete old config file 1 year ago
Roman Perepelitsa 47b0187a67 docs: add a note about `p10k reload` (#2006) 1 year ago
Roman Perepelitsa b9a2d846ef docs: clarify that powerlevel10k does not install new commands (#2498) 1 year 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.
1 year ago
Roman Perepelitsa 9547f22822 s/VCS_GIT_ARCH_ICON/VCS_GIT_ARCHLINUX_ICON/ (#2493) 1 year ago
Roman Perepelitsa c39e5304a1 add VCS_GIT_GITEA_ICON and VCS_GIT_SOURCEHUT_ICON (#2493) 1 year ago
Roman Perepelitsa 096a731db3 define usable defaults for VCS_*_ICON (#2493) 1 year ago
Roman Perepelitsa 783588c17f Merge branch 'add_remotes' of https://github.com/hasecilu/powerlevel10k 1 year ago
Roman Perepelitsa 211c90343f wizard: recognize `source -- ~.p10k.zsh` in .zshrc 1 year 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.
1 year ago
hasecilu 92bee79642
Add icons for VCS_GIT usage
The icons are from organizations that manage a git instance by themselves.
1 year 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) 2 years ago
Roman Perepelitsa 873c4ff09c fix the path to powerlevel10k when installing with homebrew (#2429) 2 years ago
Roman Perepelitsa 215b20e087 bump version 2 years ago
Jussi Timperi be4c68fd0a
add Guix System icon (#2424) 2 years ago
Roman Perepelitsa f8595a35bf use powerlevel10k from homebrew/core when installing with brew 2 years ago
Nanda Lopes 011b8469ab
typo: s/.tool-version/.tool-versions/ in all configs 2 years 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
2 years ago
Roman Perepelitsa f04ce05d92 Merge commit 'd8041e4700ace779aaf42e19c3de2d25a14dbae8' 2 years 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
2 years ago
Roman Perepelitsa 69d726d9fb Merge commit '9401ed17c0a8c3d1654214a204b8d5b5f7ccf386' 2 years 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
2 years ago
Roman Perepelitsa 2d9c1f271b Merge commit '22cb2f79ddb89a368dd823e815fa1b0587ff1b6a' 2 years ago
Alejandro Criado-Pérez 717f9a1881
fix typos in docs and comments 2 years ago
Roman Perepelitsa f851f41fc1 remove MULTIBYTE requirement from the configuration wizard (#2397) 2 years ago
Roman Perepelitsa 9bb15e9ffb docs: rephrase "Git status looks incorrect" section 2 years ago
Roman Perepelitsa ef401ad02a Merge branch 'fzakaria-skip-hash' 2 years 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
2 years ago
Roman Perepelitsa 68104494a7 bump version + cleanup (#2391) 2 years ago
Roman Perepelitsa baf03bf48e Merge branch 'mgkurtz-mgk/rocky' 2 years ago
Markus Kurtz 367c667de6 Add rocky icon to wizard 2 years ago
Markus Kurtz 12aa3fa3c4 Add rocky icon 2 years ago
Roman Perepelitsa 7e9a79f3f1 new segment: per_directory_history (#2384) 2 years ago
Roman Perepelitsa 1d96f5e066 unquote ID in /etc/os-release (#2388) 2 years ago
Roman Perepelitsa e8aa8cce7f unquote ID in /etc/os-release (#2388) 2 years ago
Roman Perepelitsa 646bae0dd6 docs: Terminus is now called Tabby 2 years ago
Roman Perepelitsa 4cc0ea0081 Merge branch 'hugivar-master' 2 years ago
hugo 2453fd27e2
Update README.md as Terminus is now known as Tabby 2 years 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.
2 years ago
Roman Perepelitsa 93d97b7eba better comments 2 years 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.
2 years ago
Roman Perepelitsa 343d4f44e5 Merge branch 'benm-stm-bug/sub-patterns-colors-for-azure' 2 years ago
BEN MANSOUR Mohamed Rafik 0c28fec137 fix pattern coloration for azure defined classes 2 years ago
Roman Perepelitsa 4dca4bdfbb bug fix: honor POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR in instant prompt (#2376) 2 years ago
Roman Perepelitsa 20323d6f8c display `=` in git status if up to date with the remote (#2361) 2 years ago
Roman Perepelitsa 017395a266 release v1.19.0 2 years ago
Koen van Zuijlen ab8bac01e2
Add sparkctl to POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND (#2346) 2 years 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.
2 years ago
Roman Perepelitsa 944f52fc43 move chezmoi_shell in the docs closer to other shell indicator segments 2 years 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.
2 years ago
Roman Perepelitsa c775a3ffd5 Merge branch 'Alkindi42-feat/add-chezmoi-prompt' 2 years ago
Roman Perepelitsa 416bdf1ca3 Merge branch 'feat/add-chezmoi-prompt' of https://github.com/Alkindi42/powerlevel10k into Alkindi42-feat/add-chezmoi-prompt 2 years ago
Alkindi42 3ecef8c6a5 feat(chezmoi): add instant_prompt_chezmoi 2 years ago
Alkindi42 7b19746580 feat: add color and custom icon 2 years ago
kvanzuijlen e4b8925478 Added cert manager cmctl to POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND 2 years ago
Roman Perepelitsa 79753faacb add a comment within .p10k.zsh explaining the use of "_joined" (#2332) 2 years ago
Roman Perepelitsa 3ce7bac4ff Merge branch 'warp' 2 years 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
Roman Perepelitsa 8167383665 wizard bug fix: offer advanced powerline options when using nerdfont-v3 2 years ago
Roman Perepelitsa d031df752b wizard: detect POWERLEVEL9K_MODE=nerdfont-v3
This is Step 2 of https://github.com/romkatv/powerlevel10k/issues/2217#issuecomment-1493271666.
2 years ago
Roman Perepelitsa 6314edf35c wizard: rename capability "arrow" to "quotes" 2 years ago
Roman Perepelitsa 6c82236d6f nerdfonts-v3: add an icon for EndevourOS (#1933) 2 years ago
Roman Perepelitsa 6b50e0918b nerdfonts-v3: use the kubernetes logo as a kubernetes icon (#2184) 2 years ago
Roman Perepelitsa ec1702caf1 nerdfonts-v3: add icons for artix and void linux (#2033) 2 years ago
Roman Perepelitsa f02b8d365b add POWERLEVEL9K_MODE=nerdfont-v3 (#2217)
This is Step 1 of https://github.com/romkatv/powerlevel10k/issues/2217#issuecomment-1493271666.
2 years ago
Roman Perepelitsa 614a6ed1ca display nix_shell if path contains /nix/store/* (#2246) 2 years ago
Roman Perepelitsa cb9788b12a docs: fix zed font instructions 2 years ago
Roman Perepelitsa 7f30a32ee6 Merge branch 'lazarjov-master' 2 years ago
Lazar Jovanovic e2c4e6673f Add manual MesloLGS NF font installation for Zed 2 years ago
Roman Perepelitsa 2aa16c5431 docs: prune the list of kubecontext commands 2 years ago
NatureLR 373337123c Added kubecolor to KUBECONTEXT_SHOW_ON_COMMAND 2 years ago
Roman Perepelitsa a30145b0f8 add an optional parameter to _p9k_upglob to pass glob qualifiers and use it in most cases to restrict globbing to files/directories/links/etc (#2175) 2 years ago
Roman Perepelitsa e7b2bb2372 set POWERLEVEL9K_VPN_IP_INTERFACE to the same value as the default: this adds ZeroTier support 2 years ago
Mehyar e9e94a503a fix the default value of POWERLEVEL9K_VPN_IP_INTERFACE
It was broken by #1730.
2 years ago
Roman Perepelitsa 0adbc1415b fix a silly bug introduced in the last commit (#2170) 2 years ago
Roman Perepelitsa f03d917fb0 fix network interface detection on macos (#2170)
This was broken in #2088.
2 years ago
Roman Perepelitsa 21e89cb61d bust caches 2 years ago
Zoltán Reegn b165fec0ed Add AWS partitions support to EKS kubernetes cluster names
The AWS ARN in govcloud and china looks different to the currently supported
one:

https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/using-govcloud-arns.html
https://docs.amazonaws.cn/en_us/aws/latest/userguide/ARNs.html

This change introduces support for all possible AWS partitions.
2 years ago
James Winegar d1b89dd381 Update README.md
You run containers that are based on images. The container will be deleted, but not the image.
2 years ago
Roman Perepelitsa a066b55f85 don't trust P9K_SSH if it was set with a different TTY (#2154) 2 years ago
Roman Perepelitsa 1a4b01c232 work around a bug in ohmyzsh (#2152)
The bug was introduced here: 3dd83a22a1

This causes Oh My Zsh to print \r to the terminal.
2 years ago
kvanzuijlen 35165798a8 Added kubent to KUBECONTEXT_SHOW_ON_COMMAND 2 years ago
Roman Perepelitsa 33916e91a7 add a missing lf header to p10k-lean.zsh (#2126) 2 years ago
Roman Perepelitsa c08975d0f6 Merge branch 'UtkarshVerma-master' 2 years ago
Utkarsh Verma 07b5a607d4
Add lf segment 2 years ago
Leon Satoshi 7f2950f9cc Update README.md
change from China mainland to  China in Mandarin
2 years ago
Roman Perepelitsa a7bf4c83de docs: add cpu_arch 2 years ago
Roman Perepelitsa edafcb5a7d fix bugs in cpu_arch 2 years ago
Roman Perepelitsa 9f0751c2e3 Merge branch 'clarkcox3-master' 2 years ago
Clark S. Cox 45758d95fb Use "machine" where available for CPU arch
This allows shells on macOS to display more specific CPU arch (e.g. a 64-bit intel machine will display "x86_64" instead of "i386")
2 years ago
Roman Perepelitsa 6609767abd don't invoke mktemp if it doesn't exist 2 years ago
Roman Perepelitsa 8d47270e8c don't invoke mktemp if it doesn't exist 2 years ago
Roman Perepelitsa 176f781121 assume that dotnet version may depend on the content of global.json (#2103) 2 years ago
Roman Perepelitsa cf83ab21e4 fix a bug in zap install instructions and add uninstall instructions (#2093) 2 years ago
Roman Perepelitsa 54798e0c18 Merge branch 'shwcsmack-patch-1' 2 years ago
shwcsmack d5123401be
Add reference to Zap plugin manager
I added a reference in the Readme for my favorite ZSH package manager: Zap
2 years ago
Roman Perepelitsa bc5983543a Merge branch 'ebardie-ebardie/prefer_ip_over_ifconfig' 2 years ago
Jonathan Sambrook 5691a418e0 Prefer `ip` over `ifconfig` for i/f detection.
`ifconfig`'s formatting doesn't cope well with long interface names. In
these cases it will eat up the whitespace separating the name from the
text "Link" in the output, which makes parsing the output problematic.

e.g. `ifconfig`:

    wlp0s20f0u2Link encap:Ethernet  HWaddr 00:AA:BB:CC:DD:EE

v.s `ip`:

   21: wlp0s20f0u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc \
       mq state UP group default qlen 1000

This commit swaps the order of detection inside
`_p9k_prompt_net_iface_async()`, so that `ip` will be preferred.

`ifconfig` is deprecated by distros in favour of `ip`, so this will
often be an incredibly marginal performance boost :)

NOTE: this commit does not address the problem with using `ifconfig`. I
don't understand the zsh regex, so have not touched it.
2 years ago
Roman Perepelitsa 8c55eb4fa3 wizad: add a hint pointing to the frame when asking for frame color 2 years ago
Roman Perepelitsa 5a3109e40d replace POWERLEVEL9K_CHRUBY_SHOW_ENGINE_IF_RUBY with POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN (#2072)
POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN defines a pattern that
RUBY_ENGINE should match for it to be shown. Matching is done
with extended_glob.

For example, to show all values of RUBY_ENGINE except "ruby":

    POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN='^ruby'

If POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN is unset and
POWERLEVEL9K_CHRUBY_SHOW_ENGINE is set to true,
the behavior is the same as if POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN
was set to *.
2 years ago
Roman Perepelitsa f68197a3aa Merge branch 'skipkayhil-rm-ruby-engine-if-ruby' 2 years ago
Hartley McGuire b8c6c6f42f
Add chruby config to hide RUBY_ENGINE when "ruby"
Previously, the chruby segment looks like this for standard and
non-standard ruby implementations respectively:

```
Ruby ruby 3.1.2
Ruby truffleruby 3.0.3
```

While displaying the RUBY_ENGINE is helpful for non-standard
implementations, showing it for "ruby" results in "Ruby ruby" which
feels redundant.

This commit adds a new configuration option to disable showing the
RUBY_ENGINE when it is "ruby". Other values for RUBY_ENGINE will always
display as before:

```
Ruby 3.1.2
Ruby truffleruby 3.0.3
```

This also makes the formatting more similar to the asdf segment:

```
Ruby 3.1.2
Ruby truffleruby-22.3.0
```
2 years ago
Roman Perepelitsa 8091c8a3a8 Merge branch 'mmathys-patch-1' 3 years ago
Roman Perepelitsa e4a94a8ae0 Merge branch 'patch-1' of github.com:mmathys/powerlevel10k into mmathys-patch-1 3 years ago
Roman Perepelitsa ed1b02efd5 Squashed 'gitstatus/' changes from 6dc0738c0..4b47ca047
4b47ca047 docs: s/mainland China/China/
b74da1403 docs: fix grammar
fc27662b4 Merge branch 'andresrinivasan-patch-1'
ad739b2b0 Clarify that gitstatus is included with Powerlevel10k

git-subtree-dir: gitstatus
git-subtree-split: 4b47ca047be1d482dbebec7279386a9365b946c6
3 years ago
Roman Perepelitsa cd47894197 Merge commit 'ed1b02efd5f7691d72cf9b657d939e3adc31034c' 3 years ago
Roman Perepelitsa bd0c9f4ec7 rename arch to cpu_arch and rewrite it (#1752) 3 years ago
Roman Perepelitsa f89b54faf2 Merge branch 'brent-moffit-master' 3 years ago
Roman Perepelitsa 02290d1eb9 Merge branch 'master' of github.com:brent-moffit/powerlevel10k into brent-moffit-master 3 years ago
Max Mathys 3e952468aa
"mainland China" to "China" 3 years ago
Max Mathys efffc87cf5
Rename "mainland China" to "China" 3 years ago
Roman Perepelitsa 5ee784787f fix a bug introduced in cf1b586515 3 years ago
Roman Perepelitsa cf1b586515 fix bugs introduced in 843dcf0167 3 years ago
Roman Perepelitsa 843dcf0167 survive broken FPATH (#10 3 years ago
hayas1 957249a95c Fix gcloud config directory 3 years ago
Roman Perepelitsa 4bbb198a60 fix tables broken by the last commit 3 years ago
Roman Perepelitsa b4a5379be8 Merge branch 'andresrinivasan-patch-1' 3 years ago
Roman Perepelitsa 5ca97df8fe Merge branch 'patch-1' of github.com:andresrinivasan/powerlevel10k into andresrinivasan-patch-1 3 years ago
André Srinivasan 18f939d344 Add references to Antidote
Signed-off-by: André Srinivasan <andre.srinivasan@gmail.com>
3 years ago
Roman Perepelitsa 3bfbb8294f sync fonts.md with README.md 3 years ago
Roman Perepelitsa cbca1bd8c1 docs: set font in Windows Terminal through the Settings UI 3 years ago
Roman Perepelitsa 534ace8773 Merge branch 'phwt-patch-1' 3 years ago
phwt 5d223b8351
docs: update Windows Terminal font configuration 3 years ago
Roman Perepelitsa 0493886837 clarify that quotes are necessary when specifying font name in crostini (#1934) 3 years ago
Roman Perepelitsa f9fd384d8d make zi installation instructions consistent with the rest; fix table formatting 3 years ago
Roman Perepelitsa 4a60348e07 Merge branch '0xMRTT-patch-1' 3 years ago
0xMRTT abc318b608
Add Zi plugin manager to the install list
A more detailled procedure of the installation of powerlevel10k with zi is available at [wiki.zshell.dev](https://wiki.zshell.dev/community/gallery/collection/themes#thp-romkatvpowerlevel10k)
3 years ago
Roman Perepelitsa e72264e01c don't trust cnorm as it's incorrect in some combinations of terminals and terminfo (#1699) 3 years ago
Roman Perepelitsa fd5fa09504 fix toolbox segment (#1916) 3 years ago
Roman Perepelitsa 7704f6b877 Merge branch 'christian-schulze-use-HOST-for-distrobox-detection' 3 years ago
Roman Perepelitsa 64c5f10379 Merge branch 'use-HOST-for-distrobox-detection' of https://github.com/christian-schulze/powerlevel10k into christian-schulze-use-HOST-for-distrobox-detection 3 years ago
Roman Perepelitsa 2dd6a29e4d replace a hyperlink in crostini instructions with regular text (#1934) 3 years ago
Omeir Fawaz 71e4e3288d fix typo in README 3 years ago
Roman Perepelitsa be3724bc80 typo in comments 3 years ago
Roman Perepelitsa 487a388dbd make crostini font instructions stylistically similar to the rest and copy them over to font.md (#1934) 3 years ago
Roman Perepelitsa c1c827e21d Merge branch 'alkis-crostini' 3 years ago
Alkis Evlogimenos 9a3c2f48a4 add Crostini installation instructions 3 years ago
Christian Schulze cb82b1f5d9 use HOST for distrobox detection 3 years ago
Roman Perepelitsa cf67cad465 fix the UNICODE code point for powerline "branch" icon in comments (#1911) 3 years ago
Gerald Turner 0c197ed4a5 battery plugin: Support Linux on Librem5 phone 3 years ago
Roman Perepelitsa 0bef490cda replace fig ads with installation instructions 3 years ago
Roman Perepelitsa 3ed9c1bce1 Merge branch 'ibayramli2001-fig' 3 years ago
Ilkin Bayramli 19bcd37935
Add Fig as an installation method to the README 3 years ago
Roman Perepelitsa 6b128d48d6 update alpine linux installation instructions 3 years ago
Anupam Srivastava 89ecd6539a Fixed minor spelling mistakes 3 years ago
Roman Perepelitsa 5c7ad753a2 add installation instructions for alpine; related: #1828 3 years ago
Roman Perepelitsa a3f6859a8d cleanup 3 years ago
Lucas Larson cf9a1fd02d suppress `nounset` error if `DIRENV_DIR` isn’t defined (fix #1876)
Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
3 years ago
Roman Perepelitsa 74ff02a819 work around a bug in zsh 5.4.1 (#1872)
Here's the bug:

  zsh -fc 'print "${#${x}}"'

This code should print "0" but it prints "1" in zsh 5.4.1.
3 years ago
AdalZanabria 406e6aa9e4 Added missing segments to README without auto-formatting. 3 years ago
AdalZanabria d03058819d Revert "Added missing segments to README." because of auto-formatting.
This reverts commit e65e508743.
3 years ago
AdalZanabria ff531e5f2c Added missing segments to README. 3 years ago
Curtis Vogt 0b02654269 Show kubecontext when using kubeseal or skaffold 3 years ago
Roman Perepelitsa 657e184e0d disable vscode integration; it doesn't work anyway but it makes shell slower
Context: https://github.com/microsoft/vscode/pull/145610#issuecomment-1076519194
3 years ago
Roman Perepelitsa 65599411ec ignore garbage printed by vscode 3 years ago
Roman Perepelitsa e13283ec7d bug fix: strip escape sequences in instant prompt output less aggressively 3 years ago
Roman Perepelitsa f07d7baea3 minor cleanup around perlbrew 3 years ago
Roman Perepelitsa 73698935b8 Merge branch 'lmburns-perlbrew' 3 years ago
Lucas Burns 40a5cdfa6c
chore: forgot to add global variables to main 3 years ago
Lucas Burns b898d1de15
feature: added perlbrew 3 years ago
brent-moffit 59e90bd8b0 Add instant prompt for arch 3 years ago
brent-moffit 01467fae4f Change arch prompt colors to better match default themes 3 years ago
Roman Perepelitsa c0a028351f Squashed 'gitstatus/' changes from f889c13d1..6dc0738c0
6dc0738c0 release v1.5.4
6b3e7cf2f update mbuild script for the new release infra
12b2457ae release v1.5.4

git-subtree-dir: gitstatus
git-subtree-split: 6dc0738c0e5199b0ae47d9693874e7d43c7f8f29
3 years ago
Roman Perepelitsa 123136c0e7 Merge commit 'c0a028351ff9a611c4061938ebd5ec4cafb900eb' 3 years ago
Roman Perepelitsa 5fe28f0a01 bug fix: correctly parse kubectl config when current-context has metacharacters (#1767) 3 years ago
Roman Perepelitsa 4b21cd06ff Squashed 'gitstatus/' changes from b226d8e06..f889c13d1
f889c13d1 build: clean up dragonfly support (#297)
2b6366fbd Merge branch 'msvetlik-dragonflybsd-support'
409c791eb Added detection of DragonflyBSD and tested compilation on v6.2.1

git-subtree-dir: gitstatus
git-subtree-split: f889c13d18fbf6f3109d6889be34d50af04d99b9
3 years ago
Roman Perepelitsa a83e53005f Merge commit '4b21cd06ffeb5706b017c78b13c2eaf40d7deac1' 3 years ago
brent-moffit c5203a3da2 Add `arch` prompt for displaying CPU architecture
Adds the `arch` prompt to `p10k.zsh`, `ARCH_ICON` to `icons.zsh`, and commented entries in the default configs
3 years ago
Roman Perepelitsa 8a676a9157 fix shell integration with kitty 3 years ago
Roman Perepelitsa bee6e09262 Squashed 'gitstatus/' changes from 6eb490ab..b226d8e0
b226d8e0 bug fix: don't crap out when TMPDIR is unset

git-subtree-dir: gitstatus
git-subtree-split: b226d8e060db82ac68f1b00c49d1fc85abdbe56e
3 years ago
Roman Perepelitsa 4f143b7b97 Merge commit 'bee6e09262a6145fc178ddc85c656da4bb83a9a9' 3 years ago
Roman Perepelitsa d6f8c47761 survive broken $TMPDIR 3 years ago
Roman Perepelitsa 5014de0541 Squashed 'gitstatus/' changes from e02d9eed..6eb490ab
6eb490ab survive broken $TMPDIR
94bf4fc2 add ppc64 support to the build script

git-subtree-dir: gitstatus
git-subtree-split: 6eb490ab86118ad063224e4d50b6b05bea7dd12c
3 years ago
Roman Perepelitsa cead0349c5 Merge commit '5014de0541201716dc4ee6f544321ac4e3d7431e' 3 years ago
Roman Perepelitsa 6c71862c5f don't set OS, DEFAULT_COLOR and DEFAULT_COLOR_INVERTED
See #1735.
3 years ago
Roman Perepelitsa 9e0ef918db fix ZeroTier network interface regex
From https://forwardingplane.net/configuration-archive/renaming-interfaces-under-linux/:

> ZeroTier has the inconsistency of using zt* on some platforms and ztublkahlah on others.

They mean zt[0-9]+ and zt[a-z0-9]+.
3 years ago
Roman Perepelitsa 02710eb568 Merge branch 'Mehyar-ALS-patch-1' 3 years ago
Mehyar e511c36ec6
Add ZeroTier to the list of VPNs
ZeroTier users can also see their VPN IP when enabling the vpn_ip option.
3 years ago
Roman Perepelitsa 3d994b033b work around bugs in WSL where it reports more swap being used than the total available (#1724) 3 years ago
Roman Perepelitsa 0f8a77d47d increase the minimum required zsh version from 5.1 to 5.3 (#1722) 3 years ago
Roman Perepelitsa 161f4c1f04 respect VIRTUAL_ENV_PROMPT if its value is different from the default (#1718) 3 years ago
Roman Perepelitsa b8ddcd4c17 docs: clean up font instructions for xterm and copy them to README.md 3 years ago
Roman Perepelitsa c4d3ab0ae0 Merge branch 'pstekl-master' 3 years ago
pstekl 69909a7a1f
Add xterm to font configuration section 3 years ago
Roman Perepelitsa fdbde52c20 docs: sort the table of segments 3 years ago
Roman Perepelitsa 6fae3a169b add toolbox segment to the docs (#1713) 3 years ago
MenkeTechnologies 683a485232 remove duplicate the 3 years ago
Roman Perepelitsa e1c52e08d4 add an icon for amazon linux (#1706) 3 years ago
Andrea Cervesato (TheKoma) fba50d9671 Added gsutil as is the main "other command" in GCP 3 years ago
Roman Perepelitsa 66c0181f76 doc: s/Kitty/kitty/ 3 years ago
Roman Perepelitsa 67ac98d515 doc: kitty v0.24.0 has been released (the first version with shell integration) 3 years ago
Roman Perepelitsa c8160f2954 Squashed 'gitstatus/' changes from f1cf61b24..e02d9eedd
e02d9eedd fix cwd detection when it has weird characters
78c171590 Loongarch support (#290)
be6396b1a fix pkg_add command on openbsd (#282)
f1c89585a avoid ksh if possible (it's broken; see #282)
22407d6fd bug fix: correctly resolve pwd when it contains control chars

git-subtree-dir: gitstatus
git-subtree-split: e02d9eedd9d8f3689e6a6cdccec70b55cf87dca6
3 years ago
Roman Perepelitsa 2079d8ecbe Merge commit 'c8160f29543a2f57ae7149103deefa029fd4e861' 3 years ago
Roman Perepelitsa 3d3b24c419 work around bugs in WSL where it /proc/pid/cwd reports an alias drive 3 years ago
Roman Perepelitsa 7354688123 fix cwd handling when the current dir is '/foo\bar' (#1697) 3 years ago
Roman Perepelitsa dd3dcfaf51 make `toolbox` segment work with distrobox (#1696) 3 years ago
Roman Perepelitsa ced7788012 docs: fix indentation 3 years ago
Roman Perepelitsa ab321a2a03 docs: clean up puTTY font instructions 3 years ago
Roman Perepelitsa d99df7d12d Merge branch 'ajanian-master' 3 years ago
Andrew Janian 0d6202c077 add puTTY to the install section including not about a bug in versions prior to 0.75 3 years ago
Roman Perepelitsa ed70c90c2d fix a bug with URL-escaping for directory links (#1687) 3 years ago
Roman Perepelitsa c9bc2f5a32 fix POWERLEVEL9K_TERM_SHELL_INTEGRATION 3 years ago
Roman Perepelitsa 2e58e3888e add POWERLEVEL9K_TERM_SHELL_INTEGRATION parameter that enables OSC 133 marks 3 years ago
Roman Perepelitsa cde05cfa7b add a link to romkatv/zsh-bench#instant-prompt (should really copy some of that content over to p10k; maybe later) 3 years ago
Roman Perepelitsa 00dd4ae009 docs: shrink "getting started" 3 years ago
Roman Perepelitsa 370535af45 explicitly set LC_ALL when starting docker 3 years ago
Roman Perepelitsa da5a4cdbec add high-level table of contents at the top and low-level table of contents in each section; remove the full table of contents from the bottom 3 years ago
Roman Perepelitsa 83f773caae doc: remove most content from "is it fast to load" section 3 years ago
Roman Perepelitsa 356ce68f69 doc: remove most content from "is it really fast" section 3 years ago
Roman Perepelitsa 6692245f3e hide all screen recordings under <details> in the hope that #anchors will work properly 3 years ago
Roman Perepelitsa 09ece9601f grammar in the instant prompt faq 3 years ago
Roman Perepelitsa 608bd2c88b expand instant prompt faq 3 years ago
Roman Perepelitsa 469baa6221 url-escape dir properly when POWERLEVEL9K_DIR_HYPERLINK is set 3 years ago
Roman Perepelitsa 57d0274b88 fix bugs in dir and several other segments when cwd contains control characters 3 years ago
Roman Perepelitsa 2e8a8f1d63 fix a bug that causes VISUAL_IDENTIFIER_COLOR to leak into content 3 years ago
Roman Perepelitsa a23c4314a1 doc: update "horrific mess when resizing terminal window" section
- Don't say it's a bug in Zsh. It's more complicated than that.
- Mention that the the issue can be avoided by using Kitty.
- Do not mention that the issue can also be avoided by using
  zsh4humans (even though it's true). If you, dear reader, see this,
  give zsh4humans a try.
3 years ago
Roman Perepelitsa 4543076483 when using tmux, write unwrapped OSC 133 in addition to wrapped; the new integrated tmux uses them when resizing 3 years ago
Roman Perepelitsa 3091ffbd86 bust caches 3 years ago
Roman Perepelitsa fde8bf62d4 fix prefix-based formatting of numbers that are slightly below the boundary (#1664) 3 years ago
Roman Perepelitsa abc5df446d attempt to fix asdf when some files have windows line endings (#1653) 3 years ago
Roman Perepelitsa e181bc0653 Squashed 'gitstatus/' changes from e26996460..f1cf61b24
f1cf61b24 work around a bug in IP-guard

git-subtree-dir: gitstatus
git-subtree-split: f1cf61b241a2a34514a8ff5f71dfb79a99d85c7c
3 years ago
Roman Perepelitsa 3380f7503e Merge commit 'e181bc0653ae15ba5730a65b253d499bf22a31bf' 3 years ago
Roman Perepelitsa a9f208c8fc don't auto-start configuration wizard if it's likely that zshrc is broken
This change is an attempt to automate this:
https://github.com/romkatv/powerlevel10k#configuration-wizard-runs-automatically-every-time-zsh-is-started
3 years ago
Zura Kurtanidze 6520323fdb Delete duplicate word "using using"
Hi, I removed duplicate word in the default configuration file
3 years ago
Roman Perepelitsa e2447322e0 Squashed 'gitstatus/' changes from eaf430112..e26996460
e26996460 survive broken shasum
b1825b29a make bash bindings work with nounset

git-subtree-dir: gitstatus
git-subtree-split: e269964607042ef0fdbda2d7af74ef9c8f618cf4
3 years ago
Roman Perepelitsa d281e595b3 Merge commit 'e2447322e0be4eddb84196f05952f91fa3c6f37e' 3 years ago
Roman Perepelitsa a55955c5cf enable bracketed paste when printing instant prompt 4 years ago
Roman Perepelitsa dce00cdb5d docs: typo 4 years ago
Roman Perepelitsa 85e31542dd wizard: underline paths instead of bolding in the success message 4 years ago
Roman Perepelitsa 99edd12e00 grammar 4 years ago
Roman Perepelitsa faddef4a22 add faq entries about enabling direnv and exporting GPG_TTY (#702) 4 years ago
Roman Perepelitsa b4615f5e00 add _p9k__raw_msg for direnv notifications in zsh4humans 4 years ago
Roman Perepelitsa ed0bd29416 Merge commit '1af638543631f2e7db64829c7412ed007047fa81' 4 years ago
Roman Perepelitsa 1af6385436 Squashed 'gitstatus/' changes from cd98a3c2..eaf43011
eaf43011 when downloading gitstatusd, try curl/wget with user configs before trying without (https://github.com/romkatv/powerlevel10k/issues/1606)

git-subtree-dir: gitstatus
git-subtree-split: eaf43011246e359881931647747e8756a73a143a
4 years ago
Roman Perepelitsa 6441a01dd3 survive non-writable $TTY 4 years ago
Roman Perepelitsa edd98053cc disable icanon on the tty after printing instant prompt; this way keys like Ctrl-R and Ctrl-D will get through to zle 4 years ago
Roman Perepelitsa 5acedce0b0 speed up pre-redraw hook 4 years ago
Roman Perepelitsa 3e515a75d2 remove obsolete nordvpn comments 4 years ago
Roman Perepelitsa ed45177e19 fix nordvpn; it was broken by the latest upstream update (#1590) 4 years ago
Charles Timko 0ce9df66d2
Add RHEL to the OS Icon lists (#1581)
* Add RHEL to the OS Icon lists
4 years ago
Roman Perepelitsa 7a72acf563 clean up font instructions for yakuake 4 years ago
Roman Perepelitsa fcfeebfb53 Merge branch 'ilsteiner-patch-1' 4 years ago
Isaac Lebwohl-Steiner 0122a63834
Add instructions to manually set font on Yakuake 4 years ago
Roman Perepelitsa 543e2d59cf change formatting in the font installation instructions to make it more obvious where each step begins and ends 4 years ago
Roman Perepelitsa 0745592886 fix a spello in comments in the generated .p10k.zsh 4 years ago
Roman Perepelitsa 20eb8c64bf Squashed 'gitstatus/' changes from edd92f621..cd98a3c28
cd98a3c28 rebuild gitstatusd-freebsd-amd64 on freebsd 13
b03580cb0 rebuild gitstatusd-freebsd-amd64 (now with proper version)
3c95a47dc update version to v1.5.3
e3a3cd122 rebuild gitstatusd-freebsd-amd64 with clang (#262)
6aed2ae95 compile with clang on freebsd by default (#262)

git-subtree-dir: gitstatus
git-subtree-split: cd98a3c2849600982aa1b7d03f66784710106291
4 years ago
Roman Perepelitsa d2f78d4b29 Merge commit '20eb8c64bf2520e20739610acb503c8729867a5e' 4 years ago
Roman Perepelitsa 4f3d2ffe72 new prompt segment: toolbox (https://github.com/containers/toolbox) #1560 4 years ago
Roman Perepelitsa c5c9178341 update a link to visual-studio-code-font-settings.jpg (now with annotations) 4 years ago
Roman Perepelitsa c2c3171927 extra verbose instructions for vscode font changes 4 years ago
Roman Perepelitsa b5f4d27c74 add a screenshot of vscode font settings 4 years ago
Roman Perepelitsa 2c7241c43d add an extra step to the uninstallation instructions to delete cache files (#1561) 4 years ago
Roman Perepelitsa b3b0efb69f work around bugs in terminals and window managers by essentially disabling prompt_sp (but keeping prompt_cr) in instant prompt for new TTYs 4 years ago
Roman Perepelitsa 10ad57cc6b Squashed 'gitstatus/' changes from 2ecd9907..edd92f62
edd92f62 build: more debug info in case wget fails
1cfcb46c build: add a workaround for systems with broken wget

git-subtree-dir: gitstatus
git-subtree-split: edd92f6210afb16411274e1d6060c6a68bd1e999
4 years ago
Roman Perepelitsa e362b69735 Merge commit '10ad57cc6b73b9ed51474edbd5235e6b5f2fd16b' 4 years ago
Roman Perepelitsa 0a1946b965 bug fix: display the intended battery icon when using legacy configs (#1530) 4 years ago
elProxy 379b97e4e7
Fix after #1544 (#1547)
Well, that's embarassing...
4 years ago
elProxy 277ff8b414
Add support for AWS_REGION with fallback to AWS_DEFAULT_REGION (#1544)
See https://fossies.org/linux/aws-cli/CHANGELOG.rst#section-133
4 years ago
Roman Perepelitsa 80ec734a95 Squashed 'gitstatus/' changes from 845f492f..2ecd9907
2ecd9907 add logging to debug https://github.com/romkatv/powerlevel10k/issues/1477
74010456 add a TODO to fix #254
864f1caf Trim '\w' part of bash prompt. (#253)

git-subtree-dir: gitstatus
git-subtree-split: 2ecd990706255d2000fedbde3b2d2353f63d69a1
4 years ago
Roman Perepelitsa ec44300155 Merge commit '80ec734a953d930838ea6839923c97c3da880a0d' 4 years ago
Roman Perepelitsa 25e5f5985f spello 4 years ago
Roman Perepelitsa 5669c12c66 Revert "add availability to display or not Terraform version"
This reverts commit 20b87731de.
4 years ago
Roman Perepelitsa e7629449c6 spello 4 years ago
Roman Perepelitsa ce7d4a4cd3 Merge branch 'ptavares-master' 4 years ago
Patrick Tavares 6aeb13b08a add terraform_version segment to the list of available segments 4 years ago
Patrick Tavares 20b87731de add availability to display or not Terraform version
Show Terraform version segment only when *.tf files are present in current directory
4 years ago
Eric Nielsen 32e76e7721
Update README.md (#1532)
with new changed from version 1.5.0 of Zim.
4 years ago
ahillio 46a3e51896
readme: make 2steps for oh-my-zsh installation explicit. (#1526) 4 years ago
Roman Perepelitsa 799c22f63b Squashed 'gitstatus/' changes from 1edd9e62..845f492f
845f492f build: target march armv8-a instead of armv8
cf21109b build: respect CXX environment variable

git-subtree-dir: gitstatus
git-subtree-split: 845f492f777af84e50b9a4820c7b08729c841f0c
4 years ago
Roman Perepelitsa 8f798f986a Merge commit '799c22f63b93e9d1ab8f01473bf9ebd2e9750f43' 4 years ago
Roman Perepelitsa e3c8529052 doc: typo 4 years ago
NickVeld c23f3c3c10
README: Windows Terminal "default"->"defaults" key (#1499) 4 years ago
Roman Perepelitsa 5e1c1caeb1 doc: spello 4 years ago
Roman Perepelitsa 70ae5810d8 Squashed 'gitstatus/' changes from 0440e38b..1edd9e62
1edd9e62 build: respect standard compiler/linker env vars and fortify by default

git-subtree-dir: gitstatus
git-subtree-split: 1edd9e621ec5c8bf038767e529194b5c53b36352
4 years ago
Roman Perepelitsa a38a1f5be1 Merge commit '70ae5810d81f941a93e2077a2aa080f341deb96e' 4 years ago
Roman Perepelitsa 83d80fa308 don't leak 'state' local parameter 4 years ago
Roman Perepelitsa 2c135dd631 make terraform_version consistent with other *_version segments (#1487) 4 years ago
Roman Perepelitsa 942c4cf640 Merge branch 'alexganwd-master' 4 years ago
Alejandro Gandara dae5f7f1c9 * Added cache to terraform --version 4 years ago
Alejandro Gandara 9f98915167 * Added new module for showing in prompt the active terraform version.
* Prompt shows, the terraform version in this format: Terraform v0.12.13 . If only if a valid terraform command is used, or an alias to it.

The use case: We have a need to constantly change between terraform versions depending on what project we are working on, it is easy to by mistake upgrade the wrong project to the latest terraform version. This is why the prompt is shown in red as soon as you type terraform, this is a good way to remind you to double check this is the terraform version you want to use.

Future improvements:
Detect current terraform version by checking the terraform workspace state version, and change the terraform color prompt from red to green if you're using the same version.
4 years ago
Alejandro Gandara f717a91f55 * Added new module for showing in prompt the active terraform version.
* Prompt shows, the terraform version in this format: Terraform v0.12.13 . If only if a valid terraform command is used, or an alias to it.

The use case: We have a need to constantly change between terraform versions depending on what project we are working on, it is easy to by mistake upgrade the wrong project to the latest terraform version. This is why the prompt is shown in red as soon as you type terraform, this is a good way to remind you to double check this is the terraform version you want to use.

Future improvements:
Detect current terraform version by checking the terraform workspace state version, and change the terraform color prompt from red to green if you're using the same version.
4 years ago
Chris Williams 1e7be00e04
show kubecontext show for 'flux' (#1480)
Support for flux v2 CLI

Co-authored-by: Chris Williams <chris.williams@amwell.com>
4 years ago
Roman Perepelitsa 4bcc519547 add 'minify' make target 4 years ago
Roman Perepelitsa 077abf95e0 Squashed 'gitstatus/' changes from 4b4226ca..0440e38b
0440e38b sort files lexicographically
1c3157e9 don't minify from pkg target

git-subtree-dir: gitstatus
git-subtree-split: 0440e38b336aaf992aabf3649bf4a7f65f396c0a
4 years ago
Roman Perepelitsa 05d71fe82c Merge commit '077abf95e0a3c6325a6cdd9761cab75b2f5468c6' 4 years ago
Roman Perepelitsa 63a009669a Squashed 'gitstatus/' changes from 68bf9e0d..4b4226ca
4b4226ca add 'minify' make target and invoke it from 'pkg'

git-subtree-dir: gitstatus
git-subtree-split: 4b4226ca86fef6d0491ab9e863c9df6864dc9642
4 years ago
Roman Perepelitsa 7f4a2741b5 Merge commit '63a009669a7ed6aa6040f0af008adfb62829188c' 4 years ago
Roman Perepelitsa 7759063b74 Squashed 'gitstatus/' changes from 76182238..68bf9e0d
68bf9e0d build: generate byte-for-byte identical gitstatusd if the compiler supports -ffile-prefix-map
d03e8edc add support for s390x architecture
b32bea51 add a few architectures to the build script
7001409e bash: escape non-printable ANSI sequences (#247)

git-subtree-dir: gitstatus
git-subtree-split: 68bf9e0da3695ae989d523527643bef3f88e86ea
4 years ago
Roman Perepelitsa f4668bc194 Merge commit '7759063b7485ca0701fc8ba1961d0e53568ddd59' 4 years ago
Roman Perepelitsa 3213e2e17f docs: grammar 4 years ago
Roman Perepelitsa fd7313a5e7 replace @{u} with @{upstream} in the docs (it's the same thing but clearer) 4 years ago
Roman Perepelitsa 0c862a1307 add zwc make target 4 years ago
Roman Perepelitsa f1ff680487 Squashed 'gitstatus/' changes from 260a5f4b..76182238
76182238 add zwc make target
ea398d90 update libgit2 ref (https://github.com/romkatv/powerlevel10k/issues/1428)

git-subtree-dir: gitstatus
git-subtree-split: 7618223859f614a76ed8019f1a60ee3df18984cf
4 years ago
Roman Perepelitsa 73eff3a033 Merge commit 'f1ff6804871d47381b9bd398a60f4c77174fd1d3' 4 years ago
Roman Perepelitsa c003c253e8 respect POWERLEVEL9K_INSTANT_PROMPT_COMMAND_LINES if it is explicitly set even when using z4h 4 years ago
Roman Perepelitsa 515422c727 fix a bug that can cause instant prompt to be duplicated in z4h 4 years ago
Roman Perepelitsa 67f494cf54 docs: cross-link two faq entries 4 years ago
Roman Perepelitsa 606d4a85a9 readme: update git commands for ahead/behind arrows 4 years ago
Roman Perepelitsa 717573d845 presume that `node --version` may depend on package.json (#1388) 4 years ago
Roman Perepelitsa a49f90d3ba cleanup 4 years ago
Roman Perepelitsa 4e4c14927f update windows terminal font instructions to accound for the fact that they've changed the default settings.json (#1443) 4 years ago
Roman Perepelitsa 2e0989c018 Merge commit '038de6f78b21171615d0b4628471e71efe10d77e' 4 years ago
Roman Perepelitsa 038de6f78b Squashed 'gitstatus/' changes from 96b520b2..260a5f4b
260a5f4b fix a bug in the build script that prevented it from working when using a newer git with init.defaultBranch override in the global config (#242)

git-subtree-dir: gitstatus
git-subtree-split: 260a5f4bc9776d41d500a51464249ce5e555a99e
4 years ago
Roman Perepelitsa f5d61840ae Merge commit '96f3ca173331c5dba505d2ef5106cb0d605ec3be' 4 years ago
Roman Perepelitsa 96f3ca1733 Squashed 'gitstatus/' changes from 113f1f69..96b520b2
96b520b2 build v1.5.1 binaries for all platforms
ffeb0507 bump version to v1.5.1
1bcbea07 mbuild: disable pacman upgrades on msys
39dbb92f log a warning if unable to parse packed-refs
a9d70ec0 add `-r` flag to gitstatus_start in bash bindings (#241)
abbf9a79 don't use static_assert with one argument as it's not available prior to c++17 (#239)
f8c396e4 drop all tags if packed-refs doesn't have a header line (https://github.com/romkatv/powerlevel10k/issues/1428)

git-subtree-dir: gitstatus
git-subtree-split: 96b520b248ca872646e27b3df4535898356e4637
4 years ago
Roman Perepelitsa 4ba3c010f6 display "wip" in git status if the latest commit's summary contains "wip" or "WIP" (#1425) 4 years ago
Roman Perepelitsa b9c62ca028 cleanup 4 years ago
Roman Perepelitsa ba83466e1d Squashed 'gitstatus/' changes from 6d00edd0..113f1f69
113f1f69 release gitstatusd-linux-x86_64 v1.5.0
e193be52 expose HEAD's commit message
815301f1 do not redefine `exec` and `builtin` in bash bindings (#235)
97c2aa17 Make `--version-glob` to receive an argument (#216)
95e549fd Support building on OpenBSD (#208)
b054ddf2 make homebrew instructions work on systems other than darwin-x86_64 (#205)
98f99ade fix brew formula check

git-subtree-dir: gitstatus
git-subtree-split: 113f1f698667d12906d97e3818aec5d760dc6e3d
4 years ago
Roman Perepelitsa f217e4a39a Merge commit 'ba83466e1da75d9260ebbb145215d9c46d6eadf6' 4 years ago
Roman Perepelitsa 77fa0e6dcc clarify that Windows Terminal is the one from Microsoft 4 years ago
Mark Adamson d87d557b0f
Correct name of Windows Terminal in README (#1424) 4 years ago
Roman Perepelitsa c7ad00b5a5 add P9K_AWS_PROFILE and P9K_AWS_REGION and use it in default configs 4 years ago
Roman Perepelitsa 10918387b3 Merge branch 'alexjurkiewicz-aws-region' 4 years ago
Alex Jurkiewicz aa4d366341 Add region support for aws element 4 years ago
Zachary Palumbo 35acee119d
Fix icon padding for VCS bookmark icon (#1414) (#1415) 4 years ago
Roman Perepelitsa c59720647a fix asdf, was broken by 1ad8e5759e (#1409) 4 years ago
Roman Perepelitsa a3494a52d7 don't leak 'token' local variable in parser (#1407) 4 years ago
Roman Perepelitsa f774df6c76 pyenv: skip lines that start with "#" (#1376) 4 years ago
Roman Perepelitsa 69d3650958 hide python version in pyenv in lean/classic/rainbow if the rest of the content starts with it (#1376) 4 years ago
Roman Perepelitsa 1ad8e5759e when searching for files in ancestor directories, do match in $HOME (#1376) 4 years ago
Roman Perepelitsa 4d2346da0a set P9K_PYENV_PYTHON_VERSION correctly when dealing with multiple pyenv versions (#1376) 4 years ago
Roman Perepelitsa 0ab7e1ccfd when resolving `python --version`, handle pyenv shims specially (#1378) 4 years ago
Maxim Baz 9c034101fe
Add xplr segment (#1396) 4 years ago
Roman Perepelitsa f924646194 add P9K_IP_{RX,TX}_BYTES_DELTA to the list of parameters available within POWERLEVEL9K_IP_CONTENT_EXPANSION (#1392) 4 years ago
Roman Perepelitsa 8d1daa4e63 disable colors in the output of taskwarrior; this time for real (#1365) 4 years ago
Roman Perepelitsa b69bb45ab1 disable colors in the output of taskwarrior (#1365) 4 years ago
Roman Perepelitsa 48ff2e8065 fix style in font instructions 4 years ago
alsoGAMER 836332f578
Font instructions for Asbrú Connection Manager (#1362) 4 years ago
Roman Perepelitsa 607befe822 bump version (#1361) 4 years ago
Roman Perepelitsa cd865da150 expand c-escapes in kubectl (#1361) 4 years ago
Roman Perepelitsa b55ad16bdf bug fix: segments whose state contains numbers could not be hidden (#1353) 4 years ago
Roman Perepelitsa 30bd9461b3 replace POWERLEVEL9K_LOAD_THRESHOLD with POWERLEVEL9K_LOAD_{WARNING,CRITICAL}_PCT (#1340) 4 years ago
Tim Ysewyn 8dc91004cb
Fix gcloud CLI (#1342)
This reverts #1324 (d3de2e5).
4 years ago
Klas Mellbourn 8b2aab74d4
Add CPU load threshold setting (#1340) 4 years ago
Éverton Arruda 4d15cf977e
Get active gcloud profile using `list` command (#1331)
`gcloud config configure describe` command does not have `--filter` option. To filter
the active profile using `--filter` it is necessary to use `gcloud config configure list`
command
4 years ago
Paweł Cembaluk af86b53047
Added urxvt to manual font installation section. (#1326) 4 years ago
Roman Perepelitsa eafd78c3e0 respect POWERLEVEL9K_SHORTEN_DIR_LENGTH when POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_last 4 years ago
Ramon Lucas d3de2e558c
Sets the filter for the current gcloud profile (#1324)
When you have multiple profiles set up, you should only search for what is currently active.
4 years ago
Daniel 58f5470cd9
Add font configuration instructions for WezTerm (#1313) 4 years ago
Roman Perepelitsa 7d786b9c50 remove all CR from prompt (#1304 and #1305) 4 years ago
Roman Perepelitsa d28e84ca70 don't display git tag when on a branch (#1294) 4 years ago
wzy 6d545d5dd0
Fix #1286 (#1288) 4 years ago
bcochofel 3920940ea8
add fluxctl and stern to show kubecontext (#1268) 4 years ago
bcochofel 6a7115b35b
add azure classes (#1274) 4 years ago
Roman Perepelitsa b816abfed0 work around bugs in add-zle-hook-widget (#1238) 4 years ago
Dhananjay Tanpure d26bdcd601
Added wlan(w) to regular expression of network interfaces. (#1224)
Name of network interface is generally wlan0 or wlp3s0.
4 years ago
Jaehee Hong 7b0698debf
README Homebrew installation script fix (#1222)
make homebrew installation instructions work on darwin-arm64 and linux
4 years ago
Thomas Lauf 68abcc86d4
Change icon for the timewarrior segment to '' (#1217)
Icon was changed in c65260aaab from '🛡️' to ''
4 years ago
Roman Perepelitsa 00232d1b6d doc cleanup 4 years ago
Roman Perepelitsa a2695675e6 Merge branch 'joxxperez-master' 4 years ago
Roman Perepelitsa a20dcd0284 Merge branch 'master' of https://github.com/joxxperez/powerlevel10k into joxxperez-master 4 years ago
Roman Perepelitsa 4fa8943960 doc cleanup 4 years ago
Roman Perepelitsa f0af094382 Merge branch 'YorkGrizzly-master' 4 years ago
Roman Perepelitsa eadc0d7653 Merge branch 'master' of https://github.com/YorkGrizzly/powerlevel10k into YorkGrizzly-master 4 years ago
Julio Carlos Barrera Juez 33f20f5eae
Add tailscale in VPN network interface regex. (#1208) 4 years ago
joxxperez a43748d427
Add font installation instructions for WSLtty 4 years ago
YorkGrizzly 8bafd1a2ee
Update font.md 4 years ago
YorkGrizzly ea97f031b4
Update font.md 4 years ago
YorkGrizzly 29f16b61e6
Update font.md 4 years ago
Roman Perepelitsa d524164020 scroll the screen before printing prompt 4 years ago
Roman Perepelitsa 0513e0fee4 simplify `uname -m` matching on Windows platforms 4 years ago
Roman Perepelitsa 59db4252bb uncomment BACKGROUND and FOREGROUND parameters in p10k-classic.zsh; comments confuse users (#1182) 4 years ago
Roman Perepelitsa dd62469cc7 fix ram segment on darwin-arm64 (#1181)
Darwin arm64 uses 16kB pages rather than 4kB.

Thanks, @johnalanwoods!
4 years ago
Osman Tas 61c63eea6b
Update os icon at zsh.exe on git for windows (#1180)
* Update os icon for windows

Windows icon is not shown on git for windows zsh.exe
Same update also added to wizards.zsh file.

* Update os icon for windows

Windows icon is not shown on git for windows zsh.exe
Same update also added to p10k.zsh file.
4 years ago
Roman Perepelitsa 5ea5d4bc19 disable re_match_pcre, otherwise we can get an error when users enable this option without having zsh/pcre module 4 years ago
Roman Perepelitsa 9609a835ca Squashed 'gitstatus/' changes from 630915cc..6d00edd0
6d00edd0 use a native binary on darwin-arm64
4994f160 add a build server for darwin-arm64
0e922813 invoke port with sudo
576571c7 support macports in addition to homebrew when building on macos
b476570a remove trailing whitespace

git-subtree-dir: gitstatus
git-subtree-split: 6d00edd0bfd1d65a3cbcebfc6e679e8c43726acc
4 years ago
Roman Perepelitsa 9c3ecab81e Merge commit '9609a835ca2eb3089e35269a05369833e9ec0ba2' 4 years ago
Roman Perepelitsa 033e01a272 docs: more info about greyed out vcs 4 years ago
Samuel Gräfenstein 38a5492b5f
Remove trailing whitespace (#1173) 4 years ago
Roman Perepelitsa a5d0525c6a refactor my_git_formatter to make it easier to change it so that tag is always displayed 4 years ago
Roman Perepelitsa 4807bd8da2 doc cleanup 4 years ago
Roman Perepelitsa 7a6eef4918 docs: make `p10k configure` method of installing MesloLGS NF for iTerm2 more prominent 4 years ago

@ -2,6 +2,13 @@ ZSH := $(shell command -v zsh 2> /dev/null)
all:
pkg:
$(MAKE) -C gitstatus pkg
zwc:
$(MAKE) -C gitstatus zwc
$(or $(ZSH),:) -fc 'for f in *.zsh-theme internal/*.zsh; do zcompile -R -- $$f.zwc $$f || exit; done'
minify:
$(MAKE) -C gitstatus minify
rm -rf -- .git .gitattributes .gitignore LICENSE Makefile README.md font.md powerlevel10k.png
pkg: zwc
$(MAKE) -C gitstatus pkg

File diff suppressed because it is too large Load Diff

@ -20,7 +20,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
autoload -Uz is-at-least && is-at-least 5.1 || return
[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
@ -65,23 +65,30 @@
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/)
kubecontext # current kubernetes context (https://kubernetes.io/)
terraform # terraform workspace (https://www.terraform.io)
# terraform_version # terraform version (https://www.terraform.io)
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
gcloud # google cloud cli account and project (https://cloud.google.com/)
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
toolbox # toolbox name (https://github.com/containers/toolbox)
context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
# vi_mode # vi mode (you don't need this if you've enabled prompt_char)
# vpn_ip # virtual private network indicator
# load # CPU load
@ -91,6 +98,8 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture
# time # current time
# =========================[ Line #2 ]=========================
newline # \n
@ -137,7 +146,7 @@
# Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or
# '─'. The last two make it easier to see the alignment between left and right prompt and to
# separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
# for more compact prompt if using using this option.
# for more compact prompt if using this option.
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND=
@ -162,6 +171,9 @@
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
# Separator between different-color segments on the right.
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
# To remove a separator between two segments, add "_joined" to the second segment name.
# For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined)
# The right end of left prompt.
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
# The left end of right prompt.
@ -231,7 +243,7 @@
.java-version
.perl-version
.php-version
.tool-version
.tool-versions
.shorten_folder_marker
.svn
.terraform
@ -337,7 +349,7 @@
# typeset -g POWERLEVEL9K_DIR_PREFIX='%248Fin '
#####################################[ vcs: git status ]######################################
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
# Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
# Untracked files icon. It's really a question mark, your font isn't broken.
@ -346,7 +358,7 @@
# Formatter for Git status.
#
# Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
# Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
#
# You can edit the function to customize how Git status looks.
#
@ -379,36 +391,55 @@
fi
local res
local where # branch or tag
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}"
where=${(V)VCS_STATUS_LOCAL_BRANCH}
elif [[ -n $VCS_STATUS_TAG ]]; then
res+="${meta}#"
where=${(V)VCS_STATUS_TAG}
local branch=${(V)VCS_STATUS_LOCAL_BRANCH}
# If local branch name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line.
(( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
fi
# If local branch name or tag is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line.
(( $#where > 32 )) && where[13,-13]="…"
res+="${clean}${where//\%/%%}" # escape %
if [[ -n $VCS_STATUS_TAG
# Show tag only if not on a branch.
# Tip: To always show tag, delete the next line.
&& -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
]]; then
local tag=${(V)VCS_STATUS_TAG}
# If tag name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show tag name in full without truncation, delete the next line.
(( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
res+="${meta}#${clean}${tag//\%/%%}"
fi
# Display the current Git commit if there is no branch or tag.
# Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line.
[[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
# Display the current Git commit if there is no branch and no tag.
# Tip: To always display the current Git commit, delete the next line.
[[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
# Show tracking branch name if it differs from local branch.
if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
fi
# Display "wip" if the latest commit's summary contains "wip" or "WIP".
if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then
res+=" ${modified}wip"
fi
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
# ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}"
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
# Tip: Uncomment the next line to display '=' if up to date with the remote.
# res+=" ${clean}="
fi
# ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}"
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
# ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@ -698,6 +729,12 @@
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
# Yazi shell color.
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178
# Custom icon.
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
@ -705,6 +742,18 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
# lf shell color.
typeset -g POWERLEVEL9K_LF_FOREGROUND=72
# Custom icon.
# typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
# xplr shell color.
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
# Custom icon.
# typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########################[ vim_shell: vim shell indicator (:sh) ]###########################
# Vim shell indicator color.
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
@ -721,12 +770,21 @@
# Nix shell color.
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
# Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
# typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
# chezmoi shell color.
typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33
# Custom icon.
# typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
@ -753,9 +811,8 @@
# Text and color for insert vi mode.
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################################[ ram: free RAM ]#######################################
# RAM color.
@ -820,7 +877,7 @@
##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############
# Taskwarrior color.
typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74
# Taskwarrior segment format. The following parameters are available within the expansion.
#
# - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`.
@ -837,6 +894,30 @@
# Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
# Color when using local/global history.
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
# Custom icon.
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
################################[ cpu_arch: CPU architecture ]################################
# CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
# Hide the segment when on a specific CPU architecture.
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=
# Custom icon.
# typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################################[ context: user@hostname ]##################################
# Context color when running with privileges.
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
@ -925,10 +1006,10 @@
#
# The default format has the following logic:
#
# 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not
# empty and unequal to $P9K_CONTENT.
# 2. Otherwise display just "$P9K_CONTENT".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}'
# 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
# starts with "$P9K_PYENV_PYTHON_VERSION/".
# 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
# Custom icon.
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -962,6 +1043,11 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
# If set to false, hide node version if it's the same as default:
# $(nvm version current) == $(nvm version default).
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
# If set to false, hide node version if it's equal to "system".
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
# Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1111,6 +1197,16 @@
# Custom icon.
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
# Perlbrew color.
typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
# Show perlbrew version only when in a perl project subdirectory.
typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
# Don't show "perl-" at the front.
typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
# Custom icon.
# typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
# PHP color.
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
@ -1184,10 +1280,16 @@
typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
# typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
#############[ terraform_version: terraform version (https://www.terraform.io) ]##############
# Terraform version color.
typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38
# Custom icon.
# typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the 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.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile'
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@ -1272,9 +1374,9 @@
# typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%248Fat '
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the 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.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current AWS profile gets matched.
@ -1306,6 +1408,12 @@
typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
# typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# AWS segment format. The following parameters are available within the expansion.
#
# - P9K_AWS_PROFILE The name of the current AWS profile.
# - P9K_AWS_REGION The region associated with the current AWS profile.
typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}'
#[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
# AWS Elastic Beanstalk environment color.
typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70
@ -1313,18 +1421,47 @@
# typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
# Show azure only when the 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.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current azure account name gets matched.
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
# you'll see this value in your prompt. The second element of each pair in
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
# first match wins.
#
# For example, given these settings:
#
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
# '*prod*' PROD
# '*test*' TEST
# '*' OTHER)
#
# If your current azure account is "company_test", its class is TEST because "company_test"
# doesn't match the pattern '*prod*' but does match '*test*'.
#
# You can define different colors, icons and content expansions for different classes:
#
# typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
# '*prod*' PROD # These values are examples that are unlikely
# '*test*' TEST # to match your needs. Customize them as needed.
'*' OTHER)
# Azure account name color.
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
# Custom icon.
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the the command you are typing invokes one of these tools.
# Show gcloud only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show gcloud.
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
# Google cloud color.
typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
@ -1363,7 +1500,7 @@
# typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
#[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
# Show google_app_cred only when the the command you are typing invokes one of these tools.
# Show google_app_cred only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show google_app_cred.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
@ -1416,6 +1553,16 @@
# Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
# Toolbox color.
typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178
# Don't display the name of the toolbox if it matches fedora-toolbox-*.
typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
# Custom icon.
# typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.
# typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%248Fin '
###############################[ public_ip: public IP address ]###############################
# Public IP color.
typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
@ -1430,7 +1577,7 @@
typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
# Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
# to see the name of the interface.
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*'
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'
# If set to true, show one segment per matching network interface. If set to false, show only
# one segment corresponding to the first matching network interface.
# Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
@ -1444,17 +1591,19 @@
# The following parameters are accessible within the expansion:
#
# Parameter | Meaning
# ----------------------+---------------
# P9K_IP_IP | IP address
# P9K_IP_INTERFACE | network interface
# P9K_IP_RX_BYTES | total number of bytes received
# P9K_IP_TX_BYTES | total number of bytes sent
# P9K_IP_RX_RATE | receive rate (since last prompt)
# P9K_IP_TX_RATE | send rate (since last prompt)
# ----------------------+-------------------------------------------
# P9K_IP_IP | IP address
# P9K_IP_INTERFACE | network interface
# P9K_IP_RX_BYTES | total number of bytes received
# P9K_IP_TX_BYTES | total number of bytes sent
# P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt
# P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt
# P9K_IP_RX_RATE | receive rate (since last prompt)
# P9K_IP_TX_RATE | send rate (since last prompt)
typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP'
# Show information for the first network interface whose name matches this regular expression.
# Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
typeset -g POWERLEVEL9K_IP_INTERFACE='e.*'
typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
# Custom icon.
# typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1528,7 +1677,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
# is to generate the prompt segment for display in instant prompt. See
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
#
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@ -1564,7 +1713,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.

@ -20,7 +20,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
autoload -Uz is-at-least && is-at-least 5.1 || return
[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
@ -65,23 +65,30 @@
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/)
kubecontext # current kubernetes context (https://kubernetes.io/)
terraform # terraform workspace (https://www.terraform.io)
# terraform_version # terraform version (https://www.terraform.io)
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
gcloud # google cloud cli account and project (https://cloud.google.com/)
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
toolbox # toolbox name (https://github.com/containers/toolbox)
context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
# vpn_ip # virtual private network indicator
# load # CPU load
# disk_usage # disk usage
@ -90,6 +97,8 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture
# time # current time
# =========================[ Line #2 ]=========================
newline # \n
@ -225,7 +234,7 @@
.java-version
.perl-version
.php-version
.tool-version
.tool-versions
.shorten_folder_marker
.svn
.terraform
@ -268,10 +277,6 @@
# the full directory that was used in previous commands.
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
# Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and
# POWERLEVEL9K_DIR_CLASSES below.
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2
# Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
# and POWERLEVEL9K_DIR_CLASSES below.
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
@ -335,7 +340,7 @@
# typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '
#####################################[ vcs: git status ]######################################
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
# Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
# Untracked files icon. It's really a question mark, your font isn't broken.
@ -344,7 +349,7 @@
# Formatter for Git status.
#
# Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
# Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
#
# You can edit the function to customize how Git status looks.
#
@ -377,36 +382,55 @@
fi
local res
local where # branch or tag
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}"
where=${(V)VCS_STATUS_LOCAL_BRANCH}
elif [[ -n $VCS_STATUS_TAG ]]; then
res+="${meta}#"
where=${(V)VCS_STATUS_TAG}
local branch=${(V)VCS_STATUS_LOCAL_BRANCH}
# If local branch name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line.
(( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
fi
# If local branch name or tag is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line.
(( $#where > 32 )) && where[13,-13]="…"
res+="${clean}${where//\%/%%}" # escape %
if [[ -n $VCS_STATUS_TAG
# Show tag only if not on a branch.
# Tip: To always show tag, delete the next line.
&& -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
]]; then
local tag=${(V)VCS_STATUS_TAG}
# If tag name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show tag name in full without truncation, delete the next line.
(( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
res+="${meta}#${clean}${tag//\%/%%}"
fi
# Display the current Git commit if there is no branch or tag.
# Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line.
[[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
# Display the current Git commit if there is no branch and no tag.
# Tip: To always display the current Git commit, delete the next line.
[[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
# Show tracking branch name if it differs from local branch.
if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
fi
# Display "wip" if the latest commit's summary contains "wip" or "WIP".
if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then
res+=" ${modified}wip"
fi
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
# ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}"
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
# Tip: Uncomment the next line to display '=' if up to date with the remote.
# res+=" ${clean}="
fi
# ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}"
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
# ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@ -469,7 +493,7 @@
# Show status of repositories of these types. You can add svn and/or hg if you are
# using them. If you do, your prompt may become slow even when your current directory
# isn't in an svn or hg reposotiry.
# isn't in an svn or hg repository.
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
# These settings are used for repositories other than Git or when gitstatusd fails and
@ -696,6 +720,12 @@
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
# Yazi shell color.
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3
# Custom icon.
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
@ -703,6 +733,18 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
# lf shell color.
typeset -g POWERLEVEL9K_LF_FOREGROUND=3
# Custom icon.
# typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
# xplr shell color.
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=3
# Custom icon.
# typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########################[ vim_shell: vim shell indicator (:sh) ]###########################
# Vim shell indicator color.
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=3
@ -719,12 +761,21 @@
# Nix shell color.
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=4
# Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
# typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
# chezmoi shell color.
typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=4
# Custom icon.
# typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=2
@ -801,7 +852,7 @@
##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############
# Taskwarrior color.
typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=6
# Taskwarrior segment format. The following parameters are available within the expansion.
#
# - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`.
@ -818,6 +869,30 @@
# Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
# Color when using local/global history.
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=5
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=3
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
# Custom icon.
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
################################[ cpu_arch: CPU architecture ]################################
# CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=3
# Hide the segment when on a specific CPU architecture.
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=
# Custom icon.
# typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################################[ context: user@hostname ]##################################
# Context color when running with privileges.
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1
@ -906,10 +981,10 @@
#
# The default format has the following logic:
#
# 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not
# empty and unequal to $P9K_CONTENT.
# 2. Otherwise display just "$P9K_CONTENT".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}'
# 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
# starts with "$P9K_PYENV_PYTHON_VERSION/".
# 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
# Custom icon.
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -943,6 +1018,11 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=2
# If set to false, hide node version if it's the same as default:
# $(nvm version current) == $(nvm version default).
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
# If set to false, hide node version if it's equal to "system".
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
# Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1092,6 +1172,16 @@
# Custom icon.
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
# Perlbrew color.
typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
# Show perlbrew version only when in a perl project subdirectory.
typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
# Don't show "perl-" at the front.
typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
# Custom icon.
# typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
# PHP color.
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=5
@ -1133,9 +1223,9 @@
# typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the 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.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile'
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@ -1252,10 +1342,16 @@
typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4
# typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
#############[ terraform_version: terraform version (https://www.terraform.io) ]##############
# Terraform version color.
typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=4
# Custom icon.
# typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the 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.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current AWS profile gets matched.
@ -1287,6 +1383,12 @@
typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=3
# typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# AWS segment format. The following parameters are available within the expansion.
#
# - P9K_AWS_PROFILE The name of the current AWS profile.
# - P9K_AWS_REGION The region associated with the current AWS profile.
typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}'
#[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
# AWS Elastic Beanstalk environment color.
typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2
@ -1294,18 +1396,47 @@
# typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
# Show azure only when the 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.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current azure account name gets matched.
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
# you'll see this value in your prompt. The second element of each pair in
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
# first match wins.
#
# For example, given these settings:
#
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
# '*prod*' PROD
# '*test*' TEST
# '*' OTHER)
#
# If your current azure account is "company_test", its class is TEST because "company_test"
# doesn't match the pattern '*prod*' but does match '*test*'.
#
# You can define different colors, icons and content expansions for different classes:
#
# typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
# '*prod*' PROD # These values are examples that are unlikely
# '*test*' TEST # to match your needs. Customize them as needed.
'*' OTHER)
# Azure account name color.
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=4
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=4
# Custom icon.
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the the command you are typing invokes one of these tools.
# Show gcloud only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show gcloud.
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
# Google cloud color.
typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=4
@ -1344,7 +1475,7 @@
# typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
#[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
# Show google_app_cred only when the the command you are typing invokes one of these tools.
# Show google_app_cred only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show google_app_cred.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
@ -1397,6 +1528,16 @@
# Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
# Toolbox color.
typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=3
# Don't display the name of the toolbox if it matches fedora-toolbox-*.
typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
# Custom icon.
# typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.
# typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin '
###############################[ public_ip: public IP address ]###############################
# Public IP color.
typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=6
@ -1411,7 +1552,7 @@
typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
# Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
# to see the name of the interface.
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*'
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'
# If set to true, show one segment per matching network interface. If set to false, show only
# one segment corresponding to the first matching network interface.
# Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
@ -1425,17 +1566,19 @@
# The following parameters are accessible within the expansion:
#
# Parameter | Meaning
# ----------------------+---------------
# P9K_IP_IP | IP address
# P9K_IP_INTERFACE | network interface
# P9K_IP_RX_BYTES | total number of bytes received
# P9K_IP_TX_BYTES | total number of bytes sent
# P9K_IP_RX_RATE | receive rate (since last prompt)
# P9K_IP_TX_RATE | send rate (since last prompt)
# ----------------------+-------------------------------------------
# P9K_IP_IP | IP address
# P9K_IP_INTERFACE | network interface
# P9K_IP_RX_BYTES | total number of bytes received
# P9K_IP_TX_BYTES | total number of bytes sent
# P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt
# P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt
# P9K_IP_RX_RATE | receive rate (since last prompt)
# P9K_IP_TX_RATE | send rate (since last prompt)
typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %2F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %3F⇡$P9K_IP_TX_RATE}'
# Show information for the first network interface whose name matches this regular expression.
# Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
typeset -g POWERLEVEL9K_IP_INTERFACE='e.*'
typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
# Custom icon.
# typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1509,7 +1652,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
# is to generate the prompt segment for display in instant prompt. See
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
#
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@ -1545,7 +1688,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.

@ -20,7 +20,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
autoload -Uz is-at-least && is-at-least 5.1 || return
[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
@ -65,23 +65,30 @@
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/)
kubecontext # current kubernetes context (https://kubernetes.io/)
terraform # terraform workspace (https://www.terraform.io)
# terraform_version # terraform version (https://www.terraform.io)
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
gcloud # google cloud cli account and project (https://cloud.google.com/)
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
toolbox # toolbox name (https://github.com/containers/toolbox)
context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
# vpn_ip # virtual private network indicator
# load # CPU load
# disk_usage # disk usage
@ -90,6 +97,8 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture
# time # current time
# =========================[ Line #2 ]=========================
newline
@ -225,7 +234,7 @@
.java-version
.perl-version
.php-version
.tool-version
.tool-versions
.shorten_folder_marker
.svn
.terraform
@ -331,7 +340,7 @@
# typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '
#####################################[ vcs: git status ]######################################
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
# Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
# Untracked files icon. It's really a question mark, your font isn't broken.
@ -340,7 +349,7 @@
# Formatter for Git status.
#
# Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
# Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
#
# You can edit the function to customize how Git status looks.
#
@ -373,36 +382,55 @@
fi
local res
local where # branch or tag
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}"
where=${(V)VCS_STATUS_LOCAL_BRANCH}
elif [[ -n $VCS_STATUS_TAG ]]; then
res+="${meta}#"
where=${(V)VCS_STATUS_TAG}
local branch=${(V)VCS_STATUS_LOCAL_BRANCH}
# If local branch name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line.
(( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
fi
# If local branch name or tag is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line.
(( $#where > 32 )) && where[13,-13]="…"
res+="${clean}${where//\%/%%}" # escape %
if [[ -n $VCS_STATUS_TAG
# Show tag only if not on a branch.
# Tip: To always show tag, delete the next line.
&& -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
]]; then
local tag=${(V)VCS_STATUS_TAG}
# If tag name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show tag name in full without truncation, delete the next line.
(( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
res+="${meta}#${clean}${tag//\%/%%}"
fi
# Display the current Git commit if there is no branch or tag.
# Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line.
[[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
# Display the current Git commit if there is no branch and no tag.
# Tip: To always display the current Git commit, delete the next line.
[[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
# Show tracking branch name if it differs from local branch.
if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
fi
# Display "wip" if the latest commit's summary contains "wip" or "WIP".
if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then
res+=" ${modified}wip"
fi
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
# ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}"
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
# Tip: Uncomment the next line to display '=' if up to date with the remote.
# res+=" ${clean}="
fi
# ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}"
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
# ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@ -465,7 +493,7 @@
# Show status of repositories of these types. You can add svn and/or hg if you are
# using them. If you do, your prompt may become slow even when your current directory
# isn't in an svn or hg reposotiry.
# isn't in an svn or hg repository.
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
# These settings are used for repositories other than Git or when gitstatusd fails and
@ -692,6 +720,12 @@
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
# Yazi shell color.
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178
# Custom icon.
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
@ -699,6 +733,18 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
# lf shell color.
typeset -g POWERLEVEL9K_LF_FOREGROUND=72
# Custom icon.
# typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
# xplr shell color.
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
# Custom icon.
# typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########################[ vim_shell: vim shell indicator (:sh) ]###########################
# Vim shell indicator color.
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
@ -715,12 +761,21 @@
# Nix shell color.
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
# Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
# typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
# Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
# chezmoi shell color.
typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33
# Custom icon.
# typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage.
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
@ -797,7 +852,7 @@
##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############
# Taskwarrior color.
typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74
# Taskwarrior segment format. The following parameters are available within the expansion.
#
# - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`.
@ -814,6 +869,30 @@
# Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
# Color when using local/global history.
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
# Custom icon.
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
################################[ cpu_arch: CPU architecture ]################################
# CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
# Hide the segment when on a specific CPU architecture.
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=
# Custom icon.
# typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################################[ context: user@hostname ]##################################
# Context color when running with privileges.
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
@ -902,10 +981,10 @@
#
# The default format has the following logic:
#
# 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not
# empty and unequal to $P9K_CONTENT.
# 2. Otherwise display just "$P9K_CONTENT".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}'
# 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
# starts with "$P9K_PYENV_PYTHON_VERSION/".
# 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
# Custom icon.
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -939,6 +1018,11 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color.
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
# If set to false, hide node version if it's the same as default:
# $(nvm version current) == $(nvm version default).
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
# If set to false, hide node version if it's equal to "system".
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
# Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1088,6 +1172,16 @@
# Custom icon.
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
# Perlbrew color.
typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
# Show perlbrew version only when in a perl project subdirectory.
typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
# Don't show "perl-" at the front.
typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
# Custom icon.
# typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
# PHP color.
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
@ -1129,9 +1223,9 @@
# typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the 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.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile'
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@ -1248,10 +1342,16 @@
typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
# typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
#############[ terraform_version: terraform version (https://www.terraform.io) ]##############
# Terraform version color.
typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38
# Custom icon.
# typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the 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.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current AWS profile gets matched.
@ -1283,6 +1383,12 @@
typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
# typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# AWS segment format. The following parameters are available within the expansion.
#
# - P9K_AWS_PROFILE The name of the current AWS profile.
# - P9K_AWS_REGION The region associated with the current AWS profile.
typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}'
#[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
# AWS Elastic Beanstalk environment color.
typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70
@ -1290,18 +1396,47 @@
# typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
# Show azure only when the 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.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current azure account name gets matched.
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
# you'll see this value in your prompt. The second element of each pair in
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
# first match wins.
#
# For example, given these settings:
#
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
# '*prod*' PROD
# '*test*' TEST
# '*' OTHER)
#
# If your current azure account is "company_test", its class is TEST because "company_test"
# doesn't match the pattern '*prod*' but does match '*test*'.
#
# You can define different colors, icons and content expansions for different classes:
#
# typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
# '*prod*' PROD # These values are examples that are unlikely
# '*test*' TEST # to match your needs. Customize them as needed.
'*' OTHER)
# Azure account name color.
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
# Custom icon.
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the the command you are typing invokes one of these tools.
# Show gcloud only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show gcloud.
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
# Google cloud color.
typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
@ -1340,7 +1475,7 @@
# typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
#[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
# Show google_app_cred only when the the command you are typing invokes one of these tools.
# Show google_app_cred only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show google_app_cred.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
@ -1393,6 +1528,16 @@
# Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
# Toolbox color.
typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178
# Don't display the name of the toolbox if it matches fedora-toolbox-*.
typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
# Custom icon.
# typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.
# typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin '
###############################[ public_ip: public IP address ]###############################
# Public IP color.
typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
@ -1407,7 +1552,7 @@
typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
# Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
# to see the name of the interface.
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*'
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'
# If set to true, show one segment per matching network interface. If set to false, show only
# one segment corresponding to the first matching network interface.
# Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
@ -1421,17 +1566,19 @@
# The following parameters are accessible within the expansion:
#
# Parameter | Meaning
# ----------------------+---------------
# P9K_IP_IP | IP address
# P9K_IP_INTERFACE | network interface
# P9K_IP_RX_BYTES | total number of bytes received
# P9K_IP_TX_BYTES | total number of bytes sent
# P9K_IP_RX_RATE | receive rate (since last prompt)
# P9K_IP_TX_RATE | send rate (since last prompt)
# ----------------------+-------------------------------------------
# P9K_IP_IP | IP address
# P9K_IP_INTERFACE | network interface
# P9K_IP_RX_BYTES | total number of bytes received
# P9K_IP_TX_BYTES | total number of bytes sent
# P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt
# P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt
# P9K_IP_RX_RATE | receive rate (since last prompt)
# P9K_IP_TX_RATE | send rate (since last prompt)
typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}'
# Show information for the first network interface whose name matches this regular expression.
# Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
typeset -g POWERLEVEL9K_IP_INTERFACE='e.*'
typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
# Custom icon.
# typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1505,7 +1652,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
# is to generate the prompt segment for display in instant prompt. See
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
#
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@ -1541,7 +1688,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.

@ -29,7 +29,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
autoload -Uz is-at-least && is-at-least 5.1 || return
[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# Prompt colors.
local grey=242
@ -169,7 +169,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.

@ -20,7 +20,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
autoload -Uz is-at-least && is-at-least 5.1 || return
[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
@ -65,23 +65,30 @@
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/)
kubecontext # current kubernetes context (https://kubernetes.io/)
terraform # terraform workspace (https://www.terraform.io)
# terraform_version # terraform version (https://www.terraform.io)
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
gcloud # google cloud cli account and project (https://cloud.google.com/)
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
toolbox # toolbox name (https://github.com/containers/toolbox)
context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
yazi # yazi shell (https://github.com/sxyazi/yazi)
nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
# vi_mode # vi mode (you don't need this if you've enabled prompt_char)
# vpn_ip # virtual private network indicator
# load # CPU load
@ -91,6 +98,8 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
per_directory_history # Oh My Zsh per-directory-history local/global indicator
# cpu_arch # CPU architecture
# time # current time
# =========================[ Line #2 ]=========================
newline
@ -137,7 +146,7 @@
# Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or
# '─'. The last two make it easier to see the alignment between left and right prompt and to
# separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
# for more compact prompt if using using this option.
# for more compact prompt if using this option.
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND=
@ -159,6 +168,9 @@
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
# Separator between different-color segments on the right.
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
# To remove a separator between two segments, add "_joined" to the second segment name.
# For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined)
# The right end of left prompt.
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
# The left end of right prompt.
@ -231,7 +243,7 @@
.java-version
.perl-version
.php-version
.tool-version
.tool-versions
.shorten_folder_marker
.svn
.terraform
@ -340,14 +352,14 @@
# typeset -g POWERLEVEL9K_DIR_PREFIX='in '
#####################################[ vcs: git status ]######################################
# Version control system colors.
# typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2
# typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3
# typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2
# typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3
# typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
# Version control background colors.
typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2
typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3
typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2
typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3
typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8
# Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
# Untracked files icon. It's really a question mark, your font isn't broken.
@ -356,7 +368,7 @@
# Formatter for Git status.
#
# Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
# Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
#
# You can edit the function to customize how Git status looks.
#
@ -380,36 +392,55 @@
local conflicted='%1F' # red foreground
local res
local where # branch or tag
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}"
where=${(V)VCS_STATUS_LOCAL_BRANCH}
elif [[ -n $VCS_STATUS_TAG ]]; then
res+="${meta}#"
where=${(V)VCS_STATUS_TAG}
local branch=${(V)VCS_STATUS_LOCAL_BRANCH}
# If local branch name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line.
(( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
fi
# If local branch name or tag is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line.
(( $#where > 32 )) && where[13,-13]="…"
res+="${clean}${where//\%/%%}" # escape %
if [[ -n $VCS_STATUS_TAG
# Show tag only if not on a branch.
# Tip: To always show tag, delete the next line.
&& -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
]]; then
local tag=${(V)VCS_STATUS_TAG}
# If tag name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show tag name in full without truncation, delete the next line.
(( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
res+="${meta}#${clean}${tag//\%/%%}"
fi
# Display the current Git commit if there is no branch or tag.
# Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line.
[[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
# Display the current Git commit if there is no branch and no tag.
# Tip: To always display the current Git commit, delete the next line.
[[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
# Show tracking branch name if it differs from local branch.
if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
fi
# Display "wip" if the latest commit's summary contains "wip" or "WIP".
if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then
res+=" ${modified}wip"
fi
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
# ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}"
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
# Tip: Uncomment the next line to display '=' if up to date with the remote.
# res+=" ${clean}="
fi
# ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}"
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
# ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
@ -468,7 +499,7 @@
# Show status of repositories of these types. You can add svn and/or hg if you are
# using them. If you do, your prompt may become slow even when your current directory
# isn't in an svn or hg reposotiry.
# isn't in an svn or hg repository.
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
##########################[ status: exit code of the last command ]###########################
@ -480,37 +511,37 @@
# it will signify success by turning green.
typeset -g POWERLEVEL9K_STATUS_OK=true
typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
# typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2
# typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0
typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2
typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0
# Status when some part of a pipe command fails but the overall exit status is zero. It may look
# like this: 1|0.
typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true
typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
# typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2
# typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0
typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2
typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0
# Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as
# it will signify error by turning red.
typeset -g POWERLEVEL9K_STATUS_ERROR=true
typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
# typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3
# typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1
typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3
typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1
# Status when the last command was terminated by a signal.
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
# Use terse signal names: "INT" instead of "SIGINT(2)".
typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
# typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3
# typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1
# Status when some part of a pipe command fails and the overall exit status is also non-zero.
# It may look like this: 1|0.
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
# typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3
# typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1
###################[ command_execution_time: duration of the last command ]###################
# Execution time color.
@ -529,8 +560,8 @@
#######################[ background_jobs: presence of background jobs ]#######################
# Background jobs color.
# typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6
# typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0
# Don't show the number of background jobs.
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
# Custom icon.
@ -538,8 +569,8 @@
#######################[ direnv: direnv status (https://direnv.net/) ]########################
# Direnv color.
# typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3
# typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0
typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3
typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -703,8 +734,8 @@
##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########
# NordVPN connection indicator color.
# typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7
# typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4
typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7
typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4
# Hide NordVPN connection indicator when not connected.
typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=
typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=
@ -713,36 +744,60 @@
#################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################
# Ranger shell color.
# typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3
# typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3
typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
# Yazi shell color.
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3
typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
# typeset -g POWERLEVEL9K_NNN_FOREGROUND=0
# typeset -g POWERLEVEL9K_NNN_BACKGROUND=6
typeset -g POWERLEVEL9K_NNN_FOREGROUND=0
typeset -g POWERLEVEL9K_NNN_BACKGROUND=6
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
# lf shell color.
typeset -g POWERLEVEL9K_LF_FOREGROUND=0
typeset -g POWERLEVEL9K_LF_BACKGROUND=6
# Custom icon.
# typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
# xplr shell color.
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=0
typeset -g POWERLEVEL9K_XPLR_BACKGROUND=6
# Custom icon.
# typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########################[ vim_shell: vim shell indicator (:sh) ]###########################
# Vim shell indicator color.
# typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0
# typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0
typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2
# Custom icon.
# typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
# Midnight Commander shell color.
# typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3
# typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0
typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3
typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'
#[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##
# Nix shell color.
# typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0
# typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0
typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4
# Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
# typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
@ -750,14 +805,21 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
# chezmoi shell color.
typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=0
typeset -g POWERLEVEL9K_CHEZMOI_SHELL_BACKGROUND=4
# Custom icon.
# typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################################[ disk_usage: disk usage ]##################################
# Colors for different levels of disk usage.
# typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3
# typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0
# typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0
# typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3
# typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7
# typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0
typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0
typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3
typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7
typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1
# Thresholds for different levels of disk usage (percentage points).
typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
@ -781,18 +843,20 @@
# Text and color for insert vi mode.
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8
# Custom icon.
# typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################################[ ram: free RAM ]#######################################
# RAM color.
# typeset -g POWERLEVEL9K_RAM_FOREGROUND=0
# typeset -g POWERLEVEL9K_RAM_BACKGROUND=3
typeset -g POWERLEVEL9K_RAM_FOREGROUND=0
typeset -g POWERLEVEL9K_RAM_BACKGROUND=3
# Custom icon.
# typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'
#####################################[ swap: used swap ]######################################
# Swap color.
# typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0
# typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3
typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0
typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3
# Custom icon.
# typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -800,21 +864,21 @@
# Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.
typeset -g POWERLEVEL9K_LOAD_WHICH=5
# Load color when load is under 50%.
# typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0
# typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2
typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0
typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2
# Load color when load is between 50% and 70%.
# typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0
# typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3
typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0
typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3
# Load color when load is over 70%.
# typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0
# typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1
typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0
typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1
# Custom icon.
# typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'
################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################
# Todo color.
# typeset -g POWERLEVEL9K_TODO_FOREGROUND=0
# typeset -g POWERLEVEL9K_TODO_BACKGROUND=8
typeset -g POWERLEVEL9K_TODO_FOREGROUND=0
typeset -g POWERLEVEL9K_TODO_BACKGROUND=8
# Hide todo when the total number of tasks is zero.
typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true
# Hide todo when the number of tasks after filtering is zero.
@ -838,8 +902,8 @@
###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############
# Timewarrior color.
# typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255
# typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8
typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255
typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8
# If the tracked task is longer than 24 characters, truncate and append "…".
# Tip: To always display tasks without truncation, delete the following parameter.
@ -852,8 +916,8 @@
##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############
# Taskwarrior color.
# typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0
# typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6
typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0
typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6
# Taskwarrior segment format. The following parameters are available within the expansion.
#
@ -871,6 +935,33 @@
# Custom icon.
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
# Color when using local/global history.
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=0
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_BACKGROUND=5
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=0
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_BACKGROUND=3
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
# Custom icon.
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
################################[ cpu_arch: CPU architecture ]################################
# CPU architecture color.
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=0
typeset -g POWERLEVEL9K_CPU_ARCH_BACKGROUND=3
# Hide the segment when on a specific CPU architecture.
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=
# Custom icon.
# typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################################[ context: user@hostname ]##################################
# Context color when running with privileges.
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1
@ -900,8 +991,8 @@
###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
# Python virtual environment color.
# typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0
# typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0
typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4
# Don't show Python version next to the virtual environment name.
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
# If set to "false", won't show virtualenv if pyenv is already shown.
@ -914,8 +1005,8 @@
#####################[ anaconda: conda environment (https://conda.io/) ]######################
# Anaconda environment color.
# typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0
# typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4
typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0
typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4
# Anaconda segment format. The following parameters are available within the expansion.
#
@ -948,8 +1039,8 @@
################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################
# Pyenv color.
# typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0
# typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4
typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0
typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4
# Hide python version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)
# If set to false, hide python version if it's the same as global:
@ -965,18 +1056,18 @@
#
# The default format has the following logic:
#
# 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not
# empty and unequal to $P9K_CONTENT.
# 2. Otherwise display just "$P9K_CONTENT".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}'
# 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
# starts with "$P9K_PYENV_PYTHON_VERSION/".
# 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
# Custom icon.
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
# Goenv color.
# typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0
# typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4
typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0
typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4
# Hide go version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)
# If set to false, hide go version if it's the same as global:
@ -989,8 +1080,8 @@
##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########
# Nodenv color.
# typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2
# typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0
typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2
typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0
# Hide node version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)
# If set to false, hide node version if it's the same as global:
@ -1003,15 +1094,20 @@
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
# Nvm color.
# typeset -g POWERLEVEL9K_NVM_FOREGROUND=0
# typeset -g POWERLEVEL9K_NVM_BACKGROUND=5
typeset -g POWERLEVEL9K_NVM_FOREGROUND=0
typeset -g POWERLEVEL9K_NVM_BACKGROUND=5
# If set to false, hide node version if it's the same as default:
# $(nvm version current) == $(nvm version default).
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
# If set to false, hide node version if it's equal to "system".
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
# Custom icon.
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############
# Nodeenv color.
# typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2
# typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0
typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2
typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0
# Don't show Node version next to the environment name.
typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false
# Separate environment name from Node version only with a space.
@ -1021,8 +1117,8 @@
##############################[ node_version: node.js version ]###############################
# Node version color.
# typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7
# typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2
typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7
typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2
# Show node version only when in a directory tree containing package.json.
typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
# Custom icon.
@ -1030,8 +1126,8 @@
#######################[ go_version: go version (https://golang.org) ]########################
# Go version color.
# typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255
# typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2
typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255
typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2
# Show go version only when in a go project subdirectory.
typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
# Custom icon.
@ -1039,8 +1135,8 @@
#################[ rust_version: rustc version (https://www.rust-lang.org) ]##################
# Rust version color.
# typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0
# typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208
typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0
typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208
# Show rust version only when in a rust project subdirectory.
typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
# Custom icon.
@ -1048,8 +1144,8 @@
###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################
# .NET version color.
# typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7
# typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5
typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7
typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5
# Show .NET version only when in a .NET project subdirectory.
typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true
# Custom icon.
@ -1073,8 +1169,8 @@
#############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############
# Rbenv color.
# typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0
# typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1
typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0
typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1
# Hide ruby version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)
# If set to false, hide ruby version if it's the same as global:
@ -1098,8 +1194,8 @@
###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####
# Package color.
# typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0
# typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6
typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0
typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6
# Package format. The following parameters are available within the expansion.
#
@ -1113,8 +1209,8 @@
#######################[ rvm: ruby version from rvm (https://rvm.io) ]########################
# Rvm color.
# typeset -g POWERLEVEL9K_RVM_FOREGROUND=0
# typeset -g POWERLEVEL9K_RVM_BACKGROUND=240
typeset -g POWERLEVEL9K_RVM_FOREGROUND=0
typeset -g POWERLEVEL9K_RVM_BACKGROUND=240
# Don't show @gemset at the end.
typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false
# Don't show ruby- at the front.
@ -1124,15 +1220,15 @@
###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############
# Fvm color.
# typeset -g POWERLEVEL9K_FVM_FOREGROUND=0
# typeset -g POWERLEVEL9K_FVM_BACKGROUND=4
typeset -g POWERLEVEL9K_FVM_FOREGROUND=0
typeset -g POWERLEVEL9K_FVM_BACKGROUND=4
# Custom icon.
# typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########
# Lua color.
# typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0
# typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4
typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0
typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4
# Hide lua version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)
# If set to false, hide lua version if it's the same as global:
@ -1145,8 +1241,8 @@
###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################
# Java color.
# typeset -g POWERLEVEL9K_JENV_FOREGROUND=1
# typeset -g POWERLEVEL9K_JENV_BACKGROUND=7
typeset -g POWERLEVEL9K_JENV_FOREGROUND=1
typeset -g POWERLEVEL9K_JENV_BACKGROUND=7
# Hide java version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)
# If set to false, hide java version if it's the same as global:
@ -1159,8 +1255,8 @@
###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############
# Perl color.
# typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0
# typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4
typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0
typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4
# Hide perl version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)
# If set to false, hide perl version if it's the same as global:
@ -1171,10 +1267,20 @@
# Custom icon.
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
# Perlbrew color.
typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
# Show perlbrew version only when in a perl project subdirectory.
typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
# Don't show "perl-" at the front.
typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
# Custom icon.
# typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
# PHP color.
# typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0
# typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0
typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5
# Hide php version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)
# If set to false, hide php version if it's the same as global:
@ -1187,8 +1293,8 @@
#######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######
# Scala color.
# typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=0
# typeset -g POWERLEVEL9K_SCALAENV_BACKGROUND=1
typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=0
typeset -g POWERLEVEL9K_SCALAENV_BACKGROUND=1
# Hide scala version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)
# If set to false, hide scala version if it's the same as global:
@ -1201,8 +1307,8 @@
##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########
# Haskell color.
# typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0
# typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3
typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0
typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3
# Hide haskell version if it doesn't come from one of these sources.
#
@ -1250,10 +1356,20 @@
typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0
# typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
#############[ terraform_version: terraform version (https://www.terraform.io) ]##############
# Terraform version color.
typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=4
typeset -g POWERLEVEL9K_TERRAFORM_VERSION_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
################[ terraform_version: It shows active terraform version (https://www.terraform.io) ]#################
typeset -g POWERLEVEL9K_TERRAFORM_VERSION_SHOW_ON_COMMAND='terraform|tf'
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the 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.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile'
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
@ -1340,9 +1456,9 @@
# typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at '
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the 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.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current AWS profile gets matched.
@ -1371,34 +1487,70 @@
# '*prod*' PROD # These values are examples that are unlikely
# '*test*' TEST # to match your needs. Customize them as needed.
'*' DEFAULT)
# typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7
# typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1
typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7
typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1
# typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# AWS segment format. The following parameters are available within the expansion.
#
# - P9K_AWS_PROFILE The name of the current AWS profile.
# - P9K_AWS_REGION The region associated with the current AWS profile.
typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}'
#[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
# AWS Elastic Beanstalk environment color.
# typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2
# typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0
typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2
typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
# Show azure only when the 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.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current azure account name gets matched.
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
# you'll see this value in your prompt. The second element of each pair in
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
# first match wins.
#
# For example, given these settings:
#
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
# '*prod*' PROD
# '*test*' TEST
# '*' OTHER)
#
# If your current azure account is "company_test", its class is TEST because "company_test"
# doesn't match the pattern '*prod*' but does match '*test*'.
#
# You can define different colors, icons and content expansions for different classes:
#
# typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2
# typeset -g POWERLEVEL9K_AZURE_TEST_BACKGROUND=0
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
# '*prod*' PROD # These values are examples that are unlikely
# '*test*' TEST # to match your needs. Customize them as needed.
'*' OTHER)
# Azure account name color.
# typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7
# typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=7
typeset -g POWERLEVEL9K_AZURE_OTHER_BACKGROUND=4
# Custom icon.
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the the command you are typing invokes one of these tools.
# Show gcloud only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show gcloud.
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
# Google cloud color.
# typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7
# typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4
typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7
typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4
# Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or
# POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative
@ -1435,7 +1587,7 @@
# typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
#[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
# Show google_app_cred only when the the command you are typing invokes one of these tools.
# Show google_app_cred only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show google_app_cred.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
@ -1469,8 +1621,8 @@
# '*:*prod*:*' PROD # These values are examples that are unlikely
# '*:*test*:*' TEST # to match your needs. Customize them as needed.
'*' DEFAULT)
# typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7
# typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4
# typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by
@ -1489,23 +1641,34 @@
# Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
# Toolbox color.
typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=0
typeset -g POWERLEVEL9K_TOOLBOX_BACKGROUND=3
# Don't display the name of the toolbox if it matches fedora-toolbox-*.
typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
# Custom icon.
# typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.
# typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='in '
###############################[ public_ip: public IP address ]###############################
# Public IP color.
# typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7
# typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0
typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7
typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
########################[ vpn_ip: virtual private network indicator ]#########################
# VPN IP color.
# typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0
# typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6
typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0
typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6
# When on VPN, show just an icon without the IP address.
# Tip: To display the private IP address when on VPN, remove the next line.
typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
# Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
# to see the name of the interface.
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*'
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'
# If set to true, show one segment per matching network interface. If set to false, show only
# one segment corresponding to the first matching network interface.
# Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
@ -1520,24 +1683,26 @@
# The following parameters are accessible within the expansion:
#
# Parameter | Meaning
# ----------------------+---------------
# P9K_IP_IP | IP address
# P9K_IP_INTERFACE | network interface
# P9K_IP_RX_BYTES | total number of bytes received
# P9K_IP_TX_BYTES | total number of bytes sent
# P9K_IP_RX_RATE | receive rate (since last prompt)
# P9K_IP_TX_RATE | send rate (since last prompt)
# ----------------------+-------------------------------------------
# P9K_IP_IP | IP address
# P9K_IP_INTERFACE | network interface
# P9K_IP_RX_BYTES | total number of bytes received
# P9K_IP_TX_BYTES | total number of bytes sent
# P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt
# P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt
# P9K_IP_RX_RATE | receive rate (since last prompt)
# P9K_IP_TX_RATE | send rate (since last prompt)
typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP'
# Show information for the first network interface whose name matches this regular expression.
# Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
typeset -g POWERLEVEL9K_IP_INTERFACE='e.*'
typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
# Custom icon.
# typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
#########################[ proxy: system-wide http/https/ftp proxy ]##########################
# Proxy color.
# typeset -g POWERLEVEL9K_PROXY_FOREGROUND=4
# typeset -g POWERLEVEL9K_PROXY_BACKGROUND=0
typeset -g POWERLEVEL9K_PROXY_FOREGROUND=4
typeset -g POWERLEVEL9K_PROXY_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1553,12 +1718,12 @@
typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')
# Don't show the remaining time to charge/discharge.
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
# typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0
typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0
#####################################[ wifi: wifi speed ]#####################################
# WiFi color.
# typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0
# typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4
typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0
typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4
# Custom icon.
# typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'
@ -1584,8 +1749,8 @@
####################################[ time: current time ]####################################
# Current time color.
# typeset -g POWERLEVEL9K_TIME_FOREGROUND=0
# typeset -g POWERLEVEL9K_TIME_BACKGROUND=7
typeset -g POWERLEVEL9K_TIME_FOREGROUND=0
typeset -g POWERLEVEL9K_TIME_BACKGROUND=7
# Format for the current time: 09:51:02. See `man 3 strftime`.
typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
# If set to true, time will update when you hit enter. This way prompts for the past
@ -1609,7 +1774,7 @@
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
# is to generate the prompt segment for display in instant prompt. See
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
#
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
@ -1627,7 +1792,8 @@
}
# User-defined prompt segments can be customized the same way as built-in segments.
# typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=3
typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=3
typeset -g POWERLEVEL9K_EXAMPLE_BACKGROUND=1
# typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
@ -1645,7 +1811,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.

@ -24,7 +24,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
autoload -Uz is-at-least && is-at-least 5.1 || return
[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# Left prompt segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(prompt_char dir vcs)
@ -87,7 +87,7 @@
# it incompatible with your zsh configuration files.
# - quiet: Enable instant prompt and don't print warnings when detecting console output
# during zsh initialization. Choose this if you've read and understood
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
# https://github.com/romkatv/powerlevel10k#instant-prompt.
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.

@ -8,77 +8,160 @@ systems.
*FAQ*: [How was the recommended font created?](README.md#how-was-the-recommended-font-created)
#### Automatic font installation
## Automatic font installation
If you are using iTerm2 or Termux, `p10k configure` can install the recommended font for you.
Simply answer `Yes` when asked whether to install *Meslo Nerd Font*.
If you are using a different terminal, proceed with manual font installation. 👇
#### Manual font installation
## Manual font installation
Download these four ttf files:
- [MesloLGS NF Regular.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf)
- [MesloLGS NF Bold.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf)
- [MesloLGS NF Italic.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf)
- [MesloLGS NF Bold Italic.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf)
Double-click on each file and click "Install". This will make `MesloLGS NF` font available to all
applications on your system. Configure your terminal to use this font:
- **iTerm2**: Open *iTerm2 → Preferences → Profiles → Text* and set *Font* to `MesloLGS NF`.
Alternatively, type `p10k configure` and answer `Yes` when asked whether to install
*Meslo Nerd Font*.
- **Apple Terminal**: Open *Terminal → Preferences → Profiles → Text*, click *Change* under *Font*
and select `MesloLGS NF` family.
- **Hyper**: Open *Hyper → Edit → Preferences* and change the value of `fontFamily` under
`module.exports.config` to `MesloLGS NF`.
- **Visual Studio Code**: Open *File → Preferences → Settings*, enter
`terminal.integrated.fontFamily` in the search box and set the value to `MesloLGS NF`.
- **GNOME Terminal** (the default Ubuntu terminal): Open *Terminal → Preferences* and click on the
selected profile under *Profiles*. Check *Custom font* under *Text Appearance* and select
`MesloLGS NF Regular`.
- **Konsole**: Open *Settings → Edit Current Profile → Appearance*, click *Select Font* and select
`MesloLGS NF Regular`.
- **Tilix**: Open *Tilix → Preferences* and click on the selected profile under *Profiles*. Check
*Custom font* under *Text Appearance* and select `MesloLGS NF Regular`.
- **Windows Console Host** (the old thing): Click the icon in the top left corner, then
*Properties → Font* and set *Font* to `MesloLGS NF`.
- **Microsoft Terminal** (the new thing): Open *Settings* (`Ctrl+,`), search for `fontFace` and set
value to `MesloLGS NF` for every profile.
- **IntelliJ**: Open *Intellij → Edit → Preferences → Editor → Color Scheme → Console Font*.
Select *Use console font instead of the default* and set the font name to `MesloLGS NF`.
- **Termux**: Type `p10k configure` and answer `Yes` when asked whether to install
*Meslo Nerd Font*.
- **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select
*MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font.
- **Terminus**: Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
- **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General*
tab (should be selected already), uncheck *Use the system fixed width font* (if not already)
and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.
- **Guake**: Right Click on an open terminal and open *Preferences*. Under *Appearance*
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.
Exit the Preferences dialog by clicking *Close*.
- **Alacritty**: Create or open `~/.config/alacritty/alacritty.yml` and add the following section
to it:
```yaml
font:
normal:
family: "MesloLGS NF"
```
- **Kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
```text
font_family MesloLGS NF
```
Restart Kitty by closing all sessions and opening a new session.
**IMPORTANT:** Run `p10k configure` after changing terminal font. The old `~/.p10k.zsh` may work
incorrectly with the new font.
1. Download these four ttf files:
- [MesloLGS NF Regular.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf)
- [MesloLGS NF Bold.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf)
- [MesloLGS NF Italic.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf)
- [MesloLGS NF Bold Italic.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf)
1. Double-click on each file and click "Install". This will make `MesloLGS NF` font available to all
applications on your system.
1. Configure your terminal to use this font:
- **iTerm2**: Type `p10k configure` and answer `Yes` when asked whether to install
*Meslo Nerd Font*. Alternatively, open *iTerm2 → Preferences → Profiles → Text* and set *Font* to
`MesloLGS NF`.
- **Apple Terminal**: Open *Terminal → Preferences → Profiles → Text*, click *Change* under *Font*
and select `MesloLGS NF` family.
- **Hyper**: Open *Hyper → Edit → Preferences* and change the value of `fontFamily` under
`module.exports.config` to `MesloLGS NF`.
- **Visual Studio Code**: Open *File → Preferences → Settings* (PC) or
*Code → Preferences → Settings* (Mac), enter `terminal.integrated.fontFamily` in the search box at
the top of *Settings* tab and set the value below to `MesloLGS NF`.
Consult [this screenshot](
https://raw.githubusercontent.com/romkatv/powerlevel10k-media/389133fb8c9a2347929a23702ce3039aacc46c3d/visual-studio-code-font-settings.jpg)
to see how it should look like or see [this issue](
https://github.com/romkatv/powerlevel10k/issues/671) for extra information.
- **GNOME Terminal** (the default Ubuntu terminal): Open *Terminal → Preferences* and click on the
selected profile under *Profiles*. Check *Custom font* under *Text Appearance* and select
`MesloLGS NF Regular`.
- **Konsole**: Open *Settings → Edit Current Profile → Appearance*, click *Select Font* and select
`MesloLGS NF Regular`.
- **Tilix**: Open *Tilix → Preferences* and click on the selected profile under *Profiles*. Check
*Custom font* under *Text Appearance* and select `MesloLGS NF Regular`.
- **Windows Console Host** (the old thing): Click the icon in the top left corner, then
*Properties → Font* and set *Font* to `MesloLGS NF`.
- **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
*Font face* to `MesloLGS NF`.
- **Conemu**: Open *Setup → General → Fonts* and set *Main console font* to `MesloLGS NF`.
- **IntelliJ** (and other IDEs by Jet Brains): Open *IDE → Edit → Preferences → Editor →
Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font
name to `MesloLGS NF`.
- **Termux**: Type `p10k configure` and answer `Yes` when asked whether to install
*Meslo Nerd Font*.
- **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select
*MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font.
- **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
- **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General*
tab (should be selected already), uncheck *Use the system fixed width font* (if not already)
and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.
- **Guake**: Right Click on an open terminal and open *Preferences*. Under *Appearance*
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.
Exit the Preferences dialog by clicking *Close*.
- **MobaXterm**: Open *Settings**Configuration**Terminal* → (under *Terminal look and feel*)
and change *Font* to `MesloLGS NF`. If you have *sessions*, you need to change the font in each
of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal
Settings* → *Font settings*.
- **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable
*Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
To change the font for the remote host connections, go to *Preferences → Terminal Options →
Look and Feel* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
- **WSLtty**: Right click on an open terminal and then on *Options*. In the *Text* section, under
*Font*, click *"Select..."* and set Font to `MesloLGS NF Regular`.
- **Yakuake**: Click *≡**Manage Profiles**New**Appearance*. Click *Choose* next to the
*Font* dropdown, select `MesloLGS NF` and click *OK*. Click *OK* to save the profile. Select the
new profile and click *Set as Default*.
- **Alacritty**: Create or open `~/.config/alacritty/alacritty.toml` and add the following
section to it:
```toml
[font.normal]
family = "MesloLGS NF"
```
- **foot**: Create or open `~/.config/foot/foot.ini` and add the following section to it:
```ini
font=MesloLGS NF:size=12
```
- **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
```text
font_family MesloLGS NF
```
Restart kitty by closing all sessions and opening a new session.
- **puTTY**: Set *Window**Appearance**Font* to `MesloLGS NF`. Requires puTTY
version >= 0.75.
- **WezTerm**: Create or open `$HOME/.config/wezterm/wezterm.lua` and add the following:
```lua
local wezterm = require 'wezterm';
return {
font = wezterm.font("MesloLGS NF"),
}
```
If the file already exists, only add the line with the font to the existing return.
Also add the first line if it is not already present.
- **urxvt**: Create or open `~/.Xresources` and add the following line to it:
```text
URxvt.font: xft:MesloLGS NF:size=11
```
You can adjust the font size to your preference. After changing the config run
`xrdb ~/.Xresources` to reload it. The new config is applied to all new terminals.
- **xterm**: Create or open `~/.Xresources` and add the following line to it:
```text
xterm*faceName: MesloLGS NF
```
After changing the config run `xrdb ~/.Xresources` to reload it. The new config is applied to
all new terminals.
- **Zed**: Open `~/.config/zed/settings.json` and set `terminal.font_family` to `"MesloLGS NF"`.
```jsonc
{
"terminal": {
"font_family": "MesloLGS NF"
},
// Other settings.
}
```
- Crostini (Linux on Chrome OS): Open
chrome-untrusted://terminal/html/nassh_preferences_editor.html, set *Text font family* to
`'MesloLGS NF'` (including the quotes) and *Custom CSS (inline text)* to the following:
```css
@font-face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Regular.ttf");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold.ttf");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Italic.ttf");
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold%20Italic.ttf");
font-weight: bold;
font-style: italic;
}
```
**_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.
1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work
incorrectly with the new font.
_Using a different terminal and know how to set the font for it? Share your knowledge by sending a
PR to expand the list!_

@ -10,7 +10,7 @@ VERSION ?= $(shell . ./build.info && printf "%s" "$$gitstatus_version")
#
# Sized delete is implemented as __ZdlPvm in /usr/lib/libc++.1.dylib but this symbol is
# missing in macOS prior to 10.13.
CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) -Wall -Werror # -g -fsanitize=thread
CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) -Wall # -g -fsanitize=thread
LDFLAGS += -pthread # -fsanitize=thread
LDLIBS += -lgit2 # -lprofiler -lunwind
@ -34,8 +34,24 @@ $(OBJDIR)/%.o: src/%.cc Makefile build.info | $(OBJDIR)
clean:
rm -rf -- $(OBJDIR)
pkg:
GITSTATUS_DAEMON= GITSTATUS_CACHE_DIR=$(shell pwd)/usrbin ./install -f
zwc:
$(or $(ZSH),:) -fc 'for f in *.zsh install; do zcompile -R -- $$f.zwc $$f || exit; done'
minify:
rm -rf -- .clang-format .git .gitattributes .gitignore .vscode deps docs src usrbin/.gitkeep LICENSE Makefile README.md build mbuild
pkg: zwc
GITSTATUS_DAEMON= GITSTATUS_CACHE_DIR=$(shell pwd)/usrbin ./install -f
-include $(OBJS:.o=.dep)
.PHONY: help
help:
@echo "Usage: make [TARGET]"
@echo "Available targets:"
@echo " all Build $(APPNAME) (default target)"
@echo " clean Remove generated files and directories"
@echo " zwc Compile Zsh files"
@echo " minify Remove unnecessary files and folders"
@echo " pkg Create a package"

@ -22,7 +22,8 @@ Bash bindings for integration with shell.
The easiest way to take advantage of gitstatus from Zsh is to use a theme that's already integrated
with it. For example, [Powerlevel10k](https://github.com/romkatv/powerlevel10k) is a flexible and
fast theme with first-class gitstatus integration.
fast theme with first-class gitstatus integration. If you install Powerlevel10k, you don't need to
install gitstatus.
![Powerlevel10k Zsh Theme](
https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/prompt-styles-high-contrast.png)
@ -35,7 +36,7 @@ git clone --depth=1 https://github.com/romkatv/gitstatus.git ~/gitstatus
echo 'source ~/gitstatus/gitstatus.prompt.zsh' >>! ~/.zshrc
```
Users in mainland China can use the official mirror on gitee.com for faster download.<br>
Users in China can use the official mirror on gitee.com for faster download.<br>
中国大陆用户可以使用 gitee.com 上的官方镜像加速下载.
```zsh
@ -43,15 +44,15 @@ git clone --depth=1 https://gitee.com/romkatv/gitstatus.git ~/gitstatus
echo 'source ~/gitstatus/gitstatus.prompt.zsh' >>! ~/.zshrc
```
Alternatively, on macOS you can install with Homebrew:
Alternatively, if you have Homebrew installed:
```zsh
brew install romkatv/gitstatus/gitstatus
echo 'source /usr/local/opt/gitstatus/gitstatus.prompt.zsh' >>! ~/.zshrc
echo "source $(brew --prefix)/opt/gitstatus/gitstatus.prompt.zsh" >>! ~/.zshrc
```
(If you choose this option, replace `~/gitstatus` with `/usr/local/opt/gitstatus` in all code
snippets below.)
(If you choose this option, replace `~/gitstatus` with `$(brew --prefix)/opt/gitstatus/gitstatus`
in all code snippets below.)
_Make sure to disable your current theme if you have one._
@ -136,7 +137,7 @@ git clone --depth=1 https://github.com/romkatv/gitstatus.git ~/gitstatus
echo 'source ~/gitstatus/gitstatus.prompt.sh' >> ~/.bashrc
```
Users in mainland China can use the official mirror on gitee.com for faster download.<br>
Users in China can use the official mirror on gitee.com for faster download.<br>
中国大陆用户可以使用 gitee.com 上的官方镜像加速下载.
```bash
@ -144,15 +145,15 @@ git clone --depth=1 https://gitee.com/romkatv/gitstatus.git ~/gitstatus
echo 'source ~/gitstatus/gitstatus.prompt.sh' >> ~/.bashrc
```
Alternatively, on macOS you can install with Homebrew:
Alternatively, if you have Homebrew installed:
```zsh
brew install romkatv/gitstatus/gitstatus
echo 'source /usr/local/opt/gitstatus/gitstatus.prompt.sh' >> ~/.bashrc
echo "source $(brew --prefix)/opt/gitstatus/gitstatus.prompt.sh" >> ~/.bashrc
```
(If you choose this option, replace `~/gitstatus` with `/usr/local/opt/gitstatus` in all code
snippets below.)
(If you choose this option, replace `~/gitstatus` with `$(brew --prefix)/opt/gitstatus/gitstatus`
in all code snippets below.)
This will give you a basic yet functional prompt with git status in it. It's
[over 10x faster](#benchmarks) than any alternative that can give you comparable prompt.
@ -254,7 +255,7 @@ repository was checked out to an ext4 filesystem on M.2 SSD.
Three functionally equivalent tools for computing git status were benchmarked:
* `gitstatusd`
* `git` with untracked cache enabled
* `git` with `core.untrackedcache` enabled and `core.fsmonitor` disabled
* `lg2` -- a demo/example executable from [libgit2](https://github.com/romkatv/libgit2) that
implements a subset of `git` functionality on top of libgit2 API; for the purposes of this
benchmark the subset is sufficient to generate the same data as the other tools
@ -380,7 +381,7 @@ generated with the same tools and the same flags as the profile of libgit2.
Since both profiles were generated from the same workload, absolute numbers can be compared. We can
see that gitstatusd took 62 seconds in total compared to libgit2's 232 seconds. System calls at the
core of the algorithm are cleary visible. `__GI___fxstatat` is a flavor of `stat()`, and the other
core of the algorithm are clearly visible. `__GI___fxstatat` is a flavor of `stat()`, and the other
three calls -- `__libc_openat64`, `__libc_close` and `__GI___fxstat` are responsible for opening
directories and finding untracked files. Notice that there is almost nothing else in the profile
apart from these calls. The rest of the code accounts for 3.77 seconds of CPU time -- 32 times less
@ -491,7 +492,7 @@ cd gitstatus
./build -w -s -d docker
```
Users in mainland China can use the official mirror on gitee.com for faster download.<br>
Users in China can use the official mirror on gitee.com for faster download.<br>
中国大陆用户可以使用 gitee.com 上的官方镜像加速下载.
```zsh

@ -12,11 +12,24 @@ fi
export LC_ALL=C
if [ -z "${ZSH_VERSION-}" ] && command -v zsh >/dev/null 2>&1; then
# Avoid bash 3.*.
case "${BASH_VERSION-}" in
[0-3].*) exec zsh "$0" "$@";;
esac
fi
# Avoid ksh: https://github.com/romkatv/gitstatus/issues/282.
if [ -n "${KSH_VERSION-}" ]; then
if [ -z "${ZSH_VERSION-}" ] && command -v zsh >/dev/null 2>&1; then
exec zsh "$0" "$@"
elif [ -z "${BASH_VERSION-}" ] && command -v bash >/dev/null 2>&1 &&
bash_version="$(bash --version 2>&1)"; then
case "$bash_version" in
*version\ [4-9]*|*version\ [1-9][0-9]*) exec bash "$0" "$@";;
esac
fi
fi
usage="$(command cat <<\END
Usage: build [-m ARCH] [-c CPU] [-d CMD] [-i IMAGE] [-s] [-w]
@ -55,7 +68,7 @@ workdir="$(command pwd)"
narg() { echo $#; }
if [ "$(narg $workdir)" != 1 -o -z "${workdir##*:*}" ]; then
if [ "$(narg $workdir)" != 1 -o -z "${workdir##*:*}" -o -z "${workdir##*=*}" ]; then
>&2 echo "[error] cannot build in this directory: $workdir"
exit 1
fi
@ -87,8 +100,11 @@ if [ -n "$gitstatus_install_tools" ]; then
exit 1
fi
;;
freebsd)
command pkg install -y cmake gmake binutils gcc git perl5
freebsd|dragonfly)
command pkg install -y cmake gmake binutils git perl5 wget
;;
openbsd)
command pkg_add cmake gmake gcc g++ git wget
;;
netbsd)
command pkgin -y install cmake gmake binutils git
@ -98,17 +114,20 @@ if [ -n "$gitstatus_install_tools" ]; then
>&2 echo "[error] please run 'xcode-select --install' and retry"
exit 1
fi
if ! command -v brew >/dev/null 2>&1; then
>&2 echo "[error] please install homebrew from https://brew.sh/ and retry"
if command -v port >/dev/null 2>&1; then
sudo port -N install libiconv cmake wget
elif command -v brew >/dev/null 2>&1; then
for formula in libiconv cmake git wget; do
if command brew ls --version "$formula" &>/dev/null; then
command brew upgrade "$formula"
else
command brew install "$formula"
fi
done
else
>&2 echo "[error] please install MacPorts or Homebrew and retry"
exit 1
fi
for formula in libiconv cmake git wget; do
if command brew list "$formula" &>/dev/null; then
command brew upgrade "$formula"
else
command brew install "$formula"
fi
done
;;
msys*|mingw*)
command pacman -Syu --noconfirm
@ -122,64 +141,138 @@ if [ -n "$gitstatus_install_tools" ]; then
fi
cpus="$(command getconf _NPROCESSORS_ONLN 2>/dev/null)" ||
cpus="$(command sysctl -n hw.ncpu 2>/dev/null)" ||
cpus="$(command sysctl -n hw.ncpu 2>/dev/null)" ||
cpus=8
case "$gitstatus_cpu" in
powerpc64le) archflag="-mcpu";;
*) archflag="-march";;
powerpc64|powerpc64le)
archflag="-mcpu"
;;
*)
archflag="-march"
;;
esac
cflags="$archflag=$gitstatus_cpu -fno-plt"
cflags="$archflag=$gitstatus_cpu -fno-plt -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie"
ldflags=
static_pie=
if [ -z "${CC-}" ]; then
case "$gitstatus_kernel" in
freebsd) export CC=clang;;
*) export CC=cc;;
esac
fi
printf 'int main() {}\n' >"$workdir"/cc-test.c
if 2>/dev/null "$CC" \
-ffile-prefix-map=x=y \
-Werror \
-c "$workdir"/cc-test.c \
-o "$workdir"/cc-test.o; then
cflags="$cflags -ffile-prefix-map=$workdir/="
fi
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
if 2>/dev/null "$CC" \
-fstack-clash-protection \
-Werror \
-c "$workdir"/cc-test.c \
-o "$workdir"/cc-test.o; then
cflags="$cflags -fstack-clash-protection"
fi
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
if 2>/dev/null "$CC" \
-fcf-protection \
-Werror \
-c "$workdir"/cc-test.c \
-o "$workdir"/cc-test.o; then
cflags="$cflags -fcf-protection"
fi
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
if 2>/dev/null "$CC" \
-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now \
-Werror \
"$workdir"/cc-test.c \
-o "$workdir"/cc-test; then
ldflags="$ldflags -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
fi
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
if 2>/dev/null "$CC" \
-fpie -static-pie \
-Werror \
"$workdir"/cc-test.c \
-o "$workdir"/cc-test; then
static_pie='-static-pie'
fi
if [ "$gitstatus_cpu" = x86-64 ]; then
cflags="$cflags -mtune=generic"
fi
libgit2_cmake_flags=
libgit2_cflags="$cflags"
libgit2_cflags="${CFLAGS-} $cflags -O3 -DNDEBUG"
gitstatus_cxx=g++
gitstatus_cxxflags="$cflags -I${workdir}/libgit2/include -DGITSTATUS_ZERO_NSEC -D_GNU_SOURCE"
gitstatus_ldflags="-L${workdir}/libgit2/build"
gitstatus_cxxflags="${CXXFLAGS-} $cflags -I${workdir}/libgit2/include -DGITSTATUS_ZERO_NSEC -D_GNU_SOURCE -D_GLIBCXX_ASSERTIONS"
gitstatus_ldflags="${LDFLAGS-} $ldflags -L${workdir}/libgit2/build"
gitstatus_ldlibs=
gitstatus_make=make
case "$gitstatus_kernel" in
linux)
gitstatus_ldflags="$gitstatus_ldflags -static"
gitstatus_ldflags="$gitstatus_ldflags -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
;;
freebsd)
gitstatus_cxx=clang++
gitstatus_make=gmake
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
;;
dragonfly)
gitstatus_cxx=clang++12
gitstatus_make=gmake
gitstatus_ldflags="$gitstatus_ldflags -static"
gitstatus_ldflags="$gitstatus_ldflags -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
;;
openbsd)
gitstatus_cxx=eg++
gitstatus_make=gmake
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
;;
netbsd)
gitstatus_make=gmake
gitstatus_ldflags="$gitstatus_ldflags -static"
gitstatus_ldflags="$gitstatus_ldflags -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
;;
darwin)
command mkdir -- "$workdir"/lib
brew_prefix="$(command brew --prefix)"
command ln -s -- "$brew_prefix"/opt/libiconv/lib/libiconv.a "$workdir"/lib
if [ -e /opt/local/lib/libiconv.a ]; then
command ln -s -- /opt/local/lib/libiconv.a "$workdir"/lib
libgit2_cflags="$libgit2_cflags -I/opt/local/include"
gitstatus_cxxflags="$gitstatus_cxxflags -I/opt/local/include"
else
brew_prefix="$(command brew --prefix)"
command ln -s -- "$brew_prefix"/opt/libiconv/lib/libiconv.a "$workdir"/lib
libgit2_cflags="$libgit2_cflags -I"$brew_prefix"/opt/libiconv/include"
gitstatus_cxxflags="$gitstatus_cxxflags -I"$brew_prefix"/opt/libiconv/include"
fi
libgit2_cmake_flags="$libgit2_cmake_flags -DUSE_ICONV=ON"
libgit2_cflags="$libgit2_cflags -I"$brew_prefix"/opt/libiconv/include"
gitstatus_cxxflags="$gitstatus_cxxflags -I"$brew_prefix"/opt/libiconv/include"
gitstatus_ldlibs="$gitstatus_ldlibs -liconv"
gitstatus_ldflags="$gitstatus_ldflags -L${workdir}/lib"
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=OFF"
;;
msys*|mingw*)
gitstatus_ldflags="$gitstatus_ldflags -static"
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
;;
cygwin*)
gitstatus_ldflags="$gitstatus_ldflags -static"
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
;;
*)
@ -188,7 +281,7 @@ case "$gitstatus_kernel" in
;;
esac
for cmd in cat cmake gcc g++ git ld ln mkdir rm strip tar "$gitstatus_make"; do
for cmd in cat cmake git ld ln mkdir rm strip tar "$gitstatus_make"; do
if ! command -v "$cmd" >/dev/null 2>&1; then
if [ -n "$gitstatus_install_tools" ]; then
>&2 echo "[internal error] $cmd not found"
@ -222,7 +315,18 @@ if [ ! -e "$libgit2_tarball" ]; then
fi
fi
libgit2_url=https://github.com/romkatv/libgit2/archive/"$libgit2_version".tar.gz
command wget -O "$libgit2_tmp" -- "$libgit2_url"
if ! >"$libgit2_tmp" command wget --no-config -qO- -- "$libgit2_url" &&
! >"$libgit2_tmp" command wget -qO- -- "$libgit2_url"; then
set -x
>&2 command which wget
>&2 command ls -lAd -- "$(command which wget)"
>&2 command ls -lAd -- "$outdir"
>&2 command ls -lA -- "$outdir"
>&2 command ls -lAd -- "$outdir"/deps
>&2 command ls -lA -- "$outdir"/deps
set +x
exit 1
fi
command mv -f -- "$libgit2_tmp" "$libgit2_tarball"
else
>&2 echo "[error] file not found: deps/libgit2-"$libgit2_version".tar.gz"
@ -268,7 +372,7 @@ command mkdir libgit2/build
cd libgit2/build
CFLAGS="$libgit2_cflags" command cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=None \
-DZERO_NSEC=ON \
-DTHREADSAFE=ON \
-DUSE_BUNDLED_ZLIB=ON \
@ -286,7 +390,7 @@ command make -j "$cpus" VERBOSE=1
APPNAME="$appname".tmp \
OBJDIR="$workdir"/gitstatus \
CXX="$gitstatus_cxx" \
CXX="${CXX:-$gitstatus_cxx}" \
CXXFLAGS="$gitstatus_cxxflags" \
LDFLAGS="$gitstatus_ldflags" \
LDLIBS="$gitstatus_ldlibs" \
@ -297,16 +401,33 @@ app="$outdir"/usrbin/"$appname"
command strip "$app".tmp
command mkdir -- "$workdir"/repo
command git -C "$workdir"/repo init
command git -C "$workdir"/repo config user.name "Your Name"
command git -C "$workdir"/repo config user.email "you@example.com"
command git -C "$workdir"/repo commit --allow-empty --allow-empty-message --no-gpg-sign -m ''
printf '[init]\n defaultBranch = master\n' >"$workdir"/.gitconfig
(
cd -- "$workdir"/repo
GIT_CONFIG_NOSYSTEM=1 HOME="$workdir" command git init
GIT_CONFIG_NOSYSTEM=1 HOME="$workdir" command git config user.name "Your Name"
GIT_CONFIG_NOSYSTEM=1 HOME="$workdir" command git config user.email "you@example.com"
GIT_CONFIG_NOSYSTEM=1 HOME="$workdir" command git commit \
--allow-empty --allow-empty-message --no-gpg-sign -m ''
)
resp="$(printf "hello\037$workdir/repo\036" | "$app".tmp)"
[ -n "$resp" -a -z "${resp##hello*1*$workdir/repo*master*}" ]
case "$resp" in
hello*1*/repo*master*);;
*)
>&2 echo 'error: invalid gitstatusd response for a git repo'
exit 1
;;
esac
resp="$(printf 'hello\037\036' | "$app".tmp)"
[ -n "$resp" -a -z "${resp##hello*0*}" ]
case "$resp" in
hello*0*);;
*)
>&2 echo 'error: invalid gitstatusd response for a non-repo'
exit 1
;;
esac
command mv -f -- "$app".tmp "$app"
@ -414,13 +535,16 @@ fi
if [ -z "$gitstatus_cpu" ]; then
case "$gitstatus_arch" in
armv6l) gitstatus_cpu=armv6;;
armel) gitstatus_cpu=armv5;;
armv6l|armhf) gitstatus_cpu=armv6;;
armv7l) gitstatus_cpu=armv7;;
arm64) gitstatus_cpu=armv8;;
aarch64) gitstatus_cpu=armv8-a;;
ppc64le) gitstatus_cpu=powerpc64le;;
arm64|aarch64) gitstatus_cpu=armv8-a;;
ppc64|ppc64le) gitstatus_cpu=powerpc64le;;
riscv64) gitstatus_cpu=rv64imafdc;;
loongarch64) gitstatus_cpu=loongarch64;;
x86_64|amd64) gitstatus_cpu=x86-64;;
x86) gitstatus_cpu=i586;;
s390x) gitstatus_cpu=z900;;
i386|i586|i686) gitstatus_cpu="$gitstatus_arch";;
*)
>&2 echo '[error] unable to infer target CPU architecture'
@ -449,12 +573,13 @@ case "$gitstatus_kernel" in
fi
if [ -z "$docker_image" ]; then
case "$gitstatus_arch" in
x86_64) docker_image=alpine:3.11.6;;
i386|i586|i686) docker_image=i386/alpine:3.11.6;;
armv6l) docker_image=arm32v6/alpine:3.11.6;;
armv7l) docker_image=arm32v7/alpine:3.11.6;;
aarch64) docker_image=arm64v8/alpine:3.11.6;;
ppc64le) docker_image=ppc64le/alpine:3.11.6;;
x86_64) docker_image=alpine:3.11.6;;
x86|i386|i586|i686) docker_image=i386/alpine:3.11.6;;
armv6l|armhf) docker_image=arm32v6/alpine:3.11.6;;
armv7l) docker_image=arm32v7/alpine:3.11.6;;
aarch64) docker_image=arm64v8/alpine:3.11.6;;
ppc64|ppc64le) docker_image=ppc64le/alpine:3.11.6;;
s390x) docker_image=s390x/alpine:3.11.6;;
*)
>&2 echo '[error] unable to infer docker image'
>&2 echo 'Please specify explicitly with `-i IMAGE`.'
@ -464,7 +589,7 @@ case "$gitstatus_kernel" in
fi
fi
;;
freebsd|netbsd|darwin)
freebsd|openbsd|netbsd|darwin|dragonfly)
if [ -n "$docker_cmd" ]; then
>&2 echo "[error] docker (-d) is not supported on $gitstatus_kernel"
exit 1

@ -3,7 +3,7 @@
#
# This value is also read by shell bindings (indirectly, through
# ./install) when using GITSTATUS_DAEMON or usrbin/gitstatusd.
gitstatus_version="v1.3.1"
gitstatus_version="v1.5.4"
# libgit2 is a build time dependency of gitstatusd. The values of
# libgit2_version and libgit2_sha256 are read by ./build.
@ -18,5 +18,5 @@ gitstatus_version="v1.3.1"
#
# If sha256 of ./deps/libgit2-${libgit2_version}.tar.gz doesn't match,
# build gets aborted.
libgit2_version="tag-82cefe2b42300224ad3c148f8b1a569757cc617a"
libgit2_sha256="dc701c4e2080f7901f5d599d642b629569e5581086b9838d481d09f284dc7621"
libgit2_version="tag-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6"
libgit2_sha256="4ce11d71ee576dbbc410b9fa33a9642809cc1fa687b315f7c23eeb825b251e93"

@ -35,6 +35,11 @@
#
# -D Unless this option is specified, report zero staged, unstaged and conflicted
# changes for repositories with bash.showDirtyState = false.
#
# -r INT Close git repositories that haven't been used for this many seconds. This is
# meant to release resources such as memory and file descriptors. The next request
# for a repo that's been closed is much slower than for a repo that hasn't been.
# Negative value means infinity. The default is 3600 (one hour).
function gitstatus_start() {
if [[ "$BASH_VERSION" < 4 ]]; then
>&2 printf 'gitstatus_start: need bash version >= 4.0, found %s\n' "$BASH_VERSION"
@ -48,10 +53,9 @@ function gitstatus_start() {
fi
unset OPTIND
local opt timeout=5 max_dirty=-1 extra_flags
local opt timeout=5 max_dirty=-1 ttl=3600 extra_flags=
local max_num_staged=1 max_num_unstaged=1 max_num_conflicted=1 max_num_untracked=1
local ignore_status_show_untracked_files
while getopts "t:s:u:c:d:m:eUWD" opt; do
while getopts "t:s:u:c:d:m:r:eUWD" opt; do
case "$opt" in
t) timeout=$OPTARG;;
s) max_num_staged=$OPTARG;;
@ -59,6 +63,7 @@ function gitstatus_start() {
c) max_num_conflicted=$OPTARG;;
d) max_num_untracked=$OPTARG;;
m) max_dirty=$OPTARG;;
r) ttl=$OPTARG;;
e) extra_flags+='--recurse-untracked-dirs ';;
U) extra_flags+='--ignore-status-show-untracked-files ';;
W) extra_flags+='--ignore-bash-show-untracked-files ';;
@ -113,9 +118,15 @@ function gitstatus_start() {
--max-num-conflicted="$max_num_conflicted"
--max-num-untracked="$max_num_untracked"
--dirty-max-index-size="$max_dirty"
--repo-ttl-seconds="$ttl"
$extra_flags)
tmpdir="$(command mktemp -d "${TMPDIR:-/tmp}"/gitstatus.bash.$$.XXXXXXXXXX)" || return
if [[ -n "$TMPDIR" && ( ( -d "$TMPDIR" && -w "$TMPDIR" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then
local tmpdir=$TMPDIR
else
local tmpdir=/tmp
fi
tmpdir="$(command mktemp -d "$tmpdir"/gitstatus.bash.$$.XXXXXXXXXX)" || return
if [[ -n "$log_level" ]]; then
GITSTATUS_DAEMON_LOG="$tmpdir"/daemon.log
@ -264,54 +275,22 @@ function gitstatus_start() {
return 1
fi
export _GITSTATUS_CLIENT_PID _GITSTATUS_REQ_FD _GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID
unset -f gitstatus_start_impl
if [[ "${GITSTATUS_STOP_ON_EXEC:-1}" == 1 ]]; then
type -t _gitstatus_exec &>/dev/null || function _gitstatus_exec() { exec "$@"; }
type -t _gitstatus_builtin &>/dev/null || function _gitstatus_builtin() { builtin "$@"; }
function _gitstatus_exec_wrapper() {
(( ! $# )) || gitstatus_stop
local ret=0
_gitstatus_exec "$@" || ret=$?
[[ -n "${GITSTATUS_DAEMON_PID:-}" ]] || gitstatus_start || true
return $ret
}
function _gitstatus_builtin_wrapper() {
while [[ "${1:-}" == builtin ]]; do shift; done
if [[ "${1:-}" == exec ]]; then
_gitstatus_exec_wrapper "${@:2}"
else
_gitstatus_builtin "$@"
fi
}
alias exec=_gitstatus_exec_wrapper
alias builtin=_gitstatus_builtin_wrapper
_GITSTATUS_EXEC_HOOK=1
else
unset _GITSTATUS_EXEC_HOOK
fi
}
# Stops gitstatusd if it's running.
function gitstatus_stop() {
[[ "${_GITSTATUS_CLIENT_PID:-$BASHPID}" == "$BASHPID" ]] || return 0
[[ -z "${_GITSTATUS_REQ_FD:-}" ]] || exec {_GITSTATUS_REQ_FD}>&- || true
[[ -z "${_GITSTATUS_RESP_FD:-}" ]] || exec {_GITSTATUS_RESP_FD}>&- || true
[[ -z "${GITSTATUS_DAEMON_PID:-}" ]] || kill "$GITSTATUS_DAEMON_PID" &>/dev/null || true
if [[ -n "${_GITSTATUS_EXEC_HOOK:-}" ]]; then
unalias exec builtin &>/dev/null || true
function _gitstatus_exec_wrapper() { _gitstatus_exec "$@"; }
function _gitstatus_builtin_wrapper() { _gitstatus_builtin "$@"; }
if [[ "${_GITSTATUS_CLIENT_PID:-$BASHPID}" == "$BASHPID" ]]; then
[[ -z "${_GITSTATUS_REQ_FD:-}" ]] || exec {_GITSTATUS_REQ_FD}>&- || true
[[ -z "${_GITSTATUS_RESP_FD:-}" ]] || exec {_GITSTATUS_RESP_FD}>&- || true
[[ -z "${GITSTATUS_DAEMON_PID:-}" ]] || kill "$GITSTATUS_DAEMON_PID" &>/dev/null || true
fi
unset _GITSTATUS_REQ_FD _GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID _GITSTATUS_EXEC_HOOK
unset _GITSTATUS_REQ_FD _GITSTATUS_RESP_FD GITSTATUS_DAEMON_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]...
#
@ -332,6 +311,8 @@ function gitstatus_stop() {
# VCS_STATUS_WORKDIR Git repo working directory. Not empty.
# VCS_STATUS_COMMIT Commit hash that HEAD is pointing to. Either 40 hex digits or
# empty if there is no HEAD (empty repo).
# VCS_STATUS_COMMIT_ENCODING Encoding of the HEAD's commit message. Empty value means UTF-8.
# VCS_STATUS_COMMIT_SUMMARY The first paragraph of the HEAD's commit message as one line.
# VCS_STATUS_LOCAL_BRANCH Local branch name or empty if not on a branch.
# VCS_STATUS_REMOTE_NAME The remote name, e.g. "upstream" or "origin".
# VCS_STATUS_REMOTE_BRANCH Upstream branch name. Can be empty.
@ -379,7 +360,7 @@ function gitstatus_stop() {
# shell or the call had failed.
function gitstatus_query() {
unset OPTIND
local opt dir timeout=() no_diff=0
local opt dir= timeout=() no_diff=0
while getopts "d:c:t:p" opt "$@"; do
case "$opt" in
d) dir=$OPTARG;;
@ -390,7 +371,7 @@ function gitstatus_query() {
done
(( OPTIND == $# + 1 )) || { echo "usage: gitstatus_query [OPTION]..." >&2; return 1; }
[[ -n "$GITSTATUS_DAEMON_PID" ]] || return # not started
[[ -n "${GITSTATUS_DAEMON_PID-}" ]] || return # not started
local req_id="$RANDOM.$RANDOM.$RANDOM.$RANDOM"
if [[ -z "${GIT_DIR:-}" ]]; then
@ -435,6 +416,8 @@ function gitstatus_query() {
VCS_STATUS_PUSH_COMMITS_BEHIND="${resp[24]:-0}"
VCS_STATUS_NUM_SKIP_WORKTREE="${resp[25]:-0}"
VCS_STATUS_NUM_ASSUME_UNCHANGED="${resp[26]:-0}"
VCS_STATUS_COMMIT_ENCODING="${resp[27]-}"
VCS_STATUS_COMMIT_SUMMARY="${resp[28]-}"
VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0))
if (( _GITSTATUS_DIRTY_MAX_INDEX_SIZE >= 0 &&
VCS_STATUS_INDEX_SIZE > _GITSTATUS_DIRTY_MAX_INDEX_SIZE_ )); then
@ -477,6 +460,8 @@ function gitstatus_query() {
unset VCS_STATUS_PUSH_COMMITS_BEHIND
unset VCS_STATUS_NUM_SKIP_WORKTREE
unset VCS_STATUS_NUM_ASSUME_UNCHANGED
unset VCS_STATUS_COMMIT_ENCODING
unset VCS_STATUS_COMMIT_SUMMARY
fi
}

@ -15,6 +15,8 @@
# VCS_STATUS_COMMIT=c000eddcff0fb38df2d0137efe24d9d2d900f209
# VCS_STATUS_COMMITS_AHEAD=0
# VCS_STATUS_COMMITS_BEHIND=0
# VCS_STATUS_COMMIT_ENCODING=''
# VCS_STATUS_COMMIT_SUMMARY='pull upstream changes from gitstatus'
# VCS_STATUS_HAS_CONFLICTED=0
# VCS_STATUS_HAS_STAGED=0
# VCS_STATUS_HAS_UNSTAGED=1
@ -57,7 +59,7 @@ zmodload -F zsh/files b:zf_rm || return
typeset -g _gitstatus_plugin_dir"${1:-}"="${${(%):-%x}:A:h}"
# Retrives status of a git repo from a directory under its working tree.
# Retrieves status of a git repo from a directory under its working tree.
#
## Usage: gitstatus_query [OPTION]... NAME
#
@ -88,6 +90,8 @@ typeset -g _gitstatus_plugin_dir"${1:-}"="${${(%):-%x}:A:h}"
# VCS_STATUS_WORKDIR Git repo working directory. Not empty.
# VCS_STATUS_COMMIT Commit hash that HEAD is pointing to. Either 40 hex digits or
# empty if there is no HEAD (empty repo).
# VCS_STATUS_COMMIT_ENCODING Encoding of the HEAD's commit message. Empty value means UTF-8.
# VCS_STATUS_COMMIT_SUMMARY The first paragraph of the HEAD's commit message as one line.
# VCS_STATUS_LOCAL_BRANCH Local branch name or empty if not on a branch.
# VCS_STATUS_REMOTE_NAME The remote name, e.g. "upstream" or "origin".
# VCS_STATUS_REMOTE_BRANCH Upstream branch name. Can be empty.
@ -181,9 +185,21 @@ function gitstatus_query"${1:-}"() {
(( _GITSTATUS_STATE_$name == 2 )) || return
if [[ -z $GIT_DIR ]]; then
[[ $dir == /* ]] || dir=${(%):-%/}/$dir
if [[ $dir != /* ]]; then
if [[ $PWD == /* && $PWD -ef . ]]; then
dir=$PWD/$dir
else
dir=${dir:a}
fi
fi
else
[[ $GIT_DIR == /* ]] && dir=:$GIT_DIR || dir=:${(%):-%/}/$GIT_DIR
if [[ $GIT_DIR == /* ]]; then
dir=:$GIT_DIR
elif [[ $PWD == /* && $PWD -ef . ]]; then
dir=:$PWD/$GIT_DIR
else
dir=:${GIT_DIR:a}
fi
fi
if [[ $dir != (|:)/* ]]; then
@ -329,7 +345,9 @@ function _gitstatus_process_response"${1:-}"() {
VCS_STATUS_PUSH_COMMITS_AHEAD \
VCS_STATUS_PUSH_COMMITS_BEHIND \
VCS_STATUS_NUM_SKIP_WORKTREE \
VCS_STATUS_NUM_ASSUME_UNCHANGED in "${(@)resp[3,27]}"; do
VCS_STATUS_NUM_ASSUME_UNCHANGED \
VCS_STATUS_COMMIT_ENCODING \
VCS_STATUS_COMMIT_SUMMARY in "${(@)resp[3,29]}"; do
done
typeset -gi VCS_STATUS_{INDEX_SIZE,NUM_STAGED,NUM_UNSTAGED,NUM_CONFLICTED,NUM_UNTRACKED,COMMITS_AHEAD,COMMITS_BEHIND,STASHES,NUM_UNSTAGED_DELETED,NUM_STAGED_NEW,NUM_STAGED_DELETED,PUSH_COMMITS_AHEAD,PUSH_COMMITS_BEHIND,NUM_SKIP_WORKTREE,NUM_ASSUME_UNCHANGED}
typeset -gi VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0))
@ -452,7 +470,7 @@ function _gitstatus_daemon"${1:-}"() {
(( lock_fd == -1 )) && return
{
if zsystem flock -- $file_prefix.lock && [[ -e $file_prefix.lock ]]; then
if zsystem flock -- $file_prefix.lock && command sleep 5 && [[ -e $file_prefix.lock ]]; then
zf_rm -f -- $file_prefix.lock $file_prefix.fifo
kill -- -$pgid
fi
@ -556,7 +574,12 @@ function gitstatus_start"${1:-}"() {
else
typeset -gi _GITSTATUS_START_COUNTER
local log_level=$GITSTATUS_LOG_LEVEL
local file_prefix=${${TMPDIR:-/tmp}:A}/gitstatus.$name.$EUID
if [[ -n "$TMPDIR" && ( ( -d "$TMPDIR" && -w "$TMPDIR" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then
local tmpdir=$TMPDIR
else
local tmpdir=/tmp
fi
local file_prefix=${tmpdir:A}/gitstatus.$name.$EUID
file_prefix+=.$sysparams[pid].$EPOCHSECONDS.$((++_GITSTATUS_START_COUNTER))
(( GITSTATUS_ENABLE_LOGGING )) && : ${log_level:=INFO}
if [[ -n $log_level ]]; then

@ -2,7 +2,7 @@
# Source gitstatus.plugin.sh from $GITSTATUS_DIR or from the same directory
# in which the current script resides if the variable isn't set.
if [[ -n "${GITSTATUS_DIR:-}" ]]; then
if [[ -n "${GITSTATUS_DIR-}" ]]; then
source "$GITSTATUS_DIR" || return
elif [[ "${BASH_SOURCE[0]}" == */* ]]; then
source "${BASH_SOURCE[0]%/*}/gitstatus.plugin.sh" || return
@ -33,11 +33,11 @@ function gitstatus_prompt_update() {
gitstatus_query "$@" || return 1 # error
[[ "$VCS_STATUS_RESULT" == ok-sync ]] || return 0 # not a git repo
local reset=$'\e[0m' # no color
local clean=$'\e[38;5;076m' # green foreground
local untracked=$'\e[38;5;014m' # teal foreground
local modified=$'\e[38;5;011m' # yellow foreground
local conflicted=$'\e[38;5;196m' # red foreground
local reset=$'\001\e[0m\002' # no color
local clean=$'\001\e[38;5;076m\002' # green foreground
local untracked=$'\001\e[38;5;014m\002' # teal foreground
local modified=$'\001\e[38;5;011m\002' # yellow foreground
local conflicted=$'\001\e[38;5;196m\002' # red foreground
local p
@ -85,7 +85,15 @@ function gitstatus_prompt_update() {
gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1
# On every prompt, fetch git status and set GITSTATUS_PROMPT.
PROMPT_COMMAND=gitstatus_prompt_update
if [[ -z "${PROMPT_COMMAND[*]}" ]]; then
PROMPT_COMMAND=gitstatus_prompt_update
elif [[ ! "${PROMPT_COMMAND[*]}" =~ [[:space:]\;]?gitstatus_prompt_update[[:space:]\;]? ]]; then
# Note: If PROMPT_COMMAND is an array, this will modify its first element.
PROMPT_COMMAND=$'gitstatus_prompt_update\n'"$PROMPT_COMMAND"
fi
# Retain 3 trailing components of the current directory.
PROMPT_DIRTRIM=3
# Enable promptvars so that ${GITSTATUS_PROMPT} in PS1 is expanded.
shopt -s promptvars

@ -5,24 +5,6 @@
_gitstatus_install_daemon_found() {
local installed="$1"
shift
case "$daemon" in
*-darwin-x86_64)
if [ "$uname_m" = arm64 ] &&
[ ! -e /Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist ] &&
[ -x /usr/sbin/softwareupdate ]; then
>&"$e" printf 'Please run the following command to install Rosetta:\n'
>&"$e" printf '\n'
>&"$e" printf ' \033[32m/usr/sbin/softwareupdate\033[0m --install-rosetta\n'
>&"$e" printf '\n'
>&"$e" printf 'See for details: \033[4mhttps://support.apple.com/en-us/HT211861\033[0m\n'
>&"$e" printf '\n'
>&"$e" printf 'Once Rosetta is installed, restart your shell.\n'
return 1
fi
;;
esac
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
}
@ -263,27 +245,30 @@ END
return 1
fi
local tmpdir
if [ -n "${TMPDIR-}" -a '(' '(' -d "${TMPDIR-}" -a -w "${TMPDIR-}" ')' -o '!' '(' -d /tmp -a -w /tmp ')' ')' ]; then
local tmp="$TMPDIR"
else
local tmp=/tmp
fi
if ! command -v mktemp >/dev/null 2>&1 ||
! tmpdir="$(command mktemp -d "${TMPDIR:-/tmp}"/gitstatus-install.XXXXXXXXXX)"; then
tmpdir="${TMPDIR:-/tmp}/gitstatus-install.tmp.$$"
! tmpdir="$(command mktemp -d "$tmp"/gitstatus-install.XXXXXXXXXX)"; then
tmpdir="$tmp/gitstatus-install.tmp.$$"
if ! mkdir -p -- "$tmpdir"; then
local dir="${TMPDIR:-/tmp}"
if [ -z "${TMPDIR:-}" ]; then
if [ "$tmp" = /tmp ]; then
local label='directory'
else
local label='directory (\033[1mTMPDIR\033[m)'
fi
if [ ! -e "$dir" ]; then
>&"$e" printf 'Temporary '"$label"' does not exist: \033[4;31m%s\033[0m\n' "$dir"
if [ ! -e "$tmp" ]; then
>&"$e" printf 'Temporary '"$label"' does not exist: \033[4;31m%s\033[0m\n' "$tmp"
>&"$e" printf '\n'
>&"$e" printf 'Create it, then restart your shell.\n'
elif [ ! -d "$dir" ]; then
>&"$e" printf 'Not a '"$label"': \033[4;31m%s\033[0m\n' "$dir"
elif [ ! -d "$tmp" ]; then
>&"$e" printf 'Not a '"$label"': \033[4;31m%s\033[0m\n' "$tmp"
>&"$e" printf '\n'
>&"$e" printf 'Make it a directory, then restart your shell.\n'
elif [ ! -w "$dir" ]; then
>&"$e" printf 'Temporary '"$label"' is not writable: \033[4;31m%s\033[0m\n' "$dir"
elif [ ! -w "$tmp" ]; then
>&"$e" printf 'Temporary '"$label"' is not writable: \033[4;31m%s\033[0m\n' "$tmp"
>&"$e" printf '\n'
>&"$e" printf 'Make it writable, then restart your shell.\n'
fi
@ -322,27 +307,29 @@ END
local data_file="$tmpdir"/"$1".tar.gz
local hash_file="$tmpdir"/"$1".tar.gz.sha256
local hash=
if command -v shasum >/dev/null 2>/dev/null; then
if run_cmd shasum -b -a 256 -- "$data_file" >"$hash_file"; then
IFS= read -r hash <"$hash_file" || hash=
hash="${hash%% *}"
fi
elif command -v sha256sum >/dev/null 2>/dev/null; then
if run_cmd sha256sum -b -- "$data_file" >"$hash_file"; then
IFS= read -r hash <"$hash_file" || hash=
hash="${hash%% *}"
fi
elif command -v sha256 >/dev/null 2>/dev/null; then
if run_cmd sha256 -- "$data_file" </dev/null >"$hash_file"; then
IFS= read -r hash <"$hash_file" || hash=
# Ignore sha256 output if it's from hashalot. It's incompatible.
if [ ${#hash} -lt 64 ]; then
hash=
else
hash="${hash##* }"
fi
fi
fi
{
command -v shasum >/dev/null 2>/dev/null &&
run_cmd shasum -b -a 256 -- "$data_file" >"$hash_file" </dev/null &&
IFS= read -r hash <"$hash_file" &&
hash="${hash%% *}" &&
[ ${#hash} -eq 64 ]
} || {
command -v sha256sum >/dev/null 2>/dev/null &&
run_cmd sha256sum -b -- "$data_file" >"$hash_file" </dev/null &&
IFS= read -r hash <"$hash_file" &&
hash="${hash%% *}" &&
[ ${#hash} -eq 64 ]
} || {
# Note: sha256 can be from hashalot. It's incompatible.
# Thankfully, it produces shorter output.
command -v sha256 >/dev/null 2>/dev/null &&
run_cmd sha256 -- "$data_file" >"$hash_file" </dev/null &&
IFS= read -r hash <"$hash_file" &&
hash="${hash##* }" &&
[ ${#hash} -eq 64 ]
} || {
hash=
}
[ "$1" = 1 -a -z "$hash" -o "$hash" = "$sha256" ]
}
@ -358,7 +345,7 @@ END
fi
fi
local cmd part url ret
for cmd in 'curl -q -kfsSL' 'wget --no-config -qO-' 'wget -qO-' 'curl -kfsSL'; do
for cmd in 'curl -kfsSL' 'wget -qO-' 'curl -q -kfsSL' 'wget --no-config -qO-'; do
part=0
while true; do
if [ "$part" = 2 ]; then
@ -386,9 +373,9 @@ END
local trapped=
trap 'trapped=1' $sig
fetch 1 "$url1" &
fetch 1 "$url1" &
local pid1="$!"
fetch 2 "$url2" &
fetch 2 "$url2" &
local pid2="$!"
local die="trap - $sig; kill -- $pid1 $pid2 2>/dev/null; wait -- $pid1 $pid2 2>/dev/null; exit 1"

@ -1,34 +1,34 @@
# 6a3d54a5a44abb4ee46ce72a8097389364746c6a
# 3
#
# This file is used by ./install and indirectly by shell bindings.
#
# The first line is read by powerlevel10k instant prompt. It must
# be updated whenever the content of this file changes. The actual
# value doesn't matter as long as it's unique. You can use the output
# of `git rev-parse HEAD`.
# value doesn't matter as long as it's unique. Consecutive integers
# work fine.
# Official gitstatusd binaries.
uname_s_glob="cygwin_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="c96baef70b81b5a1d46adcc9e93721eaf4bdc295562bdd2baf210a6b416b9911";
uname_s_glob="cygwin_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="18b5be49f6eb9ff1cf25e76d6f2333c7402e686e05ce5b88ca107c80504210d8";
uname_s_glob="darwin"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="26d582fe9a0b2090c28e84e5e32a6d42d6988cedff51e41ec5f789512c53b0fc";
uname_s_glob="freebsd"; uname_m_glob="amd64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="54a823373458a0908187ba8d1c5b8921015c844811916451674cc09fbdff88bb";
uname_s_glob="linux"; uname_m_glob="aarch64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="4e0a506eafb14b009cf6670f0e11399ac7e765cad17b9fcf38ef65516d248bfa";
uname_s_glob="linux"; uname_m_glob="armv6l"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="4cc78bf24c6cfb4580ae48b13e1f26b6b00869c612b5d662632f7561f7475252";
uname_s_glob="linux"; uname_m_glob="armv7l"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="80f5ebc8efe62a0c322e92d15d469e80f9d3ce967c5d5118138674c47f96747b";
uname_s_glob="linux"; uname_m_glob="armv8l"; file="gitstatusd-${uname_s}-aarch64"; version="v1.3.1"; sha256="4e0a506eafb14b009cf6670f0e11399ac7e765cad17b9fcf38ef65516d248bfa";
uname_s_glob="linux"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="ba506fbecf4a4430533e661bb63c7b77f6b4836ea013bdf8a6eabeace456f3b9";
uname_s_glob="linux"; uname_m_glob="ppc64le"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="1bf907db28ac7d6516add51be47b73b1854b84ecf46de56ccb1479e6a7e29ed2";
uname_s_glob="linux"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="91bcc1efafff8c896e8f172ff624d9407494f7a26b4ad1bf573f52623be2ca91";
uname_s_glob="msys_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="618d2425c6a22fa3762fe6fe252f9ddb4ed9138df1377e48b2f119cd4875f400";
uname_s_glob="msys_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="bdfae7a7c0fd83d0214a7eabde3b7d8709336bd08697a74d48bea4a04c352676";
uname_s_glob="cygwin_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="5a8a809dcebdb6aa9b47d37e086c0485424a9d9c136770eec3c26cedf5bb75e3";
uname_s_glob="cygwin_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f";
uname_s_glob="darwin"; uname_m_glob="arm64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="eae979e990ca37c56ee39fadd0c3f392cbbd0c6bdfb9a603010be60d9e48910a";
uname_s_glob="darwin"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="9fd3913ec1b6b856ab6e08a99a2343f0e8e809eb6b62ca4b0963163656c668e6";
uname_s_glob="freebsd"; uname_m_glob="amd64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="8e57ad642251e5acfa430aed82cd4ffe103db0bfadae4a15ccaf462c455d0442";
uname_s_glob="linux"; uname_m_glob="aarch64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="32b57eb28bf6d80b280e4020a0045184f8ca897b20b570c12948aa6838673225";
uname_s_glob="linux"; uname_m_glob="armv6l"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="4bf5a0d0a082f544a48536ad3675930d5d2cc6a8cf906710045e0788f51192b3";
uname_s_glob="linux"; uname_m_glob="armv7l"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="2b9deb29f86c8209114b71b94fc2e1ed936a1658808a1bee46f4a82fd6a1f8cc";
uname_s_glob="linux"; uname_m_glob="armv8l"; file="gitstatusd-${uname_s}-aarch64"; version="v1.5.4"; sha256="32b57eb28bf6d80b280e4020a0045184f8ca897b20b570c12948aa6838673225";
uname_s_glob="linux"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="56d55e2e9a202d3072fa612d8fa1faa61243ffc86418a7fa64c2c9d9a82e0f64";
uname_s_glob="linux"; uname_m_glob="ppc64le"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="1afd072c8c26ef6ec2d9ac11cef96c84cd6f10e859665a6ffcfb6112c758547e";
uname_s_glob="linux"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="9633816e7832109e530c9e2532b11a1edae08136d63aa7e40246c0339b7db304";
uname_s_glob="msys_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20";
uname_s_glob="msys_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732";
# Fallbacks to official gitstatusd binaries.
uname_s_glob="cygwin_nt-*"; uname_m_glob="i686"; file="gitstatusd-cygwin_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="c96baef70b81b5a1d46adcc9e93721eaf4bdc295562bdd2baf210a6b416b9911";
uname_s_glob="cygwin_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-cygwin_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="18b5be49f6eb9ff1cf25e76d6f2333c7402e686e05ce5b88ca107c80504210d8";
uname_s_glob="darwin"; uname_m_glob="arm64"; file="gitstatusd-${uname_s}-x86_64"; version="v1.3.1"; sha256="26d582fe9a0b2090c28e84e5e32a6d42d6988cedff51e41ec5f789512c53b0fc";
uname_s_glob="mingw32_nt-*"; uname_m_glob="i686"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="618d2425c6a22fa3762fe6fe252f9ddb4ed9138df1377e48b2f119cd4875f400";
uname_s_glob="mingw32_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="bdfae7a7c0fd83d0214a7eabde3b7d8709336bd08697a74d48bea4a04c352676";
uname_s_glob="mingw64_nt-*"; uname_m_glob="i686"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="618d2425c6a22fa3762fe6fe252f9ddb4ed9138df1377e48b2f119cd4875f400";
uname_s_glob="mingw64_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="bdfae7a7c0fd83d0214a7eabde3b7d8709336bd08697a74d48bea4a04c352676";
uname_s_glob="msys_nt-*"; uname_m_glob="i686"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="618d2425c6a22fa3762fe6fe252f9ddb4ed9138df1377e48b2f119cd4875f400";
uname_s_glob="msys_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="bdfae7a7c0fd83d0214a7eabde3b7d8709336bd08697a74d48bea4a04c352676";
uname_s_glob="cygwin_nt-*"; uname_m_glob="i686"; file="gitstatusd-cygwin_nt-10.0-${uname_m}"; version="v1.5.2"; sha256="5a8a809dcebdb6aa9b47d37e086c0485424a9d9c136770eec3c26cedf5bb75e3";
uname_s_glob="cygwin_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-cygwin_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f";
uname_s_glob="mingw32_nt-*"; uname_m_glob="i686"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20";
uname_s_glob="mingw32_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732";
uname_s_glob="mingw64_nt-*"; uname_m_glob="i686"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20";
uname_s_glob="mingw64_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732";
uname_s_glob="msys_nt-*"; uname_m_glob="i686"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20";
uname_s_glob="msys_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732";

@ -5,7 +5,7 @@
# Usage: mbuild [-b git-ref] [kernel-arch]...
#
# Builds a bunch of gitstatusd-* binaries. Without arguments builds binaries
# for all platforms. git-ref defaults to src.
# for all platforms. git-ref defaults to master.
#
# Before using this script you need to set up build servers and list them
# in ~/.ssh/config. There should be a Host entry for every value of `assets`
@ -94,9 +94,7 @@
setopt no_unset extended_glob pipe_fail prompt_percent typeset_silent \
no_prompt_subst no_prompt_bang pushd_silent warn_create_global
autoload -Uz is-at-least
if ! is-at-least 5.1 || [[ $ZSH_VERSION == 5.4.* ]]; then
if [[ $ZSH_VERSION != (5.<1->*|<6->.*) || $ZSH_VERSION == 5.4(|.*) ]]; then
print -ru2 -- "[error] unsupported zsh version: $ZSH_VERSION"
return 1
fi
@ -111,6 +109,7 @@ local -rA assets=(
cygwin_nt-10.0-x86_64 build-windows-x86_64
msys_nt-10.0-i686 build-windows-x86_64
msys_nt-10.0-x86_64 build-windows-x86_64
darwin-arm64 build-macos-arm64
darwin-x86_64 build-macos-x86_64
freebsd-amd64 build-freebsd-amd64
linux-aarch64 build-linux-aarch64
@ -138,7 +137,7 @@ function usage() {
print -r -- 'usage: mbuild [-b REF] [KERNEL-ARCH]...'
}
local OPTARG opt git_ref=src
local OPTARG opt git_ref=master
local -i OPTIND
while getopts ":b:h" opt; do
case $opt in
@ -211,10 +210,11 @@ function build-windows() {
tmp='/cygdrive/c/tmp'
;|
msys_nt-10.0-*)
flags+=(-s)
tmp='/c/tmp'
env='MSYSTEM=MSYS'
intro='pacman -Syu --noconfirm; pacman -S --needed --noconfirm git; '
# TODO: fix this (some errors about PGP keys).
# flags+=(-s)
# intro='pacman -S --needed --noconfirm git; '
intro+='PATH="$PATH:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl"'
while true; do
# TODO: run autorebase only when getting an error that can be fixed by autorebasing.
@ -229,6 +229,8 @@ function build-windows() {
done
() {
while true; do
# TODO: fix this (some errors about PGP keys).
break
local -i fd
exec {fd}< <(
ssh $1 $c/$bin/env.exe $env c:/$bin/bash.exe -l 2>&1 <<<"
@ -267,16 +269,52 @@ function build-windows() {
chmod +x $binaries/gitstatusd-$2
}
if [[ -r /proc/version && "$(</proc/version)" == *Microsoft* ]]; then
() {
(( $# )) || return 0
print -ru2 -- "WARNING: lock files exist: $@"
(( $# )) && rm -- $@
} $locks/*(N)
function flock() {
local fd
sysopen -ro cloexec -u fd <(
exec </dev/null 2>/dev/null
(
trap '' TERM PIPE
local fd
while true; do
sysopen -wo create,excl -u fd -- $1 && break
sleep 1
done
exec {fd}>&-
while true; do
print || break
done
rm -- $1
) &!
)
local REPLY
IFS= read -ru $fd
}
else
function flock() {
: >>$1
zsystem flock $1
}
fi
function build() (
setopt xtrace
local platform=$1
local machine=$assets[$platform]
print -n >>$locks/$machine
zsystem flock $locks/$machine
flock $locks/$machine
build-${protocol[(k)$platform]} $machine $platform
local tmp=gitstatusd-$platform.tmp.$$.tar.gz
( cd -q -- $binaries; tar --owner=0 --group=0 -I 'gzip -9' -cf $tmp gitstatusd-$platform )
mv -f -- $binaries/$tmp $binaries/gitstatusd-$platform.tar.gz
# Make sure the last command is a built-in (important for flock).
:
)
function mbuild() {
@ -361,4 +399,8 @@ function run-process-tree() {
}
mkdir -p -- $logs $locks $binaries
run-process-tree mbuild $@
() {
run-process-tree mbuild $@
exit
} "$@"

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

@ -106,14 +106,14 @@ bool ListDir(int dir_fd, Arena& arena, std::vector<char*>& entries, bool precomp
};
constexpr size_t kBufSize = 8 << 10;
entries.clear();
const size_t orig_size = entries.size();
while (true) {
char* buf = static_cast<char*>(arena.Allocate(kBufSize, alignof(linux_dirent64)));
// Save 256 bytes for the rainy day.
int n = syscall(SYS_getdents64, dir_fd, buf, kBufSize - 256);
if (n < 0) {
entries.clear();
entries.resize(orig_size);
return false;
}
for (int pos = 0; pos < n;) {
@ -131,9 +131,9 @@ bool ListDir(int dir_fd, Arena& arena, std::vector<char*>& entries, bool precomp
}
if (case_sensitive) {
SortEntries<true>(entries.data(), entries.data() + entries.size());
SortEntries<true>(entries.data() + orig_size, entries.data() + entries.size());
} else {
SortEntries<false>(entries.data(), entries.data() + entries.size());
SortEntries<false>(entries.data() + orig_size, entries.data() + entries.size());
}
return true;
@ -211,7 +211,7 @@ char* DirenvConvert(Arena& arena, struct dirent& ent, bool do_convert) {
bool ListDir(int dir_fd, Arena& arena, std::vector<char*>& entries, bool precompose_unicode,
bool case_sensitive) {
entries.clear();
const size_t orig_size = entries.size();
dir_fd = dup(dir_fd);
if (dir_fd < 0) return false;
DIR* dir = fdopendir(dir_fd);
@ -225,10 +225,10 @@ bool ListDir(int dir_fd, Arena& arena, std::vector<char*>& entries, bool precomp
entries.push_back(DirenvConvert(arena, *ent, precompose_unicode));
}
if (errno) {
entries.clear();
entries.resize(orig_size);
return false;
}
StrSort(entries.data(), entries.data() + entries.size(), case_sensitive);
StrSort(entries.data() + orig_size, entries.data() + entries.size(), case_sensitive);
return true;
}

@ -25,11 +25,11 @@
namespace gitstatus {
// On error, clears entries and returns false. Does not throw.
// On error, leaves entries unchanged and returns false. Does not throw.
//
// On success, fills entries with the names of files from the specified directory and returns true.
// Every entry is a null-terminated string. At -1 offset is its d_type. All elements point into the
// arena. They are sorted either by strcmp or strcasecmp depending on case_sensitive.
// 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
// point into the arena. They are sorted either by strcmp or strcasecmp depending on case_sensitive.
//
// Does not close dir_fd.
//

@ -239,4 +239,12 @@ PushRemotePtr GetPushRemote(git_repository* repo, const git_reference* local) {
return PushRemotePtr(res.release());
}
CommitMessage GetCommitMessage(git_repository* repo, const git_oid& id) {
git_commit* commit;
VERIFY(!git_commit_lookup(&commit, repo, &id)) << GitError();
ON_SCOPE_EXIT(=) { git_commit_free(commit); };
return {.encoding = git_commit_message_encoding(commit) ?: "",
.summary = git_commit_summary(commit) ?: ""};
}
} // namespace gitstatus

@ -48,6 +48,15 @@ git_reference* Head(git_repository* repo);
// Returns the name of the local branch, or an empty string.
const char* LocalBranchName(const git_reference* ref);
struct CommitMessage {
// Can be empty, meaning "UTF-8".
std::string encoding;
// The first paragraph of the commit's message as a one-liner.
std::string summary;
};
CommitMessage GetCommitMessage(git_repository* repo, const git_oid& id);
struct Remote {
// Tip of the remote branch.
git_reference* ref;

@ -41,6 +41,10 @@ namespace {
using namespace std::string_literals;
void Truncate(std::string& s, size_t max_len) {
if (s.size() > max_len) s.resize(max_len);
}
void ProcessRequest(const Options& opts, RepoCache& cache, Request req) {
Timer timer;
ON_SCOPE_EXIT(&) { timer.Report("request"); };
@ -167,6 +171,11 @@ void ProcessRequest(const Options& opts, RepoCache& cache, Request req) {
// The number of files in the index with assume-unchanged bit set.
resp.Print(stats.num_assume_unchanged);
CommitMessage msg = head_target ? GetCommitMessage(repo->repo(), *head_target) : CommitMessage();
Truncate(msg.summary, opts.max_commit_summary_length);
resp.Print(msg.encoding);
resp.Print(msg.summary);
resp.Dump("with git status");
}

@ -242,6 +242,7 @@ std::vector<const char*> ScanDirs(git_index* index, int root_fd, IndexDir* const
dir.st = st;
}
entries.clear();
arena.Reuse();
if (!ListDir(*dir_fd, arena, entries, caps.precompose_unicode, caps.case_sensitive)) {
AddUnmached("");

@ -53,9 +53,15 @@ long ParseInt(const char* s) {
return res;
}
size_t ParseSizeT(const char* s) {
static_assert(sizeof(long) <= sizeof(size_t), "");
long res = ParseLong(s);
return res >= 0 ? res : -1;
}
void PrintUsage() {
std::cout << "Usage: gitstatusd [OPTION]...\n"
<< "Print machine-readable status of the git repos for directores in stdin.\n"
<< "Print machine-readable status of the git repos for directories in stdin.\n"
<< "\n"
<< "OPTIONS\n"
<< " -l, --lock-fd=NUM [default=-1]\n"
@ -72,7 +78,7 @@ void PrintUsage() {
<< " maximum performance.\n"
<< "\n"
<< " -v, --log-level=STR [default=INFO]\n"
<< " Don't write entires to log whose log level is below this. Log levels in\n"
<< " Don't write entries to log whose log level is below this. Log levels in\n"
<< " increasing order: DEBUG, INFO, WARN, ERROR, FATAL.\n"
<< "\n"
<< " -r, --repo-ttl-seconds=NUM [default=3600]\n"
@ -81,12 +87,18 @@ void PrintUsage() {
<< " repo that's been closed is much slower than for a repo that hasn't been.\n"
<< " Negative value means infinity.\n"
<< "\n"
<< " -z, --max-commit-summary-length=NUM [default=256]\n"
<< " Truncate commit summary if it's longer than this many bytes.\n"
<< "\n"
<< " -s, --max-num-staged=NUM [default=1]\n"
<< " Report at most this many staged changes; negative value means infinity.\n"
<< "\n"
<< " -u, --max-num-unstaged=NUM [default=1]\n"
<< " Report at most this many unstaged changes; negative value means infinity.\n"
<< "\n"
<< " -c, --max-num-conflicted=NUM [default=1]\n"
<< " Report at most this many conflicted changes; negative value means infinity.\n"
<< "\n"
<< " -d, --max-num-untracked=NUM [default=1]\n"
<< " Report at most this many untracked files; negative value means infinity.\n"
<< "\n"
@ -129,7 +141,7 @@ void PrintUsage() {
<< "\n"
<< " 1. Request ID. Any string. Can be empty.\n"
<< " 2. Path to the directory for which git stats are being requested.\n"
<< " If the first character is ':', it is removed and the remaning path\n"
<< " If the first character is ':', it is removed and the remaining path\n"
<< " is treated as GIT_DIR.\n"
<< " 3. (Optional) '1' to disable computation of anything that requires reading\n"
<< " git index; '0' for the default behavior of computing everything.\n"
@ -170,6 +182,8 @@ void PrintUsage() {
<< " 25. Number of commits the current branch is behind push remote.\n"
<< " 26. Number of files in the index with skip-worktree bit set.\n"
<< " 27. Number of files in the index with assume-unchanged bit set.\n"
<< " 28. Encoding of the HEAD's commit message. Empty value means UTF-8.\n"
<< " 29. The first paragraph of the HEAD's commit message as one line.\n"
<< "\n"
<< "Note: Renamed files are reported as deleted plus new.\n"
<< "\n"
@ -212,6 +226,8 @@ void PrintUsage() {
<< " '0'\n"
<< " '0'\n"
<< " '0'\n"
<< " ''\n"
<< " 'add a build server for darwin-arm64'\n"
<< "\n"
<< "EXIT STATUS\n"
<< "\n"
@ -239,12 +255,13 @@ const char* Version() {
Options ParseOptions(int argc, char** argv) {
const struct option opts[] = {{"help", no_argument, nullptr, 'h'},
{"version", no_argument, nullptr, 'V'},
{"version-glob", no_argument, nullptr, 'G'},
{"version-glob", required_argument, nullptr, 'G'},
{"lock-fd", required_argument, nullptr, 'l'},
{"parent-pid", required_argument, nullptr, 'p'},
{"num-threads", required_argument, nullptr, 't'},
{"log-level", required_argument, nullptr, 'v'},
{"repo-ttl-seconds", required_argument, nullptr, 'r'},
{"max-commit-summary-length", required_argument, nullptr, 'z'},
{"max-num-staged", required_argument, nullptr, 's'},
{"max-num-unstaged", required_argument, nullptr, 'u'},
{"max-num-conflicted", required_argument, nullptr, 'c'},
@ -257,7 +274,7 @@ Options ParseOptions(int argc, char** argv) {
{}};
Options res;
while (true) {
switch (getopt_long(argc, argv, "hVG:l:p:t:v:r:s:u:c:d:m:eUWD", opts, nullptr)) {
switch (getopt_long(argc, argv, "hVG:l:p:t:v:r:z:s:u:c:d:m:eUWD", opts, nullptr)) {
case -1:
if (optind != argc) {
std::cerr << "unexpected positional argument: " << argv[optind] << std::endl;
@ -306,20 +323,23 @@ Options ParseOptions(int argc, char** argv) {
res.num_threads = n;
break;
}
case 'z':
res.max_commit_summary_length = ParseSizeT(optarg);
break;
case 's':
res.max_num_staged = ParseLong(optarg);
res.max_num_staged = ParseSizeT(optarg);
break;
case 'u':
res.max_num_unstaged = ParseLong(optarg);
res.max_num_unstaged = ParseSizeT(optarg);
break;
case 'c':
res.max_num_conflicted = ParseLong(optarg);
res.max_num_conflicted = ParseSizeT(optarg);
break;
case 'd':
res.max_num_untracked = ParseLong(optarg);
res.max_num_untracked = ParseSizeT(optarg);
break;
case 'm':
res.dirty_max_index_size = ParseLong(optarg);
res.dirty_max_index_size = ParseSizeT(optarg);
break;
case 'e':
res.recurse_untracked_dirs = true;

@ -27,6 +27,8 @@
namespace gitstatus {
struct Limits {
// Truncate commit summary if it's longer than this many bytes.
size_t max_commit_summary_length = 256;
// Report at most this many staged changes.
size_t max_num_staged = 1;
// Report at most this many unstaged changes.
@ -60,7 +62,7 @@ struct Options : Limits {
// If non-negative, send signal 0 to the specified PID when not receiving any requests for one
// second; exit if signal sending fails.
int parent_pid = -1;
// Don't write entires to log whose log level is below this. Log levels in increasing order:
// Don't write entries to log whose log level is below this. Log levels in increasing order:
// DEBUG, INFO, WARN, ERROR, FATAL.
LogLevel log_level = INFO;
// Close git repositories that haven't been used for this long. This is meant to release resources

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

@ -155,6 +155,8 @@ void TagDb::ReadLooseTags() {
int dir_fd = open(dirname.c_str(), O_RDONLY | O_DIRECTORY | O_CLOEXEC);
if (dir_fd < 0) return;
ON_SCOPE_EXIT(&) { CHECK(!close(dir_fd)) << Errno(); };
// TODO: recursively traverse directories so that the file refs/tags/foo/bar gets interpreted
// as the tag foo/bar. See https://github.com/romkatv/gitstatus/issues/254.
(void)ListDir(dir_fd, loose_arena_, loose_tags_, /* precompose_unicode = */ false,
/* case_sensitive = */ true);
}
@ -212,13 +214,29 @@ void TagDb::ParsePack() {
char* p = &pack_[0];
char* e = p + pack_.size();
if (*p == '#') {
char* eol = std::strchr(p, '\n');
if (!eol) return;
*eol = 0;
if (!std::strstr(p, " fully-peeled") || !std::strstr(p, " sorted")) return;
p = eol + 1;
// Usually packed-refs starts with the following line:
//
// # pack-refs with: peeled fully-peeled sorted
//
// However, some users can produce pack-refs without this line.
// See https://github.com/romkatv/powerlevel10k/issues/1428.
// I don't know how they do it. Without the header line we cannot
// assume that refs are sorted, which isn't a big deal because we
// can just sort them. What's worse is that refs cannot be assumed
// to be fully-peeled. We don't want to peel them, so we just drop
// all tags.
if (*p != '#') {
LOG(WARN) << "packed-refs doesn't have a header. Won't resolve tags.";
return;
}
char* eol = std::strchr(p, '\n');
if (!eol) return;
*eol = 0;
if (!std::strstr(p, " fully-peeled") || !std::strstr(p, " sorted")) {
LOG(WARN) << "packed-refs has unexpected header. Won't resolve tags.";
}
p = eol + 1;
name2id_.reserve(pack_.size() / 128);
id2name_.reserve(pack_.size() / 128);
@ -249,7 +267,10 @@ void TagDb::ParsePack() {
id2name_.push_back(tag);
}
VERIFY(std::is_sorted(name2id_.begin(), name2id_.end(), ByName));
if (!std::is_sorted(name2id_.begin(), name2id_.end(), ByName)) {
// "sorted" in the header of packed-refs promises that this won't trigger.
std::sort(name2id_.begin(), name2id_.end(), ByName);
}
id2name_dirty_ = true;
GlobalThreadPool()->Schedule([this] {

@ -18,7 +18,6 @@ function _p9k_can_configure() {
typeset -g __p9k_cfg_path=${__p9k_cfg_path_o:A}
typeset -g __p9k_cfg_path_u=${${${(q)__p9k_cfg_path_o}/#(#b)${(q)HOME}(|\/*)/'~'$match[1]}//\%/%%}
{
[[ -o multibyte ]] || { $0_error "multibyte option is not set"; return 1 }
[[ -e $__p9k_zd ]] || { $0_error "$__p9k_zd_u does not exist"; return 1 }
[[ -d $__p9k_zd ]] || { $0_error "$__p9k_zd_u is not a directory"; return 1 }
[[ ! -d $__p9k_cfg_path ]] || { $0_error "$__p9k_cfg_path_u is a directory"; return 1 }
@ -59,7 +58,10 @@ function _p9k_can_configure() {
$0_error "terminal size too small; must be at least $__p9k_wizard_columns columns by $__p9k_wizard_lines lines"
return 1
}
[[ -t 0 && -t 1 ]] || { $0_error "no TTY"; return 2 }
[[ -t 0 && -t 1 ]] || {
$0_error "no TTY"
return 2
}
return 0
} always {
unfunction $0_error

@ -52,6 +52,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON '\uE271'$s # 
LINUX_RASPBIAN_ICON '\uE271'$s # 
LINUX_UBUNTU_ICON '\uE271'$s # 
LINUX_KALI_ICON '\uE271'$s # 
LINUX_CENTOS_ICON '\uE271'$s # 
LINUX_COREOS_ICON '\uE271'$s # 
LINUX_ELEMENTARY_ICON '\uE271'$s # 
@ -69,6 +70,12 @@ function _p9k_init_icons() {
LINUX_SLACKWARE_ICON '\uE271'$s # 
LINUX_VOID_ICON '\uE271'$s # 
LINUX_ARTIX_ICON '\uE271'$s # 
LINUX_RHEL_ICON '\uE271'$s # 
LINUX_AMZN_ICON '\uE271'$s # 
LINUX_ENDEAVOUROS_ICON '\uE271'$s # 
LINUX_ROCKY_ICON '\uE271'$s # 
LINUX_GUIX_ICON '\uE271'$s # 
LINUX_NEON_ICON '\uE271'$s # 
SUNOS_ICON '\U1F31E'$q # 🌞
HOME_ICON '\uE12C'$s # 
HOME_SUB_ICON '\uE18D'$s # 
@ -99,10 +106,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uE20E ' #
VCS_GIT_BITBUCKET_ICON '\uE20E ' #
VCS_GIT_GITLAB_ICON '\uE20E ' #
VCS_GIT_AZURE_ICON '\uE20E ' #
VCS_GIT_ARCHLINUX_ICON '\uE20E ' #
VCS_GIT_CODEBERG_ICON '\uE20E ' #
VCS_GIT_DEBIAN_ICON '\uE20E ' #
VCS_GIT_FREEBSD_ICON '\uE20E ' #
VCS_GIT_FREEDESKTOP_ICON '\uE20E ' #
VCS_GIT_GNOME_ICON '\uE20E ' #
VCS_GIT_GNU_ICON '\uE20E ' #
VCS_GIT_KDE_ICON '\uE20E ' #
VCS_GIT_LINUX_ICON '\uE20E ' #
VCS_GIT_GITEA_ICON '\uE20E ' #
VCS_GIT_SOURCEHUT_ICON '\uE20E ' #
VCS_HG_ICON '\uE1C3 ' # 
VCS_SVN_ICON 'svn'$q
RUST_ICON 'R'
PYTHON_ICON '\uE63C'$s #  (doesn't always work)
CHEZMOI_ICON '\uE12C'$s # 
SWIFT_ICON 'Swift'
GO_ICON 'Go'
GOLANG_ICON 'Go'
@ -119,6 +139,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@ -132,6 +153,8 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
NIX_SHELL_ICON 'nix'
@ -144,6 +167,9 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
HISTORY_ICON 'hist'
)
;;
'awesome-fontconfig')
@ -184,6 +210,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON '\uF17C'$s # 
LINUX_RASPBIAN_ICON '\uF17C'$s # 
LINUX_UBUNTU_ICON '\uF17C'$s # 
LINUX_KALI_ICON '\uF17C'$s # 
LINUX_CENTOS_ICON '\uF17C'$s # 
LINUX_COREOS_ICON '\uF17C'$s # 
LINUX_ELEMENTARY_ICON '\uF17C'$s # 
@ -201,6 +228,12 @@ function _p9k_init_icons() {
LINUX_SLACKWARE_ICON '\uF17C'$s # 
LINUX_VOID_ICON '\uF17C'$s # 
LINUX_ARTIX_ICON '\uF17C'$s # 
LINUX_RHEL_ICON '\uF17C'$s # 
LINUX_AMZN_ICON '\uF17C'$s # 
LINUX_ENDEAVOUROS_ICON '\uF17C'$s # 
LINUX_ROCKY_ICON '\uF17C'$s # 
LINUX_GUIX_ICON '\uF17C'$s # 
LINUX_NEON_ICON '\uF17C'$s # 
SUNOS_ICON '\uF185 ' # 
HOME_ICON '\uF015'$s # 
HOME_SUB_ICON '\uF07C'$s # 
@ -227,10 +260,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uF113 ' # 
VCS_GIT_BITBUCKET_ICON '\uF171 ' # 
VCS_GIT_GITLAB_ICON '\uF296 ' # 
VCS_GIT_AZURE_ICON '\u2601 ' # ☁
VCS_GIT_ARCHLINUX_ICON '\uF1D3 ' # 
VCS_GIT_CODEBERG_ICON '\uF1D3 ' # 
VCS_GIT_DEBIAN_ICON '\uF1D3 ' # 
VCS_GIT_FREEBSD_ICON '\uF1D3 ' # 
VCS_GIT_FREEDESKTOP_ICON '\uF1D3 ' # 
VCS_GIT_GNOME_ICON '\uF1D3 ' # 
VCS_GIT_GNU_ICON '\uF1D3 ' # 
VCS_GIT_KDE_ICON '\uF1D3 ' # 
VCS_GIT_LINUX_ICON '\uF1D3 ' # 
VCS_GIT_GITEA_ICON '\uF1D3 ' # 
VCS_GIT_SOURCEHUT_ICON '\uF1D3 ' # 
VCS_HG_ICON '\uF0C3 ' # 
VCS_SVN_ICON 'svn'$q
RUST_ICON '\uE6A8' # 
PYTHON_ICON '\uE63C'$s # 
CHEZMOI_ICON '\uF015'$s # 
SWIFT_ICON 'Swift'
GO_ICON 'Go'
GOLANG_ICON 'Go'
@ -239,7 +285,7 @@ function _p9k_init_icons() {
NORDVPN_ICON '\UF023' # 
EXECUTION_TIME_ICON '\uF253'$s # 
SSH_ICON 'ssh'
VPN_ICON '\uF023'
VPN_ICON '\uF023'
KUBERNETES_ICON '\U2388' # ⎈
DROPBOX_ICON '\UF16B'$s # 
DATE_ICON '\uF073 ' # 
@ -247,6 +293,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@ -260,6 +307,8 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
NIX_SHELL_ICON 'nix'
@ -272,6 +321,9 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
HISTORY_ICON 'hist'
)
;;
'awesome-mapped-fontconfig')
@ -317,6 +369,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_RASPBIAN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_UBUNTU_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_KALI_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_CENTOS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_COREOS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_ELEMENTARY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
@ -334,6 +387,12 @@ function _p9k_init_icons() {
LINUX_SLACKWARE_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_VOID_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_ARTIX_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_ENDEAVOUROS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_ROCKY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_GUIX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_NEON_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
SUNOS_ICON "${CODEPOINT_OF_AWESOME_SUN_O:+\\u$CODEPOINT_OF_AWESOME_SUN_O }"
HOME_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME$s}"
HOME_SUB_ICON "${CODEPOINT_OF_AWESOME_FOLDER_OPEN:+\\u$CODEPOINT_OF_AWESOME_FOLDER_OPEN$s}"
@ -360,10 +419,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON "${CODEPOINT_OF_AWESOME_GITHUB_ALT:+\\u$CODEPOINT_OF_AWESOME_GITHUB_ALT }"
VCS_GIT_BITBUCKET_ICON "${CODEPOINT_OF_AWESOME_BITBUCKET:+\\u$CODEPOINT_OF_AWESOME_BITBUCKET }"
VCS_GIT_GITLAB_ICON "${CODEPOINT_OF_AWESOME_GITLAB:+\\u$CODEPOINT_OF_AWESOME_GITLAB }"
VCS_GIT_AZURE_ICON '\u2601 ' # ☁
VCS_GIT_ARCHLINUX_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_CODEBERG_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_DEBIAN_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_FREEBSD_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_FREEDESKTOP_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_GNOME_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_GNU_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_KDE_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_LINUX_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_GITEA_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_SOURCEHUT_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_HG_ICON "${CODEPOINT_OF_AWESOME_FLASK:+\\u$CODEPOINT_OF_AWESOME_FLASK }"
VCS_SVN_ICON 'svn'$q
RUST_ICON '\uE6A8' # 
PYTHON_ICON '\U1F40D' # 🐍
CHEZMOI_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME$s}"
SWIFT_ICON '\uE655'$s # 
PUBLIC_IP_ICON "${CODEPOINT_OF_AWESOME_GLOBE:+\\u$CODEPOINT_OF_AWESOME_GLOBE$s}"
LOCK_ICON "${CODEPOINT_OF_AWESOME_LOCK:+\\u$CODEPOINT_OF_AWESOME_LOCK}"
@ -378,6 +450,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@ -391,6 +464,8 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
NIX_SHELL_ICON 'nix'
@ -403,6 +478,169 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
HISTORY_ICON 'hist'
)
;;
'nerdfont-v3')
# In this version of Nerd Fonts the Material icons are mapped to U+F0001-U+F19C3.
# The font may also have Material icons in the old range of U+F500-U+FD46 but
# powerlevel10k won't rely on them.
icons=(
RULER_CHAR '\u2500' # ─
LEFT_SEGMENT_SEPARATOR '\uE0B0' # 
RIGHT_SEGMENT_SEPARATOR '\uE0B2' # 
LEFT_SEGMENT_END_SEPARATOR ' ' #
LEFT_SUBSEGMENT_SEPARATOR '\uE0B1' # 
RIGHT_SUBSEGMENT_SEPARATOR '\uE0B3' # 
CARRIAGE_RETURN_ICON '\u21B5' # ↵
ROOT_ICON '\uE614'$q # 
SUDO_ICON '\uF09C'$s # 
RUBY_ICON '\uF219 ' # 
AWS_ICON '\uF270'$s # 
AWS_EB_ICON '\UF1BD'$q$q # 
BACKGROUND_JOBS_ICON '\uF013 ' # 
TEST_ICON '\uF188'$s # 
TODO_ICON '\u2611' # ☑
BATTERY_ICON '\UF240 ' # 
DISK_ICON '\uF0A0'$s # 
OK_ICON '\uF00C'$s # 
FAIL_ICON '\uF00D' # 
SYMFONY_ICON '\uE757' # 
NODE_ICON '\uE617 ' # 
NODEJS_ICON '\uE617 ' # 
MULTILINE_FIRST_PROMPT_PREFIX '\u256D\U2500' # ╭─
MULTILINE_NEWLINE_PROMPT_PREFIX '\u251C\U2500' # ├─
MULTILINE_LAST_PROMPT_PREFIX '\u2570\U2500 ' # ╰─
APPLE_ICON '\uF179' # 
WINDOWS_ICON '\uF17A'$s # 
FREEBSD_ICON '\UF30C ' # 
ANDROID_ICON '\uF17B' # 
LINUX_ARCH_ICON '\uF303' # 
LINUX_CENTOS_ICON '\uF304'$s # 
LINUX_COREOS_ICON '\uF305'$s # 
LINUX_DEBIAN_ICON '\uF306' # 
LINUX_RASPBIAN_ICON '\uF315' # 
LINUX_ELEMENTARY_ICON '\uF309'$s # 
LINUX_FEDORA_ICON '\uF30a'$s # 
LINUX_GENTOO_ICON '\uF30d'$s # 
LINUX_MAGEIA_ICON '\uF310' # 
LINUX_MINT_ICON '\uF30e'$s # 
LINUX_NIXOS_ICON '\uF313'$s # 
LINUX_MANJARO_ICON '\uF312'$s # 
LINUX_DEVUAN_ICON '\uF307'$s # 
LINUX_ALPINE_ICON '\uF300'$s # 
LINUX_AOSC_ICON '\uF301'$s # 
LINUX_OPENSUSE_ICON '\uF314'$s # 
LINUX_SABAYON_ICON '\uF317'$s # 
LINUX_SLACKWARE_ICON '\uF319'$s # 
LINUX_VOID_ICON '\UF32E'$s # 
LINUX_ARTIX_ICON '\UF31F'$s # 
LINUX_UBUNTU_ICON '\uF31b'$s # 
LINUX_KALI_ICON '\uF327'$s # 
LINUX_RHEL_ICON '\UF111B'$s # 󱄛
LINUX_AMZN_ICON '\uF270'$s # 
LINUX_ENDEAVOUROS_ICON '\UF322'$s # 
LINUX_ROCKY_ICON '\UF32B'$s # 
LINUX_GUIX_ICON '\UF325'$s # 
LINUX_NEON_ICON '\uF17C' # 
LINUX_ICON '\uF17C' # 
SUNOS_ICON '\uF185 ' # 
HOME_ICON '\uF015'$s # 
HOME_SUB_ICON '\uF07C'$s # 
FOLDER_ICON '\uF115'$s # 
ETC_ICON '\uF013'$s # 
NETWORK_ICON '\UF0378'$s # 󰍸
LOAD_ICON '\uF080 ' # 
SWAP_ICON '\uF464'$s # 
RAM_ICON '\uF0E4'$s # 
SERVER_ICON '\uF0AE'$s # 
VCS_UNTRACKED_ICON '\uF059'$s # 
VCS_UNSTAGED_ICON '\uF06A'$s # 
VCS_STAGED_ICON '\uF055'$s # 
VCS_STASH_ICON '\uF01C ' # 
VCS_INCOMING_CHANGES_ICON '\uF01A ' # 
VCS_OUTGOING_CHANGES_ICON '\uF01B ' # 
VCS_TAG_ICON '\uF02B ' # 
VCS_BOOKMARK_ICON '\uF461 ' # 
VCS_COMMIT_ICON '\uE729 ' # 
VCS_BRANCH_ICON '\uF126 ' # 
VCS_REMOTE_BRANCH_ICON '\uE728 ' # 
VCS_LOADING_ICON '' #
VCS_GIT_ICON '\uF1D3 ' # 
VCS_GIT_GITHUB_ICON '\uF113 ' # 
VCS_GIT_BITBUCKET_ICON '\uE703 ' # 
VCS_GIT_GITLAB_ICON '\uF296 ' # 
VCS_GIT_AZURE_ICON '\uEBE8 ' # 
VCS_GIT_ARCHLINUX_ICON '\uF303 ' # 
# v3.1 has \uF330.
VCS_GIT_CODEBERG_ICON '\uF1D3 ' # 
VCS_GIT_DEBIAN_ICON '\uF306 ' # 
VCS_GIT_FREEBSD_ICON '\UF30C ' # 
# v3.1 has \uF360.
VCS_GIT_FREEDESKTOP_ICON '\uF296 ' # 
# v3.1 has \uF361.
VCS_GIT_GNOME_ICON '\uF296 ' # 
VCS_GIT_GNU_ICON '\uE779 ' # 
# v3.1 has \uF332.
VCS_GIT_KDE_ICON '\uF296 ' # 
VCS_GIT_LINUX_ICON '\uF17C ' # 
# v3.1 has \uF339.
VCS_GIT_GITEA_ICON '\uF1D3 ' # 
VCS_GIT_SOURCEHUT_ICON '\uF1DB ' # 
VCS_HG_ICON '\uF0C3 ' # 
VCS_SVN_ICON '\uE72D'$q # 
RUST_ICON '\uE7A8'$q # 
PYTHON_ICON '\UE73C ' # 
CHEZMOI_ICON '\uF015'$s # 
SWIFT_ICON '\uE755' # 
GO_ICON '\uE626' # 
GOLANG_ICON '\uE626' # 
PUBLIC_IP_ICON '\UF0AC'$s # 
LOCK_ICON '\UF023' # 
NORDVPN_ICON '\UF023' # 
EXECUTION_TIME_ICON '\uF252'$s # 
SSH_ICON '\uF489'$s # 
VPN_ICON '\UF023' # 
KUBERNETES_ICON '\UF10FE' # 󱃾
DROPBOX_ICON '\UF16B'$s # 
DATE_ICON '\uF073 ' # 
TIME_ICON '\uF017 ' # 
JAVA_ICON '\uE738' # 
LARAVEL_ICON '\ue73f'$q # 
RANGER_ICON '\uF00b ' # 
YAZI_ICON '\uF00b ' # 
MIDNIGHT_COMMANDER_ICON 'mc' # mc
VIM_ICON '\uE62B' # 
TERRAFORM_ICON '\uF1BB ' # 
PROXY_ICON '\u2194' # ↔
DOTNET_ICON '\uE77F' # 
DOTNET_CORE_ICON '\uE77F' # 
AZURE_ICON '\uEBD8 ' # 
DIRENV_ICON '\u25BC' # ▼
FLUTTER_ICON 'F' # F
GCLOUD_ICON '\UF02AD' # 󰊭
LUA_ICON '\uE620' # 
PERL_ICON '\uE769' # 
NNN_ICON 'nnn' # nnn
LF_ICON 'lf' # lf
XPLR_ICON 'xplr' # xplr
TIMEWARRIOR_ICON '\uF49B' # 
TASKWARRIOR_ICON '\uF4A0 ' # 
NIX_SHELL_ICON '\uF313 ' # 
WIFI_ICON '\uF1EB ' # 
ERLANG_ICON '\uE7B1 ' # 
ELIXIR_ICON '\uE62D' # 
POSTGRES_ICON '\uE76E' # 
PHP_ICON '\uE608' # 
HASKELL_ICON '\uE61F' # 
PACKAGE_ICON '\UF03D7' # 󰏗
JULIA_ICON '\uE624' # 
SCALA_ICON '\uE737' # 
TOOLBOX_ICON '\uE20F'$s # 
ARCH_ICON '\uE266' # 
HISTORY_ICON '\uF1DA'$s # 
)
;;
'nerdfont-complete'|'nerdfont-fontconfig')
@ -460,6 +698,13 @@ function _p9k_init_icons() {
LINUX_VOID_ICON '\uF17C' # 
LINUX_ARTIX_ICON '\uF17C' # 
LINUX_UBUNTU_ICON '\uF31b'$s # 
LINUX_KALI_ICON '\uF17C' # 
LINUX_RHEL_ICON '\uF316'$s # 
LINUX_AMZN_ICON '\uF270'$s # 
LINUX_ENDEAVOUROS_ICON '\uF17C' # 
LINUX_ROCKY_ICON '\uF17C' # 
LINUX_GUIX_ICON '\uF325'$s # 
LINUX_NEON_ICON '\uF17C' # 
LINUX_ICON '\uF17C' # 
SUNOS_ICON '\uF185 ' # 
HOME_ICON '\uF015'$s # 
@ -487,10 +732,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON '\uF113 ' # 
VCS_GIT_BITBUCKET_ICON '\uE703 ' # 
VCS_GIT_GITLAB_ICON '\uF296 ' # 
VCS_GIT_AZURE_ICON '\uFD03 ' # ﴃ
VCS_GIT_ARCHLINUX_ICON '\uF303 ' # 
VCS_GIT_CODEBERG_ICON '\uF1D3 ' # 
VCS_GIT_DEBIAN_ICON '\uF306 ' # 
VCS_GIT_FREEBSD_ICON '\UF30C ' # 
VCS_GIT_FREEDESKTOP_ICON '\uF296 ' # 
VCS_GIT_GNOME_ICON '\uF296 ' # 
VCS_GIT_GNU_ICON '\uE779 ' # 
VCS_GIT_KDE_ICON '\uF296 ' # 
VCS_GIT_LINUX_ICON '\uF17C ' # 
VCS_GIT_GITEA_ICON '\uF1D3 ' # 
VCS_GIT_SOURCEHUT_ICON '\uF1DB ' # 
VCS_HG_ICON '\uF0C3 ' # 
VCS_SVN_ICON '\uE72D'$q # 
RUST_ICON '\uE7A8'$q # 
PYTHON_ICON '\UE73C ' # 
CHEZMOI_ICON '\uF015'$s # 
SWIFT_ICON '\uE755' # 
GO_ICON '\uE626' # 
GOLANG_ICON '\uE626' # 
@ -507,6 +765,7 @@ function _p9k_init_icons() {
JAVA_ICON '\uE738' # 
LARAVEL_ICON '\ue73f'$q # 
RANGER_ICON '\uF00b ' # 
YAZI_ICON '\uF00b ' # 
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON '\uE62B' # 
TERRAFORM_ICON '\uF1BB ' # 
@ -520,6 +779,8 @@ function _p9k_init_icons() {
LUA_ICON '\uE620' # 
PERL_ICON '\uE769' # 
NNN_ICON 'nnn'
LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON '\uF49B' # 
TASKWARRIOR_ICON '\uF4A0 ' # 
NIX_SHELL_ICON '\uF313 ' # 
@ -532,6 +793,9 @@ function _p9k_init_icons() {
PACKAGE_ICON '\uF8D6' # 
JULIA_ICON '\uE624' # 
SCALA_ICON '\uE737' # 
TOOLBOX_ICON '\uE20F'$s # 
ARCH_ICON '\uE266' # 
HISTORY_ICON '\uF1DA'$s # 
)
;;
ascii)
@ -570,6 +834,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON 'debian'
LINUX_RASPBIAN_ICON 'pi'
LINUX_UBUNTU_ICON 'ubuntu'
LINUX_KALI_ICON 'kali'
LINUX_CENTOS_ICON 'centos'
LINUX_COREOS_ICON 'coreos'
LINUX_ELEMENTARY_ICON 'elementary'
@ -587,6 +852,12 @@ function _p9k_init_icons() {
LINUX_SLACKWARE_ICON 'slack'
LINUX_VOID_ICON 'void'
LINUX_ARTIX_ICON 'artix'
LINUX_RHEL_ICON 'rhel'
LINUX_AMZN_ICON 'amzn'
LINUX_ENDEAVOUROS_ICON 'edvos'
LINUX_ROCKY_ICON 'rocky'
LINUX_GUIX_ICON 'guix'
LINUX_NEON_ICON 'neon'
SUNOS_ICON 'sunos'
HOME_ICON ''
HOME_SUB_ICON ''
@ -613,10 +884,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON ''
VCS_GIT_BITBUCKET_ICON ''
VCS_GIT_GITLAB_ICON ''
VCS_GIT_AZURE_ICON ''
VCS_GIT_ARCHLINUX_ICON ''
VCS_GIT_CODEBERG_ICON ''
VCS_GIT_DEBIAN_ICON ''
VCS_GIT_FREEBSD_ICON ''
VCS_GIT_FREEDESKTOP_ICON ''
VCS_GIT_GNOME_ICON ''
VCS_GIT_GNU_ICON ''
VCS_GIT_KDE_ICON ''
VCS_GIT_LINUX_ICON ''
VCS_GIT_GITEA_ICON ''
VCS_GIT_SOURCEHUT_ICON ''
VCS_HG_ICON ''
VCS_SVN_ICON ''
RUST_ICON 'rust'
PYTHON_ICON 'py'
CHEZMOI_ICON 'chezmoi'
SWIFT_ICON 'swift'
GO_ICON 'go'
GOLANG_ICON 'go'
@ -633,6 +917,7 @@ function _p9k_init_icons() {
JAVA_ICON 'java'
LARAVEL_ICON ''
RANGER_ICON 'ranger'
YAZI_ICON 'yazi'
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@ -646,6 +931,8 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
NIX_SHELL_ICON 'nix'
@ -658,6 +945,9 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
TOOLBOX_ICON 'toolbox'
ARCH_ICON 'arch'
HISTORY_ICON 'hist'
)
;;
*)
@ -680,7 +970,7 @@ function _p9k_init_icons() {
TEST_ICON ''
TODO_ICON '\u2206' # ∆
BATTERY_ICON '\U1F50B' # 🔋
DISK_ICON 'hdd'
DISK_ICON 'hdd'
OK_ICON '\u2714' # ✔
FAIL_ICON '\u2718' # ✘
SYMFONY_ICON 'SF'
@ -698,6 +988,7 @@ function _p9k_init_icons() {
LINUX_DEBIAN_ICON 'Deb'
LINUX_RASPBIAN_ICON 'RPi'
LINUX_UBUNTU_ICON 'Ubu'
LINUX_KALI_ICON 'Kal'
LINUX_CENTOS_ICON 'Cen'
LINUX_COREOS_ICON 'Cor'
LINUX_ELEMENTARY_ICON 'Elm'
@ -715,6 +1006,12 @@ function _p9k_init_icons() {
LINUX_SLACKWARE_ICON 'Sla'
LINUX_VOID_ICON 'Vo'
LINUX_ARTIX_ICON 'Art'
LINUX_RHEL_ICON 'RH'
LINUX_AMZN_ICON 'Amzn'
LINUX_ENDEAVOUROS_ICON 'Edv'
LINUX_ROCKY_ICON 'Roc'
LINUX_GUIX_ICON 'Guix'
LINUX_NEON_ICON 'Neon'
SUNOS_ICON 'Sun'
HOME_ICON ''
HOME_SUB_ICON ''
@ -741,10 +1038,23 @@ function _p9k_init_icons() {
VCS_GIT_GITHUB_ICON ''
VCS_GIT_BITBUCKET_ICON ''
VCS_GIT_GITLAB_ICON ''
VCS_GIT_AZURE_ICON ''
VCS_GIT_ARCHLINUX_ICON ''
VCS_GIT_CODEBERG_ICON ''
VCS_GIT_DEBIAN_ICON ''
VCS_GIT_FREEBSD_ICON ''
VCS_GIT_FREEDESKTOP_ICON ''
VCS_GIT_GNOME_ICON ''
VCS_GIT_GNU_ICON ''
VCS_GIT_KDE_ICON ''
VCS_GIT_LINUX_ICON ''
VCS_GIT_GITEA_ICON ''
VCS_GIT_SOURCEHUT_ICON ''
VCS_HG_ICON ''
VCS_SVN_ICON ''
RUST_ICON 'R'
PYTHON_ICON 'Py'
CHEZMOI_ICON 'Chez'
SWIFT_ICON 'Swift'
GO_ICON 'Go'
GOLANG_ICON 'Go'
@ -761,6 +1071,7 @@ function _p9k_init_icons() {
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim'
TERRAFORM_ICON 'tf'
@ -774,6 +1085,8 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
NIX_SHELL_ICON 'nix'
@ -786,6 +1099,9 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON 'arch'
HISTORY_ICON 'hist'
)
;;
esac
@ -810,6 +1126,7 @@ function _p9k_init_icons() {
icons[LEFT_SEGMENT_END_SEPARATOR]+=' '
icons[MULTILINE_LAST_PROMPT_PREFIX]+=' '
icons[VCS_TAG_ICON]+=' '
icons[VCS_BOOKMARK_ICON]+=' '
icons[VCS_COMMIT_ICON]+=' '
icons[VCS_BRANCH_ICON]+=' '
icons[VCS_REMOTE_BRANCH_ICON]+=' '

File diff suppressed because it is too large Load Diff

@ -152,7 +152,7 @@ function _p9k_parse_buffer() {
local -r var="\$$id|\${$id}|\"\$$id\"|\"\${$id}\""
local -i e ic c=${2:-'1 << 62'}
local skip n s r state cmd prev
local skip n s r state token cmd prev
local -a aln alp alf v
if [[ -o interactive_comments ]]; then

@ -14,22 +14,11 @@ if (( OPTIND <= ARGC )); then
return 1
fi
if (( $+terminfo[smcup] && $+terminfo[rmcup] )) && echoti smcup 2>/dev/null; then
function restore_screen() {
echoti rmcup 2>/dev/null
function restore_screen() {}
}
else
function restore_screen() {}
fi
local -i in_z4h_wizard=0
[[ $force == 0 && $+functions[z4h] == 1 && -n $Z4H && -e $Z4H/welcome ]] && in_z4h_wizard=1
local -i success=0
{ # always
local -ri force
local -r font_base_url='https://github.com/romkatv/powerlevel10k-media/raw/master'
@ -233,7 +222,12 @@ function hide_cursor() {
}
function show_cursor() {
echoti cnorm 2>/dev/null
local cnorm=${terminfo[cnorm]-}
if [[ $cnorm == *$'\e[?25h'(|'\e'*) ]]; then
print -n '\e[?25h'
else
print -n $cnorm
fi
}
function consume_input() {
@ -750,7 +744,7 @@ function ask_python() {
return 0
}
function ask_arrow() {
function ask_quotes() {
add_widget 0 flowing -c %BDoes this look like%b "%2F><%f" %Bbut taller and "fatter?%b"
add_widget 0 print -P ""
add_widget 0 flowing -c -- "---> \u276F\u276E <---"
@ -766,17 +760,23 @@ function ask_arrow() {
ask ynr
case $choice in
r) return 1;;
y) cap_arrow=1;;
n) cap_arrow=0;;
y) cap_quotes=1;;
n) cap_quotes=0;;
esac
return 0
}
function ask_debian() {
add_widget 0 flowing -c %BDoes this look like a%b "%2FDebian logo%f" "%B(swirl/spiral)?%b"
add_widget 0 flowing -c reference: "$(href https://debian.org/logos/openlogo-nd.svg)"
function ask_arrow() {
# This condition holds as long as zsh is compiled with unicode 9 support.
if (( ${(m)#${(g::)1}} != 1 )); then
cap_arrow=0
return
fi
[[ -n $2 ]] && add_widget 0 flowing -c "$2"
add_widget 0 flowing -c %BDoes this look like an%b "%2Fupwards arrow%f%B?%b"
add_widget 0 flowing -c reference: "$(href https://graphemica.com/%F0%9F%A0%89)"
add_widget 0 print -P ""
add_widget 0 flowing -c -- "---> \uF306 <---"
add_widget 0 flowing -c -- "---> $1 <---"
add_widget 0 print -P ""
add_widget 3
add_widget 0 print -P "%B(y) Yes.%b"
@ -789,8 +789,41 @@ function ask_debian() {
ask ynr
case $choice in
r) return 1;;
y) cap_debian=1;;
n) cap_debian=0;;
y) cap_arrow=1;;
n) cap_arrow=0;;
esac
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
}
@ -916,9 +949,9 @@ function ask_charset() {
POWERLEVEL9K_ICON_PADDING=none
cap_diamond=0
cap_python=0
cap_debian=0
cap_lock=0
cap_arrow=0
cap_lock=0
cap_quotes=0
;;
esac
return 0
@ -994,6 +1027,15 @@ function ask_color() {
return 0
}
function print_frame_marker() {
local label="(1) $color_name[1]."
local -i n='wizard_columns - 7'
local -i m=$((n - $#label))
print -P "${(l:$n:: :)}frame"
print -P "%B$label%b${(l:$m:: :)} |"
print -P "${(l:$n:: :)} v"
}
function ask_ornaments_color() {
[[ $style != (rainbow|lean*) || $num_lines == 1 ]] && return
[[ $gap_char == ' ' && $left_frame == 0 && $right_frame == 0 ]] && return
@ -1001,10 +1043,17 @@ function ask_ornaments_color() {
[[ $gap_char != ' ' ]] && ornaments+=Connection
(( left_frame || right_frame )) && ornaments+=Frame
add_widget 0 flowing -c "%B${(j: & :)ornaments} Color%b"
add_widget 0 print
add_widget 1
add_widget 0 print -P "%B(1) $color_name[1].%b"
add_prompt color=1
if (( left_frame || right_frame )); then
add_widget 0 print_frame_marker
add_widget 3 print -P "%B(1) $color_name[1].%b"
add_prompt_n color=1
add_widget 0 print
add_widget 2
else
add_widget 1
add_widget 0 print -P "%B(1) $color_name[1].%b"
add_prompt color=1
fi
add_widget 0 print -P "%B(2) $color_name[2].%b"
add_prompt color=2
add_widget 0 print -P "%B(3) $color_name[3].%b"
@ -1026,19 +1075,19 @@ function ask_time() {
add_widget 0 flowing -c "%BShow current time?%b"
add_widget 0 print
add_widget 1
add_widget 0 print -P "%B(1) No.%b"
add_widget 0 print -P "%B(n) No.%b"
add_prompt time=
add_widget 0 print -P "%B(1) 12-hour format.%b"
add_prompt time=$time_12h
add_widget 0 print -P "%B(2) 24-hour format.%b"
add_prompt time=$time_24h
add_widget 0 print -P "%B(3) 12-hour format.%b"
add_prompt time=$time_12h
add_widget 0 print -P "(r) Restart from the beginning."
ask 123r
ask n12r
case $choice in
r) return 1;;
1) time=;;
n) time=;;
1) time=$time_12h; options+='12h time';;
2) time=$time_24h; options+='24h time';;
3) time=$time_12h; options+='12h time';;
esac
return 0
}
@ -1057,7 +1106,7 @@ function ask_use_rprompt() {
case $choice in
r) return 1;;
1) ;;
2) pure_use_rprompt=; options+=rpromt;;
2) pure_use_rprompt=; options+=rprompt;;
esac
return 0
}
@ -1070,25 +1119,33 @@ function os_icon_name() {
case $uname in
SunOS) echo SUNOS_ICON;;
Darwin) echo APPLE_ICON;;
CYGWIN_NT-* | MSYS_NT-*) echo WINDOWS_ICON;;
CYGWIN_NT-*|MSYS_NT-*|MINGW64_NT-*|MINGW32_NT-*) echo WINDOWS_ICON;;
FreeBSD|OpenBSD|DragonFly) echo FREEBSD_ICON;;
Linux)
local os_release_id
if [[ -r /etc/os-release ]]; then
local lines=(${(f)"$(</etc/os-release)"})
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
os_release_id=artix
fi
case $os_release_id in
*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;;
*ubuntu*) echo LINUX_UBUNTU_ICON;;
*elementary*) echo LINUX_ELEMENTARY_ICON;;
*fedora*) echo LINUX_FEDORA_ICON;;
*coreos*) echo LINUX_COREOS_ICON;;
*kali*) echo LINUX_KALI_ICON;;
*gentoo*) echo LINUX_GENTOO_ICON;;
*mageia*) echo LINUX_MAGEIA_ICON;;
*centos*) echo LINUX_CENTOS_ICON;;
@ -1103,6 +1160,12 @@ function os_icon_name() {
*manjaro*) echo LINUX_MANJARO_ICON;;
*void*) echo LINUX_VOID_ICON;;
*artix*) echo LINUX_ARTIX_ICON;;
*rhel*) echo LINUX_RHEL_ICON;;
amzn) echo LINUX_AMZN_ICON;;
endeavouros) echo LINUX_ENDEAVOUROS_ICON;;
rocky) echo LINUX_ROCKY_ICON;;
guix) echo LINUX_GUIX_ICON;;
neon) echo LINUX_NEON_ICON;;
*) echo LINUX_ICON;;
esac
;;
@ -1176,7 +1239,7 @@ function ask_separators() {
add_widget 2
add_widget 0 print -P "%B(2) Vertical.%b"
add_prompt left_sep='' right_sep='' left_subsep=$vertical_bar right_subsep=$vertical_bar
if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then
if [[ $POWERLEVEL9K_MODE == nerdfont-* ]]; then
extra+=3
add_widget 0 print -P "%B(3) Slanted.%b"
add_prompt left_sep=$down_triangle right_sep=$up_triangle left_subsep=$slanted_bar right_subsep=$slanted_bar
@ -1226,42 +1289,34 @@ function ask_heads() {
fi
local extra
add_widget 0 flowing -c "%BPrompt Heads%b"
if (( cap_diamond )); then
add_widget 0 print -Pl " head" "%B(1) Sharp.%b |" " v"
add_widget 3 print -P "%B(1) Sharp.%b"
add_prompt_n left_head=$right_triangle right_head=$left_triangle
add_widget 0 print
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 -Pl " head" "%B(1) Flat.%b |" " v"
add_widget 3 print -P "%B(1) Flat.%b"
add_prompt_n left_head= right_head=
add_widget 0 print
add_widget 2
add_widget 0 print -P "%B(2) Blurred.%b"
add_prompt left_head=$fade_out right_head=$fade_in
if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then
if (( cap_diamond )); then
extra+=3
add_widget 0 print -P "%B(3) Slanted.%b"
add_prompt left_head=$down_triangle right_head=$up_triangle
extra+=4
add_widget 0 print -P "%B(4) Round.%b"
add_prompt left_head=$right_circle right_head=$left_circle
add_widget 0 print -P "%B(3) Sharp.%b"
add_prompt left_head=$right_triangle right_head=$left_triangle
if [[ $POWERLEVEL9K_MODE == nerdfont-* ]]; then
extra+=4
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
fi
fi
add_widget 0 print -P "(r) Restart from the beginning."
ask 12${extra}r
case $choice in
r) return 1;;
1)
if (( cap_diamond )); then
left_head=$right_triangle
right_head=$left_triangle
options+='sharp heads'
else
left_head=
right_head=
options+='flat heads'
fi
left_head=
right_head=
options+='flat heads'
;;
2)
left_head=$fade_out
@ -1269,11 +1324,16 @@ function ask_heads() {
options+='blurred heads'
;;
3)
left_head=$right_triangle
right_head=$left_triangle
options+='sharp heads'
;;
4)
left_head=$down_triangle
right_head=$up_triangle
options+='slanted heads'
;;
4)
5)
left_head=$right_circle
right_head=$left_circle
options+='round heads'
@ -1308,7 +1368,7 @@ function ask_tails() {
extra+=3
add_widget 0 print -P "%B(3) Sharp.%b"
add_prompt left_tail=$left_triangle right_tail=$right_triangle
if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then
if [[ $POWERLEVEL9K_MODE == nerdfont-* ]]; then
extra+=4
add_widget 0 print -P "%B(4) Slanted.%b"
add_prompt left_tail=$up_triangle right_tail=$down_triangle
@ -1446,14 +1506,14 @@ function ask_empty_line() {
}
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
print
flowing -c "$(href $link)"
}
function ask_instant_prompt() {
if ! is-at-least 5.4; then
if [[ $ZSH_VERSION != (5.<4->*|<6->.*) ]]; then
instant_prompt=off
options+=instant_prompt=auto-off
return 0
@ -1546,9 +1606,19 @@ function ask_config_overwrite() {
case $choice in
r) return 1;;
y)
config_backup="$(mktemp ${TMPDIR:-/tmp}/$__p9k_cfg_basename.XXXXXXXXXX)" || quit -c
cp $__p9k_cfg_path $config_backup || quit -c
config_backup_u=${${TMPDIR:+\$TMPDIR}:-/tmp}/${(q-)config_backup:t}
if [[ -n "$TMPDIR" && ( ( -d "$TMPDIR" && -w "$TMPDIR" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then
local tmpdir=$TMPDIR
local tmpdir_u='$TMPDIR'
else
local tmpdir=/tmp
local tmpdir_u=/tmp
fi
if (( ! $+commands[mktemp] )) ||
! config_backup=$(mktemp $tmpdir/$__p9k_cfg_basename.XXXXXXXXXX 2>/dev/null); then
config_backup=$tmpdir/$__p9k_cfg_basename.$EPOCHREALTIME
fi
cp $__p9k_cfg_path $config_backup || quit -c
config_backup_u=$tmpdir_u/${(q-)config_backup:t}
;;
esac
return 0
@ -1565,40 +1635,12 @@ function ask_zshrc_edit() {
if (( $+functions[z4h] )); then
zshrc_has_cfg=1
zshrc_has_instant_prompt=1
return
fi
check_zshrc_integration || quit -c
[[ $instant_prompt == off ]] && zshrc_has_instant_prompt=1
if [[ -e $__p9k_zshrc ]]; then
zshrc_content="$(<$__p9k_zshrc)" || quit -c
local lines=(${(f)zshrc_content})
local f0=$__p9k_cfg_path_o
local f1=${(q)f0}
local f2=${(q-)f0}
local f3=${(qq)f0}
local f4=${(qqq)f0}
local g1=${${(q)__p9k_cfg_path_o}/#(#b)${(q)HOME}\//'~/'}
local h0='${ZDOTDIR:-~}/.p10k.zsh'
local h1='${ZDOTDIR:-$HOME}/.p10k.zsh'
local h2='"${ZDOTDIR:-$HOME}/.p10k.zsh"'
local h3='"${ZDOTDIR:-$HOME}"/.p10k.zsh'
local h4='${ZDOTDIR}/.p10k.zsh'
local h5='"${ZDOTDIR}/.p10k.zsh"'
local h6='"${ZDOTDIR}"/.p10k.zsh'
local h7='$ZDOTDIR/.p10k.zsh'
local h8='"$ZDOTDIR/.p10k.zsh"'
local h9='"$ZDOTDIR"/.p10k.zsh'
local h10='$POWERLEVEL9K_CONFIG_FILE'
local h11='"$POWERLEVEL9K_CONFIG_FILE"'
if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##($f1|$f2|$f3|$f4|$g1|$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|$h8|$h9|$h10|$h11)(|[[:space:]]*|'#'*)} ]]; then
zshrc_has_cfg=1
fi
local pre='${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh'
if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##($pre|\"$pre\")(|[[:space:]]*|'#'*)} ]]; then
zshrc_has_instant_prompt=1
fi
(( zshrc_has_cfg && zshrc_has_instant_prompt )) && return
fi
(( zshrc_has_cfg && zshrc_has_instant_prompt )) && return
add_widget 0 flowing -c %BApply changes to "%b%2F${__p9k_zshrc_u//\\/\\\\}%f%B?%b"
add_widget 0 print -P ""
@ -1637,16 +1679,26 @@ function ask_zshrc_edit() {
y)
write_zshrc=1
if [[ -n $zshrc_content ]]; then
zshrc_backup="$(mktemp ${TMPDIR:-/tmp}/.zshrc.XXXXXXXXXX)" || quit -c
cp -p $__p9k_zshrc $zshrc_backup || quit -c
if [[ -n "$TMPDIR" && ( ( -d "$TMPDIR" && -w "$TMPDIR" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then
local tmpdir=$TMPDIR
local tmpdir_u='$TMPDIR'
else
local tmpdir=/tmp
local tmpdir_u=/tmp
fi
if (( ! $+commands[mktemp] )) ||
! zshrc_backup="$(mktemp $tmpdir/.zshrc.XXXXXXXXXX 2>/dev/null)"; then
zshrc_backup=$tmpdir/.zshrc.$EPOCHREALTIME
fi
cp -p $__p9k_zshrc $zshrc_backup || quit -c
local -i writable=1
if [[ ! -w $zshrc_backup ]]; then
chmod u+w -- $zshrc_backup || quit -c
chmod u+w -- $zshrc_backup || quit -c
writable=0
fi
print -r -- $zshrc_content >$zshrc_backup || quit -c
(( writable )) || chmod u-w -- $zshrc_backup || quit -c
zshrc_backup_u=${${TMPDIR:+\$TMPDIR}:-/tmp}/${(q-)zshrc_backup:t}
print -r -- $zshrc_content >$zshrc_backup || quit -c
(( writable )) || chmod u-w -- $zshrc_backup || quit -c
zshrc_backup_u=$tmpdir_u/${(q-)zshrc_backup:t}
fi
;;
esac
@ -1695,6 +1747,8 @@ function generate_config() {
sub NORDVPN_VISUAL_IDENTIFIER_EXPANSION "'nord'"
uncomment 'typeset -g POWERLEVEL9K_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'
sub KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION "'○'"
uncomment 'typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION'
@ -1716,9 +1770,14 @@ function generate_config() {
sub PYTHON_ICON "'🐍'"
fi
if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then
sub BATTERY_STAGES "'\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'"
fi
case $POWERLEVEL9K_MODE in
nerdfont-complete)
sub BATTERY_STAGES "'\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'"
;;
nerdfont-v3)
sub BATTERY_STAGES "'\UF008E\UF007A\UF007B\UF007C\UF007D\UF007E\UF007F\UF0080\UF0081\UF0082\UF0079'"
;;
esac
if [[ $style == (classic|rainbow) ]]; then
if [[ $style == classic ]]; then
@ -1767,6 +1826,7 @@ function generate_config() {
uncomment 'typeset -g POWERLEVEL9K_CONTEXT_PREFIX'
uncomment 'typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX'
uncomment 'typeset -g POWERLEVEL9K_TIME_PREFIX'
uncomment 'typeset -g POWERLEVEL9K_TOOLBOX_PREFIX'
if [[ $style == (lean|classic) ]]; then
[[ $style == classic ]] && local fg="%$prefix_color[$color]F" || local fg="%f"
sub VCS_PREFIX "'${fg}on '"
@ -1774,6 +1834,7 @@ function generate_config() {
sub CONTEXT_PREFIX "'${fg}with '"
sub KUBECONTEXT_PREFIX "'${fg}at '"
sub TIME_PREFIX "'${fg}at '"
sub TOOLBOX_PREFIX "'${fg}in '"
fi
fi
@ -1896,7 +1957,7 @@ function generate_config() {
command mkdir -p -- ${__p9k_cfg_path:h} || return
if [[ -e $__p9k_cfg_path ]]; then
unlink $__p9k_cfg_path || return
zf_rm -f -- $__p9k_cfg_path || return
fi
print -lr -- "$header" "$lines[@]" >$__p9k_cfg_path
}
@ -1948,16 +2009,84 @@ fi" || return
return 0
}
function check_zshrc_integration() {
typeset -g zshrc_content=
typeset -gi zshrc_has_cfg=0 zshrc_has_instant_prompt=0
[[ -e $__p9k_zshrc ]] || return 0
zshrc_content="$(<$__p9k_zshrc)" || return
local lines=(${(f)zshrc_content})
local f0=$__p9k_cfg_path_o
local f1=${(q)f0}
local f2=${(q-)f0}
local f3=${(qq)f0}
local f4=${(qqq)f0}
local g1=${${(q)__p9k_cfg_path_o}/#(#b)${(q)HOME}\//'~/'}
local h0='${ZDOTDIR:-~}/.p10k.zsh'
local h1='${ZDOTDIR:-$HOME}/.p10k.zsh'
local h2='"${ZDOTDIR:-$HOME}/.p10k.zsh"'
local h3='"${ZDOTDIR:-$HOME}"/.p10k.zsh'
local h4='${ZDOTDIR}/.p10k.zsh'
local h5='"${ZDOTDIR}/.p10k.zsh"'
local h6='"${ZDOTDIR}"/.p10k.zsh'
local h7='$ZDOTDIR/.p10k.zsh'
local h8='"$ZDOTDIR/.p10k.zsh"'
local h9='"$ZDOTDIR"/.p10k.zsh'
local h10='$POWERLEVEL9K_CONFIG_FILE'
local h11='"$POWERLEVEL9K_CONFIG_FILE"'
if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##(|--[[:space:]]##)($f1|$f2|$f3|$f4|$g1|$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|$h8|$h9|$h10|$h11)(|[[:space:]]*|'#'*)} ]]; then
zshrc_has_cfg=1
fi
local pre='${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh'
if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##($pre|\"$pre\")(|[[:space:]]*|'#'*)} ]]; then
zshrc_has_instant_prompt=1
fi
return 0
}
() {
(( force )) && return
_p9k_can_configure -q || return 0
local zshrc_content zshrc_has_cfg zshrc_has_instant_prompt
check_zshrc_integration 2>/dev/null || return 0
(( zshrc_has_cfg )) || return 0
[[ -s $__p9k_cfg_path ]] || return 0
print -P ""
flowing \
Powerlevel10k configuration file "($__p9k_cfg_path_u)" was not sourced. This \
might have been caused by errors in zsh startup files, most likely in \
$__p9k_zshrc_u. See above for any indication of such errors and fix them. If \
there are no errors, try running Powerlevel10k configuration wizard:
print -P ''
print -P ' %2Fp10k%f %Bconfigure%b'
print -P ''
flowing \
If you do nothing, you will see this message again when you start zsh. You can \
suppress it by defining %BPOWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true%b in \
$__p9k_zshrc_u.
print -P ''
return 1
} || return
if (( $+terminfo[smcup] && $+terminfo[rmcup] )) && echoti smcup 2>/dev/null; then
function restore_screen() {
echoti rmcup 2>/dev/null
function restore_screen() {}
}
else
function restore_screen() {}
fi
{ # always
if (( force )); then
_p9k_can_configure || return
else
_p9k_can_configure -q || return
fi
zmodload zsh/terminfo || return
autoload -Uz is-at-least || return
zmodload zsh/terminfo zsh/datetime || return
if is-at-least 5.7.1 && [[ $COLORTERM == (24bit|truecolor) ]]; then
if [[ $ZSH_VERSION == (5.7.<1->*|5.<8->*|<6->.*) && $COLORTERM == (24bit|truecolor) ]]; then
local -ir has_truecolor=1
else
local -ir has_truecolor=0
@ -1972,7 +2101,7 @@ while true; do
local gap_char=' ' prompt_char='' down_triangle='\uE0BC' up_triangle='\uE0BA' slanted_bar='\u2571'
local left_subsep= right_subsep= left_tail= right_tail= left_head= right_head= time=
local -i num_lines=2 empty_line=0 color=2 left_frame=1 right_frame=1 transient_prompt=0
local -i cap_diamond=0 cap_python=0 cap_debian=0 cap_lock=0 cap_arrow=0
local -i cap_diamond=0 cap_python=0 cap_arrow=0 cap_lock=0 cap_quotes=0
local -a extra_icons=('' '' '')
local -a frame_color=(244 242 240 238)
local -a color_name=(Lightest Light Dark Darkest)
@ -1986,7 +2115,7 @@ while true; do
unset pure_use_rprompt
if [[ $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
if [[ -o multibyte && $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
ask_font || continue
ask_diamond || continue
if [[ $AWESOME_GLYPHS_LOADED == 1 ]]; then
@ -2006,19 +2135,27 @@ while true; do
if (( cap_diamond )); then
POWERLEVEL9K_MODE=powerline
else
ask_arrow || continue
(( cap_arrow )) && POWERLEVEL9K_MODE=compatible || POWERLEVEL9K_MODE=ascii
ask_quotes || continue
(( cap_quotes )) && POWERLEVEL9K_MODE=compatible || POWERLEVEL9K_MODE=ascii
fi
fi
elif (( ! cap_diamond )); then
POWERLEVEL9K_MODE=awesome-fontconfig
else
ask_debian || continue
if (( cap_debian )); then
POWERLEVEL9K_MODE=nerdfont-complete
ask_arrow '\UF0737' || continue
if (( cap_arrow )); then
ask_width || continue
fi
if (( cap_arrow )); then
POWERLEVEL9K_MODE=nerdfont-v3
else
POWERLEVEL9K_MODE=awesome-fontconfig
ask_python || continue
ask_arrow '\uFC35' "Let's try another one." || continue
if (( cap_arrow )); then
POWERLEVEL9K_MODE=nerdfont-complete
else
POWERLEVEL9K_MODE=awesome-fontconfig
ask_python || continue
fi
fi
fi
fi
@ -2090,12 +2227,12 @@ restore_screen
if (( !in_z4h_wizard )); then
print
flowing +c New config: "%B${__p9k_cfg_path_u//\\/\\\\}%b."
flowing +c New config: "%U${__p9k_cfg_path_u//\\/\\\\}%u."
if [[ -n $config_backup ]]; then
flowing +c Backup of the old config: "%B${config_backup_u//\\/\\\\}%b."
flowing +c Backup of the old config: "%U${config_backup_u//\\/\\\\}%u."
fi
if [[ -n $zshrc_backup ]]; then
flowing +c Backup of "%B${__p9k_zshrc_u//\\/\\\\}%b:" "%B${zshrc_backup_u//\\/\\\\}%b."
flowing +c Backup of "%U${__p9k_zshrc_u//\\/\\\\}%u:" "%U${zshrc_backup_u//\\/\\\\}%u."
fi
fi

@ -181,7 +181,13 @@ function _p9k_worker_start() {
setopt monitor || return
{
[[ -n $_p9k__worker_resp_fd ]] && return
_p9k__worker_file_prefix=${TMPDIR:-/tmp}/p10k.worker.$EUID.$sysparams[pid].$EPOCHSECONDS
if [[ -n "$TMPDIR" && ( ( -d "$TMPDIR" && -w "$TMPDIR" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then
local tmpdir=$TMPDIR
else
local tmpdir=/tmp
fi
_p9k__worker_file_prefix=$tmpdir/p10k.worker.$EUID.$sysparams[pid].$EPOCHSECONDS
sysopen -r -o cloexec -u _p9k__worker_resp_fd <(
exec 0</dev/null

@ -22,7 +22,7 @@
# Leading spaces before `local` are important. Otherwise Antigen will remove `local` (!!!).
# __p9k_trapint is to work around bugs in zsh: https://www.zsh.org/mla/workers/2020/msg00612.html.
# Likewise for `trap ":"` instead of the plain `trap ""`.
typeset -gr __p9k_intro_base='emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent
typeset -gr __p9k_intro_base='emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent -o no_rematch_pcre
(( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT }
local -a match mbegin mend
local -i MBEGIN MEND OPTIND
@ -57,7 +57,7 @@ function _p9k_init_locale() {
if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file ]] && (( ! $+functions[_p9k_preinit] )) && source $__p9k_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then
_p9k_preinit
fi
typeset -gr __p9k_sourced=12
typeset -gr __p9k_sourced=13
if [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]]; then
if [[ -w $__p9k_root_dir && -w $__p9k_root_dir/internal && -w $__p9k_root_dir/gitstatus ]]; then
local f

Loading…
Cancel
Save