Compare commits
214 Commits
Author | SHA1 | Date |
---|---|---|
|
36f3045d69 | |
|
8fa10f43a0 | |
|
05b11d8b92 | |
|
eb487f836a | |
|
f3b05b4448 | |
|
3e2053a934 | |
|
c85cd0f028 | |
|
33fff66cc6 | |
|
c187964ad3 | |
|
ef83e13c22 | |
|
f2f0149974 | |
|
8a331b8210 | |
|
ed07f45e39 | |
|
5bddd1e731 | |
|
5e26473457 | |
|
67a365b9db | |
|
3483f230a7 | |
|
0996a94118 | |
|
c64a133616 | |
|
140a6ade4e | |
|
087405df78 | |
|
f31d01dbb1 | |
|
edf38f964e | |
|
d71edb83f9 | |
|
00f74aaf75 | |
|
c30068c1f1 | |
|
a42e374e25 | |
|
119e4039ef | |
|
2b7da93df0 | |
|
821b25dc32 | |
|
4a2ef610ef | |
|
df8ed16343 | |
|
bde5ca4c2a | |
|
16e5848426 | |
|
3395c828b2 | |
|
b28d68f44b | |
|
01e3f0b4ba | |
|
808ba80ab0 | |
|
178fcda348 | |
|
bcef7cafdf | |
|
aeff1153d4 | |
|
7c2ce29c3f | |
|
d6a0fed1d9 | |
|
da9b03777c | |
|
45627c528b | |
|
3fe8706d24 | |
|
a7f13e420e | |
|
55c8f74c38 | |
|
50794faba4 | |
|
a3f7dabcae | |
|
93d074a82b | |
|
07a971d310 | |
|
6836bfe2da | |
|
0fdca5b1e6 | |
|
d39e426835 | |
|
0cc19ac2ed | |
|
b973805f01 | |
|
b379cf6225 | |
|
bb16e366c3 | |
|
31d99b694c | |
|
bfbc65e63d | |
|
12e0592ac8 | |
|
9e3418d319 | |
|
17cd9e354a | |
|
8e2a22d80b | |
|
5ef7487648 | |
|
f880e18769 | |
|
665257d059 | |
|
67cedd3edc | |
|
eb8f96f808 | |
|
1aa91f0069 | |
|
5bba4b849b | |
|
ce7c242337 | |
|
34ee1c6bbb | |
|
62341054d8 | |
|
be39c4ea5a | |
|
adc238fa1d | |
|
6f4520cc13 | |
|
307bce24d1 | |
|
35833ea15f | |
|
bd0fa8a08f | |
|
a6fa4e4304 | |
|
ab6a863e23 | |
|
8fefef2285 | |
|
ecf91710c0 | |
|
d774adcb85 | |
|
30ba16ecd8 | |
|
4d7925c983 | |
|
c180a5e040 | |
|
75724ec65e | |
|
9be438f862 | |
|
cda24b72b7 | |
|
f5d5abfe1f | |
|
651033c3df | |
|
d804048efc | |
|
cc6ed4be41 | |
|
dec881651c | |
|
d70eedb345 | |
|
36cce9a088 | |
|
3cc18b5e08 | |
|
44f754d711 | |
|
47b0187a67 | |
|
b9a2d846ef | |
|
7fd76370f5 | |
|
9547f22822 | |
|
c39e5304a1 | |
|
096a731db3 | |
|
783588c17f | |
|
211c90343f | |
|
47d5397baa | |
|
92bee79642 | |
|
174ce9bf01 | |
|
18f0bec1bb | |
|
430616734a | |
|
c7fa7d6748 | |
|
862440ae11 | |
|
873c4ff09c | |
|
215b20e087 | |
|
be4c68fd0a | |
|
f8595a35bf | |
|
011b8469ab | |
|
d8041e4700 | |
|
f04ce05d92 | |
|
9401ed17c0 | |
|
69d726d9fb | |
|
22cb2f79dd | |
|
2d9c1f271b | |
|
717f9a1881 | |
|
f851f41fc1 | |
|
9bb15e9ffb | |
|
ef401ad02a | |
|
a8fa0e2a1b | |
|
68104494a7 | |
|
baf03bf48e | |
|
367c667de6 | |
|
12aa3fa3c4 | |
|
7e9a79f3f1 | |
|
1d96f5e066 | |
|
e8aa8cce7f | |
|
646bae0dd6 | |
|
4cc0ea0081 | |
|
2453fd27e2 | |
|
932954a8b1 | |
|
93d97b7eba | |
|
078497570f | |
|
343d4f44e5 | |
|
0c28fec137 | |
|
4dca4bdfbb | |
|
20323d6f8c | |
|
017395a266 | |
|
ab8bac01e2 | |
|
360dcd3907 | |
|
944f52fc43 | |
|
cc4878aef2 | |
|
c775a3ffd5 | |
|
416bdf1ca3 | |
|
3ecef8c6a5 | |
|
7b19746580 | |
|
e4b8925478 | |
|
79753faacb | |
|
3ce7bac4ff | |
|
9ed51ec315 | |
|
6db5920bb9 | |
|
29c0b25850 | |
|
951d695789 | |
|
6740f08f61 | |
|
8cce84643f | |
|
a69aa22fa8 | |
|
f4a7e6d0e0 | |
|
7bb3f05318 | |
|
9b47a22f13 | |
|
1dcd882593 | |
|
064f4d2209 | |
|
0a9eb73e16 | |
|
016512f493 | |
|
7039779c19 | |
|
4ed8aae324 | |
|
5d16c106ed | |
|
0af598cbed | |
|
ce0bee979b | |
|
dff735c261 | |
|
630c1868df | |
|
bbea8d2d06 | |
|
6f8dec7a76 | |
|
94c4428ddc | |
|
045f006c50 | |
|
c1b5b2c8aa | |
|
954f38d589 | |
|
f27d192eb2 | |
|
bab655fb1f | |
|
fb1287fedb | |
|
1cff22491b | |
|
b474978b2e | |
|
8167383665 | |
|
d031df752b | |
|
6314edf35c | |
|
6c82236d6f | |
|
6b50e0918b | |
|
ec1702caf1 | |
|
f02b8d365b | |
|
614a6ed1ca | |
|
cb9788b12a | |
|
7f30a32ee6 | |
|
e2c4e6673f | |
|
2aa16c5431 | |
|
373337123c | |
|
a30145b0f8 | |
|
e7b2bb2372 | |
|
e9e94a503a | |
|
0adbc1415b | |
|
f03d917fb0 | |
|
21e89cb61d | |
|
b165fec0ed | |
|
d1b89dd381 |
191
README.md
191
README.md
|
@ -2,6 +2,11 @@
|
|||
[](
|
||||
https://gitter.im/powerlevel10k/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
- **THE PROJECT HAS VERY LIMITED SUPPORT**
|
||||
- **NO NEW FEATURES ARE IN THE WORKS**
|
||||
- **MOST BUGS WILL GO UNFIXED**
|
||||
- **HELP REQUESTS WILL BE IGNORED**
|
||||
|
||||
Powerlevel10k is a theme for Zsh. It emphasizes [speed](#uncompromising-performance),
|
||||
[flexibility](#extremely-customizable) and [out-of-the-box experience](#configuration-wizard).
|
||||
|
||||
|
@ -215,9 +220,8 @@ Configs created by `p10k configure` enable show on command for several prompt se
|
|||
Here's the relevant parameter for kubernetes context:
|
||||
|
||||
```zsh
|
||||
# Show prompt segment "kubecontext" only when the command you are typing
|
||||
# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl, stern, kubeseal, skaffold, or kubent.
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent'
|
||||
# Show prompt segment "kubecontext" only when the command you are typing invokes one of these tools.
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'
|
||||
```
|
||||
|
||||
To customize when different prompt segments are shown, open `~/.p10k.zsh`, search for
|
||||
|
@ -301,10 +305,11 @@ To ~~ridiculous~~ extravagant:
|
|||
|
||||
### Batteries included
|
||||
|
||||
Powerlevel10k comes with dozens of built-in high quality segments. When you run `p10k configure`
|
||||
and choose any style except [Pure](#pure-compatibility), many of these segments get enabled by
|
||||
default while others can be manually enabled by opening `~/.p10k.zsh` and uncommenting them. You can
|
||||
enable as many segments as you like. It won't slow down your prompt or Zsh startup.
|
||||
Powerlevel10k comes with dozens of built-in high quality prompt segments that can display
|
||||
information from a variety of sources. When you run `p10k configure` and choose any style
|
||||
except [Pure](#pure-compatibility), many of these segments get enabled by
|
||||
default while others can be manually enabled by opening `~/.p10k.zsh` and uncommenting them.
|
||||
You can enable as many segments as you like. It won't slow down your prompt or Zsh startup.
|
||||
|
||||
| Segment | Meaning |
|
||||
|--------:|---------|
|
||||
|
@ -339,6 +344,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
|
|||
| `nix_shell` | [nix shell](https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) indicator |
|
||||
| `nnn` | [nnn](https://github.com/jarun/nnn) shell |
|
||||
| `lf` | [lf](https://github.com/gokcehan/lf) shell |
|
||||
| `chezmoi_shell` | [chezmoi](https://www.chezmoi.io/) shell |
|
||||
| `nodeenv` | node.js environment from [nodeenv](https://github.com/ekalinin/nodeenv) |
|
||||
| `nodenv` | node.js environment from [nodenv](https://github.com/nodenv/nodenv) |
|
||||
| `node_version` | [node.js](https://nodejs.org/) version |
|
||||
|
@ -346,6 +352,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
|
|||
| `nvm` | node.js environment from [nvm](https://github.com/nvm-sh/nvm) |
|
||||
| `os_icon` | your OS logo (apple for macOS, swirl for debian, etc.) |
|
||||
| `package` | `name@version` from [package.json](https://docs.npmjs.com/files/package.json) |
|
||||
| `per_directory_history` | Oh My Zsh [per-directory-history](https://github.com/jimhester/per-directory-history) local/global indicator |
|
||||
| `perlbrew` | perl version from [perlbrew](https://github.com/gugod/App-perlbrew) |
|
||||
| `phpenv` | php environment from [phpenv](https://github.com/phpenv/phpenv) |
|
||||
| `php_version` | [php](https://www.php.net/) version |
|
||||
|
@ -356,6 +363,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
|
|||
| `pyenv` | python environment from [pyenv](https://github.com/pyenv/pyenv) |
|
||||
| `ram` | free RAM |
|
||||
| `ranger` | [ranger](https://github.com/ranger/ranger) shell |
|
||||
| `yazi` | [yazi](https://github.com/sxyazi/yazi) shell |
|
||||
| `rbenv` | ruby environment from [rbenv](https://github.com/rbenv/rbenv) |
|
||||
| `rust_version` | [rustc](https://www.rust-lang.org) version |
|
||||
| `rvm` | ruby environment from [rvm](https://rvm.io) |
|
||||
|
@ -396,6 +404,11 @@ it out of the box.
|
|||
|
||||
Type `p10k help segment` for reference.
|
||||
|
||||
*Note*: If you modify `POWERLEVEL9K_*` parameters in an already initialized interactive shell (as
|
||||
opposed to editing `~/.p10k.zsh`), the changes might not be immediately effective. To apply the
|
||||
modifications, invoke `p10k reload`. Setting `POWERLEVEL9K_DISABLE_HOT_RELOAD=false` eliminates the
|
||||
necessity for `p10k reload` but results in a marginally slower prompt.
|
||||
|
||||
*Tip*: Prefix names of your own segments with `my_` to avoid clashes with future versions of
|
||||
Powerlevel10k.
|
||||
|
||||
|
@ -416,7 +429,7 @@ Powerlevel10k.
|
|||
- [Zap](#zap)
|
||||
- [Homebrew](#homebrew)
|
||||
- [Arch Linux](#arch-linux)
|
||||
- [Alpine Linux](#arch-linux)
|
||||
- [Alpine Linux](#alpine-linux)
|
||||
- [Fig](#fig)
|
||||
|
||||
### Manual
|
||||
|
@ -442,15 +455,15 @@ make sure to disable the current theme in your plugin manager. See
|
|||
|
||||
1. Clone the repository:
|
||||
```zsh
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
|
||||
```
|
||||
Users in China can use the official mirror on gitee.com for faster download.<br>
|
||||
中国用户可以使用 gitee.com 上的官方镜像加速下载.
|
||||
|
||||
```zsh
|
||||
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
|
||||
```
|
||||
2. Set `ZSH_THEME="powerlevel10k/powerlevel10k"` in `~/.zshrc`.
|
||||
2. Open `~/.zshrc`, find the line that sets `ZSH_THEME`, and change its value to `"powerlevel10k/powerlevel10k"`.
|
||||
|
||||
### Prezto
|
||||
|
||||
|
@ -509,8 +522,8 @@ Add `plug "romkatv/powerlevel10k"` to `~/.zshrc`.
|
|||
### Homebrew
|
||||
|
||||
```zsh
|
||||
brew install romkatv/powerlevel10k/powerlevel10k
|
||||
echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
|
||||
brew install powerlevel10k
|
||||
echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
|
||||
```
|
||||
|
||||
### Arch Linux
|
||||
|
@ -523,11 +536,6 @@ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zs
|
|||
[zsh-theme-powerlevel10k-git](https://aur.archlinux.org/packages/zsh-theme-powerlevel10k-git/)
|
||||
referenced above is the official Powerlevel10k package.
|
||||
|
||||
There is also [zsh-theme-powerlevel10k](
|
||||
https://www.archlinux.org/packages/community/x86_64/zsh-theme-powerlevel10k/) community package.
|
||||
Historically, [it has been breaking often and for extended periods of time](
|
||||
https://github.com/romkatv/powerlevel10k/pull/786). **Do not use it.**
|
||||
|
||||
### Alpine Linux
|
||||
|
||||
```zsh
|
||||
|
@ -662,6 +670,7 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
- **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click
|
||||
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`.
|
||||
|
@ -669,7 +678,7 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
*Meslo Nerd Font*.
|
||||
- **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select
|
||||
*MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font.
|
||||
- **Terminus**: Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
|
||||
- **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
|
||||
- **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General*
|
||||
tab (should be selected already), uncheck *Use the system fixed width font* (if not already)
|
||||
and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.
|
||||
|
@ -677,24 +686,31 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.
|
||||
Exit the Preferences dialog by clicking *Close*.
|
||||
- **MobaXterm**: Open *Settings* → *Configuration* → *Terminal* → (under *Terminal look and feel*)
|
||||
and change *Font* to `MesloLGS NF`.
|
||||
and change *Font* to `MesloLGS NF`. If you have *sessions*, you need to change the font in each
|
||||
of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal
|
||||
Settings* → *Font settings*.
|
||||
- **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable
|
||||
*Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
|
||||
To change the font for the remote host connections, go to *Preferences → Terminal Options →
|
||||
Look and Feel* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
|
||||
- **Warp**: Open Warp and Navigate to *Settings* then *Appearance*. Scroll down to *Text* Section
|
||||
and under *"Terminal Font"*, select the `MesloLGS NF` font.
|
||||
- **WSLtty**: Right click on an open terminal and then on *Options*. In the *Text* section, under
|
||||
*Font*, click *"Select..."* and set Font to `MesloLGS NF Regular`.
|
||||
- **Yakuake**: Click *≡* → *Manage Profiles* → *New* → *Appearance*. Click *Choose* next to the
|
||||
*Font* dropdown, select `MesloLGS NF` and click *OK*. Click *OK* to save the profile. Select the
|
||||
new profile and click *Set as Default*.
|
||||
- **Alacritty**: Create or open `~/.config/alacritty/alacritty.yml` and add the following section
|
||||
to it:
|
||||
```yaml
|
||||
font:
|
||||
normal:
|
||||
family: "MesloLGS NF"
|
||||
- **Alacritty**: Create or open `~/.config/alacritty/alacritty.toml` and add the following
|
||||
section to it:
|
||||
```toml
|
||||
[font.normal]
|
||||
family = "MesloLGS NF"
|
||||
```
|
||||
- **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
|
||||
- **foot**: Create or open `~/.config/foot/foot.ini` and add the following section to it:
|
||||
```ini
|
||||
font=MesloLGS NF:size=12
|
||||
```
|
||||
- **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
|
||||
```text
|
||||
font_family MesloLGS NF
|
||||
```
|
||||
|
@ -722,6 +738,15 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
```
|
||||
After changing the config run `xrdb ~/.Xresources` to reload it. The new config is applied to
|
||||
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:
|
||||
|
@ -752,6 +777,17 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
}
|
||||
```
|
||||
**_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.
|
||||
- **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section
|
||||
to it:
|
||||
```ini
|
||||
[basic.interface.font]
|
||||
value = "MesloLGS NF"
|
||||
```
|
||||
- **Ghostty**: Open *Menu → Open Configuration* (Linux) or *Ghostty → Settings...* (Mac) and add
|
||||
the following line:
|
||||
```text
|
||||
font-family = "MesloLGS NF"
|
||||
```
|
||||
1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work
|
||||
incorrectly with the new font.
|
||||
|
||||
|
@ -761,7 +797,7 @@ PR to expand the list!_
|
|||
## Try it in Docker
|
||||
|
||||
Try Powerlevel10k in Docker. You can safely make any changes to the file system while trying out
|
||||
the theme. Once you exit Zsh, the image is deleted.
|
||||
the theme. Once you exit Zsh, the container is deleted.
|
||||
|
||||
```zsh
|
||||
docker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -it --rm alpine sh -uec '
|
||||
|
@ -821,7 +857,7 @@ The command to update Powerlevel10k depends on how it was installed.
|
|||
| Installation | Update command |
|
||||
|-------------------------------|-------------------------------------------------------------|
|
||||
| [Manual](#manual) | `git -C ~/powerlevel10k pull` |
|
||||
| [Oh My Zsh](#oh-my-zsh) | `git -C ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k pull` |
|
||||
| [Oh My Zsh](#oh-my-zsh) | `git -C "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" pull` |
|
||||
| [Prezto](#prezto) | `zprezto-update` |
|
||||
| [Zim](#zim) | `zimfw update` |
|
||||
| [Antigen](#antigen) | `antigen update` |
|
||||
|
@ -831,7 +867,7 @@ The command to update Powerlevel10k depends on how it was installed.
|
|||
| [Zplugin](#zplugin) | `zplugin update` |
|
||||
| [Zinit](#zinit) | `zinit update` |
|
||||
| [Zi](#zi) | `zi update` |
|
||||
| [Zap](#zap) | `zap --update` |
|
||||
| [Zap](#zap) | `zap update` |
|
||||
| [Homebrew](#homebrew) | `brew update && brew upgrade` |
|
||||
| [Arch Linux](#arch-linux) | `yay -S --noconfirm zsh-theme-powerlevel10k-git` |
|
||||
| [Alpine Linux](#alpine-linux) | `apk update && apk upgrade` |
|
||||
|
@ -875,7 +911,7 @@ The command to update Powerlevel10k depends on how it was installed.
|
|||
| Installation | Uninstall command |
|
||||
|-------------------------------|------------------------------------------------------------------|
|
||||
| [Manual](#manual) | `rm -rf ~/powerlevel10k` |
|
||||
| [Oh My Zsh](#oh-my-zsh) | `rm -rf -- ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` |
|
||||
| [Oh My Zsh](#oh-my-zsh) | `rm -rf -- "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"` |
|
||||
| [Prezto](#prezto) | n/a |
|
||||
| [Zim](#zim) | `zimfw uninstall` |
|
||||
| [Antigen](#antigen) | `antigen purge romkatv/powerlevel10k` |
|
||||
|
@ -885,8 +921,8 @@ The command to update Powerlevel10k depends on how it was installed.
|
|||
| [Zplugin](#zplugin) | `zplugin delete romkatv/powerlevel10k` |
|
||||
| [Zinit](#zinit) | `zinit delete romkatv/powerlevel10k` |
|
||||
| [Zi](#zi) | `zi delete romkatv/powerlevel10k` |
|
||||
| [Zap](#zap) | `zsh -ic 'zap --clean'` |
|
||||
| [Homebrew](#homebrew) | `brew uninstall powerlevel10k; brew untap romkatv/powerlevel10k` |
|
||||
| [Zap](#zap) | `zsh -ic 'zap clean'` |
|
||||
| [Homebrew](#homebrew) | `brew uninstall powerlevel10k` |
|
||||
| [Arch Linux](#arch-linux) | `yay -R --noconfirm zsh-theme-powerlevel10k-git` |
|
||||
| [Alpine Linux](#alpine-linux) | `apk del zsh-theme-powerlevel10k` |
|
||||
6. Restart Zsh. [Do not use `source ~/.zshrc`](#weird-things-happen-after-typing-source-zshrc).
|
||||
|
@ -959,13 +995,15 @@ Powerlevel10k does not affect:
|
|||
- Prompt parameters other than `PS1` and `RPS1`.
|
||||
- Zsh options other than those [related to prompt](
|
||||
http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting).
|
||||
- The set of available commands. Powerlevel10k does not install any new commands
|
||||
with the only exception of `p10k`.
|
||||
|
||||
### I'm using Powerlevel9k with Oh My Zsh. How do I migrate?
|
||||
|
||||
1. Run this command:
|
||||
```zsh
|
||||
# Add powerlevel10k to the list of Oh My Zsh themes.
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
|
||||
# Replace ZSH_THEME="powerlevel9k/powerlevel9k" with ZSH_THEME="powerlevel10k/powerlevel10k".
|
||||
sed -i.bak 's/powerlevel9k/powerlevel10k/g' ~/.zshrc
|
||||
# Restart Zsh.
|
||||
|
@ -1126,6 +1164,7 @@ feature:master wip ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42
|
|||
| `feature` | current branch; replaced with `#tag` or `@commit` if not on a branch | `git status --ignore-submodules=dirty` |
|
||||
| `master` | remote tracking branch; only shown if different from local branch | `git rev-parse --abbrev-ref --symbolic-full-name @{upstream}` |
|
||||
| `wip` | the latest commit's summary contains "wip" or "WIP" | `git show --pretty=%s --no-patch HEAD` |
|
||||
| `=` | up to date with the remote (neither ahead nor behind) | `git rev-list --count HEAD...@{upstream}` |
|
||||
| `⇣42` | this many commits behind the remote | `git rev-list --right-only --count HEAD...@{upstream}` |
|
||||
| `⇡42` | this many commits ahead of the remote | `git rev-list --left-only --count HEAD...@{upstream}` |
|
||||
| `⇠42` | this many commits behind the push remote | `git rev-list --right-only --count HEAD...@{push}` |
|
||||
|
@ -1177,7 +1216,7 @@ completes, Powerlevel10k refreshes prompt with new information, this time with c
|
|||
|
||||
When using *Rainbow* style, Git status is displayed as black on grey while it's still being
|
||||
computed. Depending on the terminal color palette, this may be difficult to read. In this case you
|
||||
might want to change the background color to something ligher for more contrast. To do that, open
|
||||
might want to change the background color to something lighter for more contrast. To do that, open
|
||||
`~/.p10k.zsh`, search for `POWERLEVEL9K_VCS_LOADING_BACKGROUND`, uncomment it if it's commented out,
|
||||
and change the value.
|
||||
|
||||
|
@ -1230,9 +1269,9 @@ Prompt segments can be configured to be shown only when the current command you
|
|||
a relevant tool.
|
||||
|
||||
```zsh
|
||||
# Show prompt segment "kubecontext" only when the command you are typing
|
||||
# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl, stern, kubeseal, skaffold, or kubent.
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent'
|
||||
# Show prompt segment "kubecontext" only when the command you are typing invokes
|
||||
# invokes kubectl, helm, or kubens.
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'
|
||||
```
|
||||
|
||||
Configs created by `p10k configure` may contain parameters of this kind. To customize when different
|
||||
|
@ -1248,7 +1287,7 @@ function kube-toggle() {
|
|||
if (( ${+POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND} )); then
|
||||
unset POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND
|
||||
else
|
||||
POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent'
|
||||
POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'
|
||||
fi
|
||||
p10k reload
|
||||
if zle; then
|
||||
|
@ -1301,15 +1340,28 @@ terminals. Many terminals also support customization of these colors through col
|
|||
|
||||
Type `source ~/.p10k.zsh` to apply your changes to the current Zsh session.
|
||||
|
||||
To see how different colors look in your terminal, run the following command:
|
||||
To see how different numbered colors look in your terminal, run the following command:
|
||||
|
||||
```zsh
|
||||
for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done
|
||||
```
|
||||
|
||||
If your terminal supports truecolor, you can use 24-bit colors in the `#RRGGBB` format in addition
|
||||
to the numbered colors.
|
||||
|
||||
```zsh
|
||||
typeset -g POWERLEVEL9K_TIME_FOREGROUND='#FF0000'
|
||||
```
|
||||
|
||||
*Related:*
|
||||
- [Directory is difficult to see in prompt when using Rainbow style.](
|
||||
#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style)
|
||||
- [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)
|
||||
|
||||
By default, VSCode Terminal may arbitrarily replace the foreground color of your choice with a
|
||||
different color. This behavior can be
|
||||
[turned off](https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio) in
|
||||
VSCode settings.
|
||||
|
||||
### Why does Powerlevel10k spawn extra processes?
|
||||
|
||||
|
@ -1481,6 +1533,7 @@ Powerlevel10k are released. This may change in the future but not soon.
|
|||
|
||||
## Troubleshooting
|
||||
|
||||
- [`[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found`](#oh-my-zsh-theme-powerlevel10kpowerlevel10k-not-found)
|
||||
- [Question mark in prompt](#question-mark-in-prompt)
|
||||
- [Icons, glyphs or powerline symbols don't render](#icons-glyphs-or-powerline-symbols-dont-render)
|
||||
- [Sub-pixel imperfections around powerline symbols](#sub-pixel-imperfections-around-powerline-symbols)
|
||||
|
@ -1498,9 +1551,32 @@ Powerlevel10k are released. This may change in the future but not soon.
|
|||
- [Transient prompt stops working after some time](#transient-prompt-stops-working-after-some-time)
|
||||
- [Cannot make Powerlevel10k work with my plugin manager](#cannot-make-powerlevel10k-work-with-my-plugin-manager)
|
||||
- [Directory is difficult to see in prompt when using Rainbow style](#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style)
|
||||
- [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)
|
||||
- [Horrific mess when resizing terminal window](#horrific-mess-when-resizing-terminal-window)
|
||||
- [Icons cut off in Konsole](#icons-cut-off-in-konsole)
|
||||
- [Arch Linux logo has a dot in the bottom right corner](#arch-linux-logo-has-a-dot-in-the-bottom-right-corner)
|
||||
- [Incorrect git status in prompt](#incorrect-git-status-in-prompt)
|
||||
|
||||
### `[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found`
|
||||
|
||||
When opening a terminal, or starting zsh manually, you may encounter this error message:
|
||||
|
||||
```text
|
||||
[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found
|
||||
```
|
||||
|
||||
1. First, run `typeset -p P9K_VERSION` to check whether Powerlevel10k has been loaded.
|
||||
- If `typeset -p P9K_VERSION` succeeds and prints something like `typeset P9K_VERSION=1.19.14`
|
||||
(the version could be different), remove the following line from `~/.zshrc`:
|
||||
```zsh
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
```
|
||||
- If `typeset -p P9K_VERSION` fails with the error `typeset: no such variable: P9K_VERSION`, run
|
||||
the following command:
|
||||
```zsh
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
|
||||
```
|
||||
2. Restart Zsh with `exec zsh`.
|
||||
|
||||
### Question mark in prompt
|
||||
|
||||
|
@ -1685,10 +1761,15 @@ and make sure that `TERM` environment variable is set correctly. Verify with
|
|||
If there is no UTF-8 locale on the system, configuration wizard won't offer prompt styles that use
|
||||
Unicode characters. *Fix*: Install a UTF-8 locale. Verify with `locale -a`.
|
||||
|
||||
When a UTF-8 locale is available, the first few questions asked by the configuration wizard assess
|
||||
capabilities of the terminal font. If your answers indicate that some glyphs don't render correctly,
|
||||
configuration wizard won't offer prompt styles that use them. *Fix*: Restart your terminal and
|
||||
install [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). Verify by running
|
||||
Another case in which configuration wizard may not offer Unicode prompt styles is when the
|
||||
`MULTIBYTE` shell option is disabled. *Fix*: Enable the `MULTIBYTE` option, or rather don't disable
|
||||
it (this option is enabled in Zsh by default). Verify with `print -r -- ${options[MULTIBYTE]}`.
|
||||
|
||||
When `MULTIBYTE` is enabled and a UTF-8 locale is available, the first few questions asked by the
|
||||
configuration wizard assess capabilities of the terminal font. If your answers indicate that some
|
||||
glyphs don't render correctly, configuration wizard won't offer prompt styles that use them. *Fix*:
|
||||
Restart your terminal and install
|
||||
[the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). Verify by running
|
||||
`p10k configure` and checking that all glyphs render correctly.
|
||||
|
||||
### Cannot install the recommended font
|
||||
|
@ -1814,6 +1895,15 @@ There are several ways to fix this.
|
|||
`POWERLEVEL9K_DIR_ANCHOR_FOREGROUND` and `POWERLEVEL9K_DIR_ANCHOR_BOLD`. You can find them in
|
||||
`~/.p10k.zsh`.
|
||||
|
||||
*Related*: [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)
|
||||
|
||||
### Incorrect foreground color in VSCode Terminal
|
||||
|
||||
By default, VSCode Terminal may arbitrarily replace the foreground color of your choice with a
|
||||
different color. This behavior can be
|
||||
[turned off](https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio) in
|
||||
VSCode settings.
|
||||
|
||||
### Horrific mess when resizing terminal window
|
||||
|
||||
When you resize a terminal window horizontally back and forth a few times, you might see this ugly
|
||||
|
@ -2010,3 +2100,16 @@ Some fonts have this incorrect dotted icon in bold typeface. There are two ways
|
|||
```zsh
|
||||
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' # not bold
|
||||
```
|
||||
|
||||
### Incorrect git status in prompt
|
||||
|
||||
Powerlevel10k uses [gitstatusd](https://github.com/romkatv/gitstatus) to inspect the state of git
|
||||
repositories. The project relies on the [libgit2](https://github.com/libgit2/libgit2) library, which
|
||||
has some gaps in its implementation. Under some conditions, this may result in discrepancies between
|
||||
the real state of a git repository (reflected by `git status`) and what gets shown in the
|
||||
Powerlevel10k prompt.
|
||||
|
||||
Most notably, [libgit2 does not support `skipHash`](https://github.com/libgit2/libgit2/issues/6531).
|
||||
If you see incorrect git status in prompt, run `git config -l` and check whether `skipHash` is
|
||||
enabled. If it is, consider disabling it. Keep in mind that `skipHash` may be implicitly enabled
|
||||
when activating certain git features, such as `manyFiles`.
|
||||
|
|
|
@ -81,12 +81,14 @@
|
|||
context # user@hostname
|
||||
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||
ranger # ranger shell (https://github.com/ranger/ranger)
|
||||
yazi # yazi shell (https://github.com/sxyazi/yazi)
|
||||
nnn # nnn shell (https://github.com/jarun/nnn)
|
||||
lf # lf shell (https://github.com/gokcehan/lf)
|
||||
xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
||||
vim_shell # vim shell indicator (:sh)
|
||||
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
||||
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
||||
# vi_mode # vi mode (you don't need this if you've enabled prompt_char)
|
||||
# vpn_ip # virtual private network indicator
|
||||
# load # CPU load
|
||||
|
@ -96,6 +98,7 @@
|
|||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
||||
# cpu_arch # CPU architecture
|
||||
# time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
|
@ -168,6 +171,9 @@
|
|||
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
|
||||
# Separator between different-color segments on the right.
|
||||
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
|
||||
# To remove a separator between two segments, add "_joined" to the second segment name.
|
||||
# For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined)
|
||||
|
||||
# The right end of left prompt.
|
||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
|
||||
# The left end of right prompt.
|
||||
|
@ -237,7 +243,8 @@
|
|||
.java-version
|
||||
.perl-version
|
||||
.php-version
|
||||
.tool-version
|
||||
.tool-versions
|
||||
.mise.toml
|
||||
.shorten_folder_marker
|
||||
.svn
|
||||
.terraform
|
||||
|
@ -423,11 +430,17 @@
|
|||
res+=" ${modified}wip"
|
||||
fi
|
||||
|
||||
# ⇣42 if behind the remote.
|
||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
||||
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
|
||||
# ⇣42 if behind the remote.
|
||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
||||
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
|
||||
# Tip: Uncomment the next line to display '=' if up to date with the remote.
|
||||
# res+=" ${clean}="
|
||||
fi
|
||||
|
||||
# ⇠42 if behind the push remote.
|
||||
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
|
||||
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
|
||||
|
@ -717,6 +730,12 @@
|
|||
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
|
||||
# Yazi shell color.
|
||||
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
|
||||
# Nnn shell color.
|
||||
|
@ -752,12 +771,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
|
||||
|
@ -784,9 +812,8 @@
|
|||
# Text and color for insert vi mode.
|
||||
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
|
||||
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######################################[ ram: free RAM ]#######################################
|
||||
# RAM color.
|
||||
|
@ -868,6 +895,19 @@
|
|||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
|
||||
# Color when using local/global history.
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
|
||||
|
||||
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
################################[ cpu_arch: CPU architecture ]################################
|
||||
# CPU architecture color.
|
||||
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
|
||||
|
@ -1004,6 +1044,11 @@
|
|||
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
|
||||
# Nvm color.
|
||||
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
|
||||
# If set to false, hide node version if it's the same as default:
|
||||
# $(nvm version current) == $(nvm version default).
|
||||
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
|
||||
# If set to false, hide node version if it's equal to "system".
|
||||
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
|
@ -1245,7 +1290,7 @@
|
|||
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
||||
# Show kubecontext only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show kubecontext.
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent'
|
||||
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.
|
||||
|
@ -1332,7 +1377,7 @@
|
|||
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
|
||||
# Show aws only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show aws.
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
|
||||
|
||||
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current AWS profile gets matched.
|
||||
|
@ -1380,10 +1425,39 @@
|
|||
# Show azure only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show azure.
|
||||
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
|
||||
|
||||
# POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current azure account name gets matched.
|
||||
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
||||
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
|
||||
# you'll see this value in your prompt. The second element of each pair in
|
||||
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
|
||||
# first match wins.
|
||||
#
|
||||
# For example, given these settings:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD
|
||||
# '*test*' TEST
|
||||
# '*' OTHER)
|
||||
#
|
||||
# If your current azure account is "company_test", its class is TEST because "company_test"
|
||||
# doesn't match the pattern '*prod*' but does match '*test*'.
|
||||
#
|
||||
# You can define different colors, icons and content expansions for different classes:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
||||
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD # These values are examples that are unlikely
|
||||
# '*test*' TEST # to match your needs. Customize them as needed.
|
||||
'*' OTHER)
|
||||
|
||||
# Azure account name color.
|
||||
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
|
||||
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
|
||||
# Show gcloud only when the command you are typing invokes one of these tools.
|
||||
|
@ -1504,7 +1578,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)|tailscale)[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.
|
||||
|
@ -1604,7 +1678,7 @@
|
|||
|
||||
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
|
||||
# is to generate the prompt segment for display in instant prompt. See
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
||||
#
|
||||
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
|
||||
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
|
||||
|
@ -1640,7 +1714,7 @@
|
|||
# it incompatible with your zsh configuration files.
|
||||
# - quiet: Enable instant prompt and don't print warnings when detecting console output
|
||||
# during zsh initialization. Choose this if you've read and understood
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
||||
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
||||
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
||||
# seen the warning, or if you are unsure what this all means.
|
||||
|
|
|
@ -81,12 +81,14 @@
|
|||
context # user@hostname
|
||||
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||
ranger # ranger shell (https://github.com/ranger/ranger)
|
||||
yazi # yazi shell (https://github.com/sxyazi/yazi)
|
||||
nnn # nnn shell (https://github.com/jarun/nnn)
|
||||
lf # lf shell (https://github.com/gokcehan/lf)
|
||||
xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
||||
vim_shell # vim shell indicator (:sh)
|
||||
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
||||
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
||||
# vpn_ip # virtual private network indicator
|
||||
# load # CPU load
|
||||
# disk_usage # disk usage
|
||||
|
@ -95,6 +97,7 @@
|
|||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
||||
# cpu_arch # CPU architecture
|
||||
# time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
|
@ -231,7 +234,8 @@
|
|||
.java-version
|
||||
.perl-version
|
||||
.php-version
|
||||
.tool-version
|
||||
.tool-versions
|
||||
.mise.toml
|
||||
.shorten_folder_marker
|
||||
.svn
|
||||
.terraform
|
||||
|
@ -274,10 +278,6 @@
|
|||
# the full directory that was used in previous commands.
|
||||
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
|
||||
|
||||
# Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and
|
||||
# POWERLEVEL9K_DIR_CLASSES below.
|
||||
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2
|
||||
|
||||
# Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
|
||||
# and POWERLEVEL9K_DIR_CLASSES below.
|
||||
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
|
||||
|
@ -421,11 +421,17 @@
|
|||
res+=" ${modified}wip"
|
||||
fi
|
||||
|
||||
# ⇣42 if behind the remote.
|
||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
||||
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
|
||||
# ⇣42 if behind the remote.
|
||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
||||
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
|
||||
# Tip: Uncomment the next line to display '=' if up to date with the remote.
|
||||
# res+=" ${clean}="
|
||||
fi
|
||||
|
||||
# ⇠42 if behind the push remote.
|
||||
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
|
||||
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
|
||||
|
@ -715,6 +721,12 @@
|
|||
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
|
||||
# Yazi shell color.
|
||||
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
|
||||
# Nnn shell color.
|
||||
|
@ -750,12 +762,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
|
||||
|
@ -849,6 +870,19 @@
|
|||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
|
||||
# Color when using local/global history.
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=5
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=3
|
||||
|
||||
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
################################[ cpu_arch: CPU architecture ]################################
|
||||
# CPU architecture color.
|
||||
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=3
|
||||
|
@ -985,6 +1019,11 @@
|
|||
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
|
||||
# Nvm color.
|
||||
typeset -g POWERLEVEL9K_NVM_FOREGROUND=2
|
||||
# If set to false, hide node version if it's the same as default:
|
||||
# $(nvm version current) == $(nvm version default).
|
||||
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
|
||||
# If set to false, hide node version if it's equal to "system".
|
||||
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
|
@ -1187,7 +1226,7 @@
|
|||
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
||||
# Show kubecontext only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show kubecontext.
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent'
|
||||
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.
|
||||
|
@ -1313,7 +1352,7 @@
|
|||
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
|
||||
# Show aws only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show aws.
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
|
||||
|
||||
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current AWS profile gets matched.
|
||||
|
@ -1361,10 +1400,39 @@
|
|||
# Show azure only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show azure.
|
||||
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
|
||||
|
||||
# POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current azure account name gets matched.
|
||||
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
||||
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
|
||||
# you'll see this value in your prompt. The second element of each pair in
|
||||
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
|
||||
# first match wins.
|
||||
#
|
||||
# For example, given these settings:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD
|
||||
# '*test*' TEST
|
||||
# '*' OTHER)
|
||||
#
|
||||
# If your current azure account is "company_test", its class is TEST because "company_test"
|
||||
# doesn't match the pattern '*prod*' but does match '*test*'.
|
||||
#
|
||||
# You can define different colors, icons and content expansions for different classes:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
||||
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD # These values are examples that are unlikely
|
||||
# '*test*' TEST # to match your needs. Customize them as needed.
|
||||
'*' OTHER)
|
||||
|
||||
# Azure account name color.
|
||||
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=4
|
||||
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=4
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
|
||||
# Show gcloud only when the command you are typing invokes one of these tools.
|
||||
|
@ -1485,7 +1553,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)|tailscale)[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.
|
||||
|
@ -1585,7 +1653,7 @@
|
|||
|
||||
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
|
||||
# is to generate the prompt segment for display in instant prompt. See
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
||||
#
|
||||
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
|
||||
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
|
||||
|
@ -1621,7 +1689,7 @@
|
|||
# it incompatible with your zsh configuration files.
|
||||
# - quiet: Enable instant prompt and don't print warnings when detecting console output
|
||||
# during zsh initialization. Choose this if you've read and understood
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
||||
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
||||
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
||||
# seen the warning, or if you are unsure what this all means.
|
||||
|
|
|
@ -81,12 +81,14 @@
|
|||
context # user@hostname
|
||||
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||
ranger # ranger shell (https://github.com/ranger/ranger)
|
||||
yazi # yazi shell (https://github.com/sxyazi/yazi)
|
||||
nnn # nnn shell (https://github.com/jarun/nnn)
|
||||
lf # lf shell (https://github.com/gokcehan/lf)
|
||||
xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
||||
vim_shell # vim shell indicator (:sh)
|
||||
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
||||
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
||||
# vpn_ip # virtual private network indicator
|
||||
# load # CPU load
|
||||
# disk_usage # disk usage
|
||||
|
@ -95,6 +97,7 @@
|
|||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
||||
# cpu_arch # CPU architecture
|
||||
# time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
|
@ -231,7 +234,8 @@
|
|||
.java-version
|
||||
.perl-version
|
||||
.php-version
|
||||
.tool-version
|
||||
.tool-versions
|
||||
.mise.toml
|
||||
.shorten_folder_marker
|
||||
.svn
|
||||
.terraform
|
||||
|
@ -417,11 +421,17 @@
|
|||
res+=" ${modified}wip"
|
||||
fi
|
||||
|
||||
# ⇣42 if behind the remote.
|
||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
||||
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
|
||||
# ⇣42 if behind the remote.
|
||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
||||
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
|
||||
# Tip: Uncomment the next line to display '=' if up to date with the remote.
|
||||
# res+=" ${clean}="
|
||||
fi
|
||||
|
||||
# ⇠42 if behind the push remote.
|
||||
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
|
||||
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
|
||||
|
@ -711,6 +721,12 @@
|
|||
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
|
||||
# Yazi shell color.
|
||||
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
|
||||
# Nnn shell color.
|
||||
|
@ -746,12 +762,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
|
||||
|
@ -845,6 +870,19 @@
|
|||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
|
||||
# Color when using local/global history.
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
|
||||
|
||||
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
################################[ cpu_arch: CPU architecture ]################################
|
||||
# CPU architecture color.
|
||||
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
|
||||
|
@ -981,6 +1019,11 @@
|
|||
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
|
||||
# Nvm color.
|
||||
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
|
||||
# If set to false, hide node version if it's the same as default:
|
||||
# $(nvm version current) == $(nvm version default).
|
||||
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
|
||||
# If set to false, hide node version if it's equal to "system".
|
||||
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
|
@ -1183,7 +1226,7 @@
|
|||
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
||||
# Show kubecontext only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show kubecontext.
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent'
|
||||
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.
|
||||
|
@ -1309,7 +1352,7 @@
|
|||
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
|
||||
# Show aws only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show aws.
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
|
||||
|
||||
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current AWS profile gets matched.
|
||||
|
@ -1357,10 +1400,39 @@
|
|||
# Show azure only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show azure.
|
||||
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
|
||||
|
||||
# POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current azure account name gets matched.
|
||||
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
||||
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
|
||||
# you'll see this value in your prompt. The second element of each pair in
|
||||
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
|
||||
# first match wins.
|
||||
#
|
||||
# For example, given these settings:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD
|
||||
# '*test*' TEST
|
||||
# '*' OTHER)
|
||||
#
|
||||
# If your current azure account is "company_test", its class is TEST because "company_test"
|
||||
# doesn't match the pattern '*prod*' but does match '*test*'.
|
||||
#
|
||||
# You can define different colors, icons and content expansions for different classes:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
||||
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD # These values are examples that are unlikely
|
||||
# '*test*' TEST # to match your needs. Customize them as needed.
|
||||
'*' OTHER)
|
||||
|
||||
# Azure account name color.
|
||||
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
|
||||
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
|
||||
# Show gcloud only when the command you are typing invokes one of these tools.
|
||||
|
@ -1481,7 +1553,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)|tailscale)[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.
|
||||
|
@ -1581,7 +1653,7 @@
|
|||
|
||||
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
|
||||
# is to generate the prompt segment for display in instant prompt. See
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
||||
#
|
||||
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
|
||||
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
|
||||
|
@ -1617,7 +1689,7 @@
|
|||
# it incompatible with your zsh configuration files.
|
||||
# - quiet: Enable instant prompt and don't print warnings when detecting console output
|
||||
# during zsh initialization. Choose this if you've read and understood
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
||||
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
||||
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
||||
# seen the warning, or if you are unsure what this all means.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -81,12 +81,14 @@
|
|||
context # user@hostname
|
||||
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||
ranger # ranger shell (https://github.com/ranger/ranger)
|
||||
yazi # yazi shell (https://github.com/sxyazi/yazi)
|
||||
nnn # nnn shell (https://github.com/jarun/nnn)
|
||||
lf # lf shell (https://github.com/gokcehan/lf)
|
||||
xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
||||
vim_shell # vim shell indicator (:sh)
|
||||
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
||||
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
||||
# vi_mode # vi mode (you don't need this if you've enabled prompt_char)
|
||||
# vpn_ip # virtual private network indicator
|
||||
# load # CPU load
|
||||
|
@ -96,6 +98,7 @@
|
|||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
||||
# cpu_arch # CPU architecture
|
||||
# time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
|
@ -165,6 +168,9 @@
|
|||
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
|
||||
# Separator between different-color segments on the right.
|
||||
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
|
||||
# To remove a separator between two segments, add "_joined" to the second segment name.
|
||||
# For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined)
|
||||
|
||||
# The right end of left prompt.
|
||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
|
||||
# The left end of right prompt.
|
||||
|
@ -237,7 +243,8 @@
|
|||
.java-version
|
||||
.perl-version
|
||||
.php-version
|
||||
.tool-version
|
||||
.tool-versions
|
||||
.mise.toml
|
||||
.shorten_folder_marker
|
||||
.svn
|
||||
.terraform
|
||||
|
@ -424,11 +431,17 @@
|
|||
res+=" ${modified}wip"
|
||||
fi
|
||||
|
||||
# ⇣42 if behind the remote.
|
||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
||||
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
|
||||
# ⇣42 if behind the remote.
|
||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
||||
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
|
||||
# Tip: Uncomment the next line to display '=' if up to date with the remote.
|
||||
# res+=" ${clean}="
|
||||
fi
|
||||
|
||||
# ⇠42 if behind the push remote.
|
||||
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
|
||||
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
|
||||
|
@ -736,7 +749,14 @@
|
|||
typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
|
||||
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
|
||||
# Yazi shell color.
|
||||
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3
|
||||
typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
|
||||
# Nnn shell color.
|
||||
typeset -g POWERLEVEL9K_NNN_FOREGROUND=0
|
||||
|
@ -777,12 +797,22 @@
|
|||
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0
|
||||
typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4
|
||||
|
||||
# Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
|
||||
# typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
|
||||
|
||||
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
|
||||
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
|
||||
# chezmoi shell color.
|
||||
typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=0
|
||||
typeset -g POWERLEVEL9K_CHEZMOI_SHELL_BACKGROUND=4
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##################################[ disk_usage: disk usage ]##################################
|
||||
# Colors for different levels of disk usage.
|
||||
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3
|
||||
|
@ -814,6 +844,8 @@
|
|||
# Text and color for insert vi mode.
|
||||
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
|
||||
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######################################[ ram: free RAM ]#######################################
|
||||
# RAM color.
|
||||
|
@ -904,6 +936,21 @@
|
|||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
|
||||
# Color when using local/global history.
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=0
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_BACKGROUND=5
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=0
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_BACKGROUND=3
|
||||
|
||||
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
################################[ cpu_arch: CPU architecture ]################################
|
||||
# CPU architecture color.
|
||||
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=0
|
||||
|
@ -1050,6 +1097,11 @@
|
|||
# Nvm color.
|
||||
typeset -g POWERLEVEL9K_NVM_FOREGROUND=0
|
||||
typeset -g POWERLEVEL9K_NVM_BACKGROUND=5
|
||||
# If set to false, hide node version if it's the same as default:
|
||||
# $(nvm version current) == $(nvm version default).
|
||||
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
|
||||
# If set to false, hide node version if it's equal to "system".
|
||||
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
|
@ -1318,7 +1370,7 @@
|
|||
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
||||
# Show kubecontext only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show kubecontext.
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent'
|
||||
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.
|
||||
|
@ -1407,7 +1459,7 @@
|
|||
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
|
||||
# Show aws only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show aws.
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
|
||||
|
||||
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current AWS profile gets matched.
|
||||
|
@ -1457,11 +1509,41 @@
|
|||
# Show azure only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show azure.
|
||||
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
|
||||
|
||||
# POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current azure account name gets matched.
|
||||
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
||||
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
|
||||
# you'll see this value in your prompt. The second element of each pair in
|
||||
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
|
||||
# first match wins.
|
||||
#
|
||||
# For example, given these settings:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD
|
||||
# '*test*' TEST
|
||||
# '*' OTHER)
|
||||
#
|
||||
# If your current azure account is "company_test", its class is TEST because "company_test"
|
||||
# doesn't match the pattern '*prod*' but does match '*test*'.
|
||||
#
|
||||
# You can define different colors, icons and content expansions for different classes:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_BACKGROUND=0
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
||||
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD # These values are examples that are unlikely
|
||||
# '*test*' TEST # to match your needs. Customize them as needed.
|
||||
'*' OTHER)
|
||||
|
||||
# Azure account name color.
|
||||
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7
|
||||
typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4
|
||||
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=7
|
||||
typeset -g POWERLEVEL9K_AZURE_OTHER_BACKGROUND=4
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
|
||||
# Show gcloud only when the command you are typing invokes one of these tools.
|
||||
|
@ -1587,7 +1669,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)|tailscale)[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.
|
||||
|
@ -1693,7 +1775,7 @@
|
|||
|
||||
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
|
||||
# is to generate the prompt segment for display in instant prompt. See
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
||||
#
|
||||
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
|
||||
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
|
||||
|
@ -1730,7 +1812,7 @@
|
|||
# it incompatible with your zsh configuration files.
|
||||
# - quiet: Enable instant prompt and don't print warnings when detecting console output
|
||||
# during zsh initialization. Choose this if you've read and understood
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
||||
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
||||
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
||||
# seen the warning, or if you are unsure what this all means.
|
||||
|
|
|
@ -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.
|
||||
|
|
44
font.md
44
font.md
|
@ -55,6 +55,7 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
- **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<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`.
|
||||
|
@ -62,7 +63,7 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
*Meslo Nerd Font*.
|
||||
- **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select
|
||||
*MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font.
|
||||
- **Terminus**: Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
|
||||
- **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.
|
||||
- **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General*
|
||||
tab (should be selected already), uncheck *Use the system fixed width font* (if not already)
|
||||
and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.
|
||||
|
@ -70,22 +71,29 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.
|
||||
Exit the Preferences dialog by clicking *Close*.
|
||||
- **MobaXterm**: Open *Settings* → *Configuration* → *Terminal* → (under *Terminal look and feel*)
|
||||
and change *Font* to `MesloLGS NF`.
|
||||
and change *Font* to `MesloLGS NF`. If you have *sessions*, you need to change the font in each
|
||||
of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal
|
||||
Settings* → *Font settings*.
|
||||
- **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable
|
||||
*Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
|
||||
To change the font for the remote host connections, go to *Preferences → Terminal Options →
|
||||
Look and Feel* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
|
||||
- **Warp**: Open Warp and Navigate to *Settings* then *Appearance*. Scroll down to *Text* Section
|
||||
and under *"Terminal Font"*, select the `MesloLGS NF` font.
|
||||
- **WSLtty**: Right click on an open terminal and then on *Options*. In the *Text* section, under
|
||||
*Font*, click *"Select..."* and set Font to `MesloLGS NF Regular`.
|
||||
- **Yakuake**: Click *≡* → *Manage Profiles* → *New* → *Appearance*. Click *Choose* next to the
|
||||
*Font* dropdown, select `MesloLGS NF` and click *OK*. Click *OK* to save the profile. Select the
|
||||
new profile and click *Set as Default*.
|
||||
- **Alacritty**: Create or open `~/.config/alacritty/alacritty.yml` and add the following section
|
||||
to it:
|
||||
```yaml
|
||||
font:
|
||||
normal:
|
||||
family: "MesloLGS NF"
|
||||
- **Alacritty**: Create or open `~/.config/alacritty/alacritty.toml` and add the following
|
||||
section to it:
|
||||
```toml
|
||||
[font.normal]
|
||||
family = "MesloLGS NF"
|
||||
```
|
||||
- **foot**: Create or open `~/.config/foot/foot.ini` and add the following section to it:
|
||||
```ini
|
||||
font=MesloLGS NF:size=12
|
||||
```
|
||||
- **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:
|
||||
```text
|
||||
|
@ -115,6 +123,15 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
```
|
||||
After changing the config run `xrdb ~/.Xresources` to reload it. The new config is applied to
|
||||
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:
|
||||
|
@ -145,6 +162,17 @@ If you are using a different terminal, proceed with manual font installation.
|
|||
}
|
||||
```
|
||||
**_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.
|
||||
- **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section
|
||||
to it:
|
||||
```ini
|
||||
[basic.interface.font]
|
||||
value = "MesloLGS NF"
|
||||
```
|
||||
- **Ghostty**: Open *Menu → Open Configuration* (Linux) or *Ghostty → Settings...* (Mac) and add
|
||||
the following line:
|
||||
```text
|
||||
font-family = "MesloLGS NF"
|
||||
```
|
||||
1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work
|
||||
incorrectly with the new font.
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ VERSION ?= $(shell . ./build.info && printf "%s" "$$gitstatus_version")
|
|||
#
|
||||
# Sized delete is implemented as __ZdlPvm in /usr/lib/libc++.1.dylib but this symbol is
|
||||
# missing in macOS prior to 10.13.
|
||||
CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) -Wall -Werror # -g -fsanitize=thread
|
||||
CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) # -Wall -g -fsanitize=thread
|
||||
LDFLAGS += -pthread # -fsanitize=thread
|
||||
LDLIBS += -lgit2 # -lprofiler -lunwind
|
||||
|
||||
|
@ -44,3 +44,14 @@ pkg: zwc
|
|||
GITSTATUS_DAEMON= GITSTATUS_CACHE_DIR=$(shell pwd)/usrbin ./install -f
|
||||
|
||||
-include $(OBJS:.o=.dep)
|
||||
|
||||
.PHONY: help
|
||||
|
||||
help:
|
||||
@echo "Usage: make [TARGET]"
|
||||
@echo "Available targets:"
|
||||
@echo " all Build $(APPNAME) (default target)"
|
||||
@echo " clean Remove generated files and directories"
|
||||
@echo " zwc Compile Zsh files"
|
||||
@echo " minify Remove unnecessary files and folders"
|
||||
@echo " pkg Create a package"
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# gitstatus
|
||||
|
||||
- **THE PROJECT HAS VERY LIMITED SUPPORT**
|
||||
- **NO NEW FEATURES ARE IN THE WORKS**
|
||||
- **MOST BUGS WILL GO UNFIXED**
|
||||
|
||||
**gitstatus** is a 10x faster alternative to `git status` and `git describe`. Its primary use
|
||||
case is to enable fast git prompt in interactive shells.
|
||||
|
||||
|
@ -255,7 +259,7 @@ repository was checked out to an ext4 filesystem on M.2 SSD.
|
|||
Three functionally equivalent tools for computing git status were benchmarked:
|
||||
|
||||
* `gitstatusd`
|
||||
* `git` with untracked cache enabled
|
||||
* `git` with `core.untrackedcache` enabled and `core.fsmonitor` disabled
|
||||
* `lg2` -- a demo/example executable from [libgit2](https://github.com/romkatv/libgit2) that
|
||||
implements a subset of `git` functionality on top of libgit2 API; for the purposes of this
|
||||
benchmark the subset is sufficient to generate the same data as the other tools
|
||||
|
@ -381,7 +385,7 @@ generated with the same tools and the same flags as the profile of libgit2.
|
|||
|
||||
Since both profiles were generated from the same workload, absolute numbers can be compared. We can
|
||||
see that gitstatusd took 62 seconds in total compared to libgit2's 232 seconds. System calls at the
|
||||
core of the algorithm are cleary visible. `__GI___fxstatat` is a flavor of `stat()`, and the other
|
||||
core of the algorithm are clearly visible. `__GI___fxstatat` is a flavor of `stat()`, and the other
|
||||
three calls -- `__libc_openat64`, `__libc_close` and `__GI___fxstat` are responsible for opening
|
||||
directories and finding untracked files. Notice that there is almost nothing else in the profile
|
||||
apart from these calls. The rest of the code accounts for 3.77 seconds of CPU time -- 32 times less
|
||||
|
|
|
@ -153,7 +153,16 @@ case "$gitstatus_cpu" in
|
|||
;;
|
||||
esac
|
||||
|
||||
cflags="$archflag=$gitstatus_cpu -fno-plt -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie"
|
||||
case "$gitstatus_arch" in
|
||||
e2k)
|
||||
nopltflag=""
|
||||
;;
|
||||
*)
|
||||
nopltflag="-fno-plt"
|
||||
;;
|
||||
esac
|
||||
|
||||
cflags="$archflag=$gitstatus_cpu $nopltflag -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie"
|
||||
ldflags=
|
||||
static_pie=
|
||||
|
||||
|
@ -384,6 +393,7 @@ CFLAGS="$libgit2_cflags" command cmake \
|
|||
-DUSE_GSSAPI=OFF \
|
||||
-DUSE_NTLMCLIENT=OFF \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-G "Unix Makefiles" \
|
||||
$libgit2_cmake_flags \
|
||||
..
|
||||
command make -j "$cpus" VERBOSE=1
|
||||
|
@ -545,6 +555,7 @@ if [ -z "$gitstatus_cpu" ]; then
|
|||
x86_64|amd64) gitstatus_cpu=x86-64;;
|
||||
x86) gitstatus_cpu=i586;;
|
||||
s390x) gitstatus_cpu=z900;;
|
||||
e2k) gitstatus_cpu=native;;
|
||||
i386|i586|i686) gitstatus_cpu="$gitstatus_arch";;
|
||||
*)
|
||||
>&2 echo '[error] unable to infer target CPU architecture'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# This value is also read by shell bindings (indirectly, through
|
||||
# ./install) when using GITSTATUS_DAEMON or usrbin/gitstatusd.
|
||||
gitstatus_version="v1.5.4"
|
||||
gitstatus_version="v1.5.5"
|
||||
|
||||
# libgit2 is a build time dependency of gitstatusd. The values of
|
||||
# libgit2_version and libgit2_sha256 are read by ./build.
|
||||
|
@ -18,5 +18,5 @@ gitstatus_version="v1.5.4"
|
|||
#
|
||||
# If sha256 of ./deps/libgit2-${libgit2_version}.tar.gz doesn't match,
|
||||
# build gets aborted.
|
||||
libgit2_version="tag-0ad3d776aa86dd607dc86dcd7f77ad3ed7ebec61"
|
||||
libgit2_sha256="c5d0117ae74d3ef244c26f10cce022019077dbc4563e6251fa9f56d36868ce74"
|
||||
libgit2_version="tag-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6"
|
||||
libgit2_sha256="4ce11d71ee576dbbc410b9fa33a9642809cc1fa687b315f7c23eeb825b251e93"
|
||||
|
|
|
@ -290,7 +290,7 @@ function gitstatus_stop() {
|
|||
unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE _GITSTATUS_CLIENT_PID
|
||||
}
|
||||
|
||||
# Retrives status of a git repository from a directory under its working tree.
|
||||
# Retrieves status of a git repository from a directory under its working tree.
|
||||
#
|
||||
# Usage: gitstatus_query [OPTION]...
|
||||
#
|
||||
|
|
|
@ -59,7 +59,7 @@ zmodload -F zsh/files b:zf_rm || return
|
|||
|
||||
typeset -g _gitstatus_plugin_dir"${1:-}"="${${(%):-%x}:A:h}"
|
||||
|
||||
# Retrives status of a git repo from a directory under its working tree.
|
||||
# Retrieves status of a git repo from a directory under its working tree.
|
||||
#
|
||||
## Usage: gitstatus_query [OPTION]... NAME
|
||||
#
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Source gitstatus.plugin.sh from $GITSTATUS_DIR or from the same directory
|
||||
# in which the current script resides if the variable isn't set.
|
||||
if [[ -n "${GITSTATUS_DIR:-}" ]]; then
|
||||
if [[ -n "${GITSTATUS_DIR-}" ]]; then
|
||||
source "$GITSTATUS_DIR" || return
|
||||
elif [[ "${BASH_SOURCE[0]}" == */* ]]; then
|
||||
source "${BASH_SOURCE[0]%/*}/gitstatus.plugin.sh" || return
|
||||
|
@ -85,7 +85,14 @@ function gitstatus_prompt_update() {
|
|||
gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1
|
||||
|
||||
# On every prompt, fetch git status and set GITSTATUS_PROMPT.
|
||||
PROMPT_COMMAND=gitstatus_prompt_update
|
||||
if [[ -z "${PROMPT_COMMAND[*]}" ]]; then
|
||||
PROMPT_COMMAND=gitstatus_prompt_update
|
||||
elif [[ ! "${PROMPT_COMMAND[*]}" =~ [[:space:]\;]?gitstatus_prompt_update[[:space:]\;]? ]]; then
|
||||
# Note: If PROMPT_COMMAND is an array, this will modify its first element.
|
||||
PROMPT_COMMAND=$'gitstatus_prompt_update\n'"$PROMPT_COMMAND"
|
||||
fi
|
||||
|
||||
# Retain 3 trailing components of the current directory.
|
||||
PROMPT_DIRTRIM=3
|
||||
|
||||
# Enable promptvars so that ${GITSTATUS_PROMPT} in PS1 is expanded.
|
||||
|
|
|
@ -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 << ": "
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
namespace gitstatus {
|
||||
|
||||
// On error, leaves entries unchaged and returns false. Does not throw.
|
||||
// On error, leaves entries unchanged and returns false. Does not throw.
|
||||
//
|
||||
// On success, appends names of files from the specified directory to entries and returns true.
|
||||
// Every appended entry is a null-terminated string. At -1 offset is its d_type. All elements
|
||||
|
|
|
@ -61,7 +61,7 @@ size_t ParseSizeT(const char* s) {
|
|||
|
||||
void PrintUsage() {
|
||||
std::cout << "Usage: gitstatusd [OPTION]...\n"
|
||||
<< "Print machine-readable status of the git repos for directores in stdin.\n"
|
||||
<< "Print machine-readable status of the git repos for directories in stdin.\n"
|
||||
<< "\n"
|
||||
<< "OPTIONS\n"
|
||||
<< " -l, --lock-fd=NUM [default=-1]\n"
|
||||
|
@ -78,7 +78,7 @@ void PrintUsage() {
|
|||
<< " maximum performance.\n"
|
||||
<< "\n"
|
||||
<< " -v, --log-level=STR [default=INFO]\n"
|
||||
<< " Don't write entires to log whose log level is below this. Log levels in\n"
|
||||
<< " Don't write entries to log whose log level is below this. Log levels in\n"
|
||||
<< " increasing order: DEBUG, INFO, WARN, ERROR, FATAL.\n"
|
||||
<< "\n"
|
||||
<< " -r, --repo-ttl-seconds=NUM [default=3600]\n"
|
||||
|
@ -141,7 +141,7 @@ void PrintUsage() {
|
|||
<< "\n"
|
||||
<< " 1. Request ID. Any string. Can be empty.\n"
|
||||
<< " 2. Path to the directory for which git stats are being requested.\n"
|
||||
<< " If the first character is ':', it is removed and the remaning path\n"
|
||||
<< " If the first character is ':', it is removed and the remaining path\n"
|
||||
<< " is treated as GIT_DIR.\n"
|
||||
<< " 3. (Optional) '1' to disable computation of anything that requires reading\n"
|
||||
<< " git index; '0' for the default behavior of computing everything.\n"
|
||||
|
|
|
@ -62,7 +62,7 @@ struct Options : Limits {
|
|||
// If non-negative, send signal 0 to the specified PID when not receiving any requests for one
|
||||
// second; exit if signal sending fails.
|
||||
int parent_pid = -1;
|
||||
// Don't write entires to log whose log level is below this. Log levels in increasing order:
|
||||
// Don't write entries to log whose log level is below this. Log levels in increasing order:
|
||||
// DEBUG, INFO, WARN, ERROR, FATAL.
|
||||
LogLevel log_level = INFO;
|
||||
// Close git repositories that haven't been used for this long. This is meant to release resources
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -268,7 +268,7 @@ void TagDb::ParsePack() {
|
|||
}
|
||||
|
||||
if (!std::is_sorted(name2id_.begin(), name2id_.end(), ByName)) {
|
||||
// "sorted" in the header of packed-refs promisses that this won't trigger.
|
||||
// "sorted" in the header of packed-refs promises that this won't trigger.
|
||||
std::sort(name2id_.begin(), name2id_.end(), ByName);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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 #
|
||||
|
@ -71,6 +72,11 @@ function _p9k_init_icons() {
|
|||
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_ALMALINUX_ICON '\uE271'$s #
|
||||
LINUX_GUIX_ICON '\uE271'$s #
|
||||
LINUX_NEON_ICON '\uE271'$s #
|
||||
SUNOS_ICON '\U1F31E'$q # 🌞
|
||||
HOME_ICON '\uE12C'$s #
|
||||
HOME_SUB_ICON '\uE18D'$s #
|
||||
|
@ -101,10 +107,23 @@ function _p9k_init_icons() {
|
|||
VCS_GIT_GITHUB_ICON '\uE20E ' #
|
||||
VCS_GIT_BITBUCKET_ICON '\uE20E ' #
|
||||
VCS_GIT_GITLAB_ICON '\uE20E ' #
|
||||
VCS_GIT_AZURE_ICON '\uE20E ' #
|
||||
VCS_GIT_ARCHLINUX_ICON '\uE20E ' #
|
||||
VCS_GIT_CODEBERG_ICON '\uE20E ' #
|
||||
VCS_GIT_DEBIAN_ICON '\uE20E ' #
|
||||
VCS_GIT_FREEBSD_ICON '\uE20E ' #
|
||||
VCS_GIT_FREEDESKTOP_ICON '\uE20E ' #
|
||||
VCS_GIT_GNOME_ICON '\uE20E ' #
|
||||
VCS_GIT_GNU_ICON '\uE20E ' #
|
||||
VCS_GIT_KDE_ICON '\uE20E ' #
|
||||
VCS_GIT_LINUX_ICON '\uE20E ' #
|
||||
VCS_GIT_GITEA_ICON '\uE20E ' #
|
||||
VCS_GIT_SOURCEHUT_ICON '\uE20E ' #
|
||||
VCS_HG_ICON '\uE1C3 ' #
|
||||
VCS_SVN_ICON 'svn'$q
|
||||
RUST_ICON 'R'
|
||||
PYTHON_ICON '\uE63C'$s # (doesn't always work)
|
||||
CHEZMOI_ICON '\uE12C'$s #
|
||||
SWIFT_ICON 'Swift'
|
||||
GO_ICON 'Go'
|
||||
GOLANG_ICON 'Go'
|
||||
|
@ -121,6 +140,7 @@ function _p9k_init_icons() {
|
|||
JAVA_ICON '\U2615' # ☕︎
|
||||
LARAVEL_ICON ''
|
||||
RANGER_ICON '\u2B50' # ⭐
|
||||
YAZI_ICON '\u2B50' # ⭐
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON 'vim'
|
||||
TERRAFORM_ICON 'tf'
|
||||
|
@ -150,6 +170,7 @@ function _p9k_init_icons() {
|
|||
SCALA_ICON 'scala'
|
||||
TOOLBOX_ICON '\u2B22' # ⬢
|
||||
ARCH_ICON 'arch'
|
||||
HISTORY_ICON 'hist'
|
||||
)
|
||||
;;
|
||||
'awesome-fontconfig')
|
||||
|
@ -190,6 +211,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 #
|
||||
|
@ -209,6 +231,11 @@ function _p9k_init_icons() {
|
|||
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_ALMALINUX_ICON '\uF17C'$s #
|
||||
LINUX_GUIX_ICON '\uF17C'$s #
|
||||
LINUX_NEON_ICON '\uF17C'$s #
|
||||
SUNOS_ICON '\uF185 ' #
|
||||
HOME_ICON '\uF015'$s #
|
||||
HOME_SUB_ICON '\uF07C'$s #
|
||||
|
@ -235,10 +262,23 @@ function _p9k_init_icons() {
|
|||
VCS_GIT_GITHUB_ICON '\uF113 ' #
|
||||
VCS_GIT_BITBUCKET_ICON '\uF171 ' #
|
||||
VCS_GIT_GITLAB_ICON '\uF296 ' #
|
||||
VCS_GIT_AZURE_ICON '\u2601 ' # ☁
|
||||
VCS_GIT_ARCHLINUX_ICON '\uF1D3 ' #
|
||||
VCS_GIT_CODEBERG_ICON '\uF1D3 ' #
|
||||
VCS_GIT_DEBIAN_ICON '\uF1D3 ' #
|
||||
VCS_GIT_FREEBSD_ICON '\uF1D3 ' #
|
||||
VCS_GIT_FREEDESKTOP_ICON '\uF1D3 ' #
|
||||
VCS_GIT_GNOME_ICON '\uF1D3 ' #
|
||||
VCS_GIT_GNU_ICON '\uF1D3 ' #
|
||||
VCS_GIT_KDE_ICON '\uF1D3 ' #
|
||||
VCS_GIT_LINUX_ICON '\uF1D3 ' #
|
||||
VCS_GIT_GITEA_ICON '\uF1D3 ' #
|
||||
VCS_GIT_SOURCEHUT_ICON '\uF1D3 ' #
|
||||
VCS_HG_ICON '\uF0C3 ' #
|
||||
VCS_SVN_ICON 'svn'$q
|
||||
RUST_ICON '\uE6A8' #
|
||||
PYTHON_ICON '\uE63C'$s #
|
||||
CHEZMOI_ICON '\uF015'$s #
|
||||
SWIFT_ICON 'Swift'
|
||||
GO_ICON 'Go'
|
||||
GOLANG_ICON 'Go'
|
||||
|
@ -255,6 +295,7 @@ function _p9k_init_icons() {
|
|||
JAVA_ICON '\U2615' # ☕︎
|
||||
LARAVEL_ICON ''
|
||||
RANGER_ICON '\u2B50' # ⭐
|
||||
YAZI_ICON '\u2B50' # ⭐
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON 'vim'
|
||||
TERRAFORM_ICON 'tf'
|
||||
|
@ -284,6 +325,7 @@ function _p9k_init_icons() {
|
|||
SCALA_ICON 'scala'
|
||||
TOOLBOX_ICON '\u2B22' # ⬢
|
||||
ARCH_ICON 'arch'
|
||||
HISTORY_ICON 'hist'
|
||||
)
|
||||
;;
|
||||
'awesome-mapped-fontconfig')
|
||||
|
@ -329,6 +371,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}"
|
||||
|
@ -348,6 +391,11 @@ function _p9k_init_icons() {
|
|||
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_ALMALINUX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
|
||||
LINUX_GUIX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
|
||||
LINUX_NEON_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
|
||||
SUNOS_ICON "${CODEPOINT_OF_AWESOME_SUN_O:+\\u$CODEPOINT_OF_AWESOME_SUN_O }"
|
||||
HOME_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME$s}"
|
||||
HOME_SUB_ICON "${CODEPOINT_OF_AWESOME_FOLDER_OPEN:+\\u$CODEPOINT_OF_AWESOME_FOLDER_OPEN$s}"
|
||||
|
@ -374,10 +422,23 @@ function _p9k_init_icons() {
|
|||
VCS_GIT_GITHUB_ICON "${CODEPOINT_OF_AWESOME_GITHUB_ALT:+\\u$CODEPOINT_OF_AWESOME_GITHUB_ALT }"
|
||||
VCS_GIT_BITBUCKET_ICON "${CODEPOINT_OF_AWESOME_BITBUCKET:+\\u$CODEPOINT_OF_AWESOME_BITBUCKET }"
|
||||
VCS_GIT_GITLAB_ICON "${CODEPOINT_OF_AWESOME_GITLAB:+\\u$CODEPOINT_OF_AWESOME_GITLAB }"
|
||||
VCS_GIT_AZURE_ICON '\u2601 ' # ☁
|
||||
VCS_GIT_ARCHLINUX_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_CODEBERG_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_DEBIAN_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_FREEBSD_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_FREEDESKTOP_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_GNOME_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_GNU_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_KDE_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_LINUX_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_GITEA_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_GIT_SOURCEHUT_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
|
||||
VCS_HG_ICON "${CODEPOINT_OF_AWESOME_FLASK:+\\u$CODEPOINT_OF_AWESOME_FLASK }"
|
||||
VCS_SVN_ICON 'svn'$q
|
||||
RUST_ICON '\uE6A8' #
|
||||
PYTHON_ICON '\U1F40D' # 🐍
|
||||
CHEZMOI_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME$s}"
|
||||
SWIFT_ICON '\uE655'$s #
|
||||
PUBLIC_IP_ICON "${CODEPOINT_OF_AWESOME_GLOBE:+\\u$CODEPOINT_OF_AWESOME_GLOBE$s}"
|
||||
LOCK_ICON "${CODEPOINT_OF_AWESOME_LOCK:+\\u$CODEPOINT_OF_AWESOME_LOCK}"
|
||||
|
@ -392,6 +453,7 @@ function _p9k_init_icons() {
|
|||
JAVA_ICON '\U2615' # ☕︎
|
||||
LARAVEL_ICON ''
|
||||
RANGER_ICON '\u2B50' # ⭐
|
||||
YAZI_ICON '\u2B50' # ⭐
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON 'vim'
|
||||
TERRAFORM_ICON 'tf'
|
||||
|
@ -421,6 +483,168 @@ function _p9k_init_icons() {
|
|||
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_ALMALINUX_ICON '\UF31D'$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')
|
||||
|
@ -478,8 +702,14 @@ 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_ALMALINUX_ICON '\uF17C' #
|
||||
LINUX_GUIX_ICON '\uF325'$s #
|
||||
LINUX_NEON_ICON '\uF17C' #
|
||||
LINUX_ICON '\uF17C' #
|
||||
SUNOS_ICON '\uF185 ' #
|
||||
HOME_ICON '\uF015'$s #
|
||||
|
@ -507,10 +737,23 @@ function _p9k_init_icons() {
|
|||
VCS_GIT_GITHUB_ICON '\uF113 ' #
|
||||
VCS_GIT_BITBUCKET_ICON '\uE703 ' #
|
||||
VCS_GIT_GITLAB_ICON '\uF296 ' #
|
||||
VCS_GIT_AZURE_ICON '\uFD03 ' # ﴃ
|
||||
VCS_GIT_ARCHLINUX_ICON '\uF303 ' #
|
||||
VCS_GIT_CODEBERG_ICON '\uF1D3 ' #
|
||||
VCS_GIT_DEBIAN_ICON '\uF306 ' #
|
||||
VCS_GIT_FREEBSD_ICON '\UF30C ' #
|
||||
VCS_GIT_FREEDESKTOP_ICON '\uF296 ' #
|
||||
VCS_GIT_GNOME_ICON '\uF296 ' #
|
||||
VCS_GIT_GNU_ICON '\uE779 ' #
|
||||
VCS_GIT_KDE_ICON '\uF296 ' #
|
||||
VCS_GIT_LINUX_ICON '\uF17C ' #
|
||||
VCS_GIT_GITEA_ICON '\uF1D3 ' #
|
||||
VCS_GIT_SOURCEHUT_ICON '\uF1DB ' #
|
||||
VCS_HG_ICON '\uF0C3 ' #
|
||||
VCS_SVN_ICON '\uE72D'$q #
|
||||
RUST_ICON '\uE7A8'$q #
|
||||
PYTHON_ICON '\UE73C ' #
|
||||
CHEZMOI_ICON '\uF015'$s #
|
||||
SWIFT_ICON '\uE755' #
|
||||
GO_ICON '\uE626' #
|
||||
GOLANG_ICON '\uE626' #
|
||||
|
@ -527,6 +770,7 @@ function _p9k_init_icons() {
|
|||
JAVA_ICON '\uE738' #
|
||||
LARAVEL_ICON '\ue73f'$q #
|
||||
RANGER_ICON '\uF00b ' #
|
||||
YAZI_ICON '\uF00b ' #
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON '\uE62B' #
|
||||
TERRAFORM_ICON '\uF1BB ' #
|
||||
|
@ -556,6 +800,7 @@ function _p9k_init_icons() {
|
|||
SCALA_ICON '\uE737' #
|
||||
TOOLBOX_ICON '\uE20F'$s #
|
||||
ARCH_ICON '\uE266' #
|
||||
HISTORY_ICON '\uF1DA'$s #
|
||||
)
|
||||
;;
|
||||
ascii)
|
||||
|
@ -594,6 +839,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'
|
||||
|
@ -613,6 +859,11 @@ function _p9k_init_icons() {
|
|||
LINUX_ARTIX_ICON 'artix'
|
||||
LINUX_RHEL_ICON 'rhel'
|
||||
LINUX_AMZN_ICON 'amzn'
|
||||
LINUX_ENDEAVOUROS_ICON 'edvos'
|
||||
LINUX_ROCKY_ICON 'rocky'
|
||||
LINUX_ALMALINUX_ICON 'alma'
|
||||
LINUX_GUIX_ICON 'guix'
|
||||
LINUX_NEON_ICON 'neon'
|
||||
SUNOS_ICON 'sunos'
|
||||
HOME_ICON ''
|
||||
HOME_SUB_ICON ''
|
||||
|
@ -639,10 +890,23 @@ function _p9k_init_icons() {
|
|||
VCS_GIT_GITHUB_ICON ''
|
||||
VCS_GIT_BITBUCKET_ICON ''
|
||||
VCS_GIT_GITLAB_ICON ''
|
||||
VCS_GIT_AZURE_ICON ''
|
||||
VCS_GIT_ARCHLINUX_ICON ''
|
||||
VCS_GIT_CODEBERG_ICON ''
|
||||
VCS_GIT_DEBIAN_ICON ''
|
||||
VCS_GIT_FREEBSD_ICON ''
|
||||
VCS_GIT_FREEDESKTOP_ICON ''
|
||||
VCS_GIT_GNOME_ICON ''
|
||||
VCS_GIT_GNU_ICON ''
|
||||
VCS_GIT_KDE_ICON ''
|
||||
VCS_GIT_LINUX_ICON ''
|
||||
VCS_GIT_GITEA_ICON ''
|
||||
VCS_GIT_SOURCEHUT_ICON ''
|
||||
VCS_HG_ICON ''
|
||||
VCS_SVN_ICON ''
|
||||
RUST_ICON 'rust'
|
||||
PYTHON_ICON 'py'
|
||||
CHEZMOI_ICON 'chezmoi'
|
||||
SWIFT_ICON 'swift'
|
||||
GO_ICON 'go'
|
||||
GOLANG_ICON 'go'
|
||||
|
@ -659,6 +923,7 @@ function _p9k_init_icons() {
|
|||
JAVA_ICON 'java'
|
||||
LARAVEL_ICON ''
|
||||
RANGER_ICON 'ranger'
|
||||
YAZI_ICON 'yazi'
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON 'vim'
|
||||
TERRAFORM_ICON 'tf'
|
||||
|
@ -688,6 +953,7 @@ function _p9k_init_icons() {
|
|||
SCALA_ICON 'scala'
|
||||
TOOLBOX_ICON 'toolbox'
|
||||
ARCH_ICON 'arch'
|
||||
HISTORY_ICON 'hist'
|
||||
)
|
||||
;;
|
||||
*)
|
||||
|
@ -728,6 +994,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'
|
||||
|
@ -747,6 +1014,11 @@ function _p9k_init_icons() {
|
|||
LINUX_ARTIX_ICON 'Art'
|
||||
LINUX_RHEL_ICON 'RH'
|
||||
LINUX_AMZN_ICON 'Amzn'
|
||||
LINUX_ENDEAVOUROS_ICON 'Edv'
|
||||
LINUX_ROCKY_ICON 'Roc'
|
||||
LINUX_ALMALINUX_ICON 'Alma'
|
||||
LINUX_GUIX_ICON 'Guix'
|
||||
LINUX_NEON_ICON 'Neon'
|
||||
SUNOS_ICON 'Sun'
|
||||
HOME_ICON ''
|
||||
HOME_SUB_ICON ''
|
||||
|
@ -773,10 +1045,23 @@ function _p9k_init_icons() {
|
|||
VCS_GIT_GITHUB_ICON ''
|
||||
VCS_GIT_BITBUCKET_ICON ''
|
||||
VCS_GIT_GITLAB_ICON ''
|
||||
VCS_GIT_AZURE_ICON ''
|
||||
VCS_GIT_ARCHLINUX_ICON ''
|
||||
VCS_GIT_CODEBERG_ICON ''
|
||||
VCS_GIT_DEBIAN_ICON ''
|
||||
VCS_GIT_FREEBSD_ICON ''
|
||||
VCS_GIT_FREEDESKTOP_ICON ''
|
||||
VCS_GIT_GNOME_ICON ''
|
||||
VCS_GIT_GNU_ICON ''
|
||||
VCS_GIT_KDE_ICON ''
|
||||
VCS_GIT_LINUX_ICON ''
|
||||
VCS_GIT_GITEA_ICON ''
|
||||
VCS_GIT_SOURCEHUT_ICON ''
|
||||
VCS_HG_ICON ''
|
||||
VCS_SVN_ICON ''
|
||||
RUST_ICON 'R'
|
||||
PYTHON_ICON 'Py'
|
||||
CHEZMOI_ICON 'Chez'
|
||||
SWIFT_ICON 'Swift'
|
||||
GO_ICON 'Go'
|
||||
GOLANG_ICON 'Go'
|
||||
|
@ -793,6 +1078,7 @@ function _p9k_init_icons() {
|
|||
JAVA_ICON '\U2615' # ☕︎
|
||||
LARAVEL_ICON ''
|
||||
RANGER_ICON '\u2B50' # ⭐
|
||||
YAZI_ICON '\u2B50' # ⭐
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON 'vim'
|
||||
TERRAFORM_ICON 'tf'
|
||||
|
@ -822,6 +1108,7 @@ function _p9k_init_icons() {
|
|||
SCALA_ICON 'scala'
|
||||
TOOLBOX_ICON '\u2B22' # ⬢
|
||||
ARCH_ICON 'arch'
|
||||
HISTORY_ICON 'hist'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -102,7 +102,7 @@ typeset -grA __p9k_pb_term_skip=(
|
|||
|
||||
# Usage: _p9k_parse_buffer <buffer> [token-limit]
|
||||
#
|
||||
# Parses the specified command line buffer and pupulates array P9K_COMMANDS
|
||||
# Parses the specified command line buffer and populates array P9K_COMMANDS
|
||||
# with commands from it. Terminates early and returns 1 if there are more
|
||||
# tokens than the specified limit.
|
||||
#
|
||||
|
|
|
@ -744,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 <---"
|
||||
|
@ -758,6 +758,35 @@ function ask_arrow() {
|
|||
add_widget 2
|
||||
add_widget 0 print -P "(r) Restart from the beginning."
|
||||
ask ynr
|
||||
case $choice in
|
||||
r) return 1;;
|
||||
y) cap_quotes=1;;
|
||||
n) cap_quotes=0;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
||||
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 -- "---> $1 <---"
|
||||
add_widget 0 print -P ""
|
||||
add_widget 3
|
||||
add_widget 0 print -P "%B(y) Yes.%b"
|
||||
add_widget 0 print -P ""
|
||||
add_widget 1
|
||||
add_widget 0 print -P "%B(n) No.%b"
|
||||
add_widget 0 print -P ""
|
||||
add_widget 2
|
||||
add_widget 0 print -P "(r) Restart from the beginning."
|
||||
ask ynr
|
||||
case $choice in
|
||||
r) return 1;;
|
||||
y) cap_arrow=1;;
|
||||
|
@ -766,25 +795,35 @@ function ask_arrow() {
|
|||
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 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 flowing -c -- "---> \uF306 <---"
|
||||
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(y) Yes.%b"
|
||||
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(n) No.%b"
|
||||
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 ynr
|
||||
ask 123r
|
||||
case $choice in
|
||||
r) return 1;;
|
||||
y) cap_debian=1;;
|
||||
n) cap_debian=0;;
|
||||
1) cap_arrow=1;;
|
||||
2|3) cap_arrow=0;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
@ -910,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
|
||||
|
@ -1036,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
|
||||
}
|
||||
|
@ -1087,18 +1126,26 @@ function os_icon_name() {
|
|||
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;;
|
||||
|
@ -1115,6 +1162,11 @@ function os_icon_name() {
|
|||
*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;;
|
||||
almalinux) echo LINUX_ALMALINUX_ICON;;
|
||||
guix) echo LINUX_GUIX_ICON;;
|
||||
neon) echo LINUX_NEON_ICON;;
|
||||
*) echo LINUX_ICON;;
|
||||
esac
|
||||
;;
|
||||
|
@ -1188,7 +1240,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
|
||||
|
@ -1238,42 +1290,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
|
||||
|
@ -1281,11 +1325,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'
|
||||
|
@ -1320,7 +1369,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
|
||||
|
@ -1458,7 +1507,7 @@ 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)"
|
||||
|
@ -1699,6 +1748,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'
|
||||
|
@ -1720,9 +1771,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
|
||||
|
@ -1902,7 +1958,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
|
||||
}
|
||||
|
@ -1978,7 +2034,7 @@ function check_zshrc_integration() {
|
|||
local h9='"$ZDOTDIR"/.p10k.zsh'
|
||||
local h10='$POWERLEVEL9K_CONFIG_FILE'
|
||||
local h11='"$POWERLEVEL9K_CONFIG_FILE"'
|
||||
if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##($f1|$f2|$f3|$f4|$g1|$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|$h8|$h9|$h10|$h11)(|[[:space:]]*|'#'*)} ]]; then
|
||||
if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##(|--[[:space:]]##)($f1|$f2|$f3|$f4|$g1|$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|$h8|$h9|$h10|$h11)(|[[:space:]]*|'#'*)} ]]; then
|
||||
zshrc_has_cfg=1
|
||||
fi
|
||||
local pre='${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh'
|
||||
|
@ -2046,7 +2102,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)
|
||||
|
@ -2060,7 +2116,7 @@ while true; do
|
|||
|
||||
unset pure_use_rprompt
|
||||
|
||||
if [[ $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
|
||||
if [[ -o multibyte && $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
|
||||
ask_font || continue
|
||||
ask_diamond || continue
|
||||
if [[ $AWESOME_GLYPHS_LOADED == 1 ]]; then
|
||||
|
@ -2080,19 +2136,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
|
||||
|
|
Loading…
Reference in New Issue