Compare commits
6 Commits
9cdeb12252
...
951602d051
| Author | SHA1 | Date |
|---|---|---|
|
|
951602d051 | |
|
|
b97926675a | |
|
|
3d2c72244d | |
|
|
447d0b2e68 | |
|
|
d8fbc75bab | |
|
|
8de553fbc9 |
37
README.md
37
README.md
|
|
@ -431,6 +431,7 @@ Powerlevel10k.
|
||||||
- [Arch Linux](#arch-linux)
|
- [Arch Linux](#arch-linux)
|
||||||
- [Alpine Linux](#alpine-linux)
|
- [Alpine Linux](#alpine-linux)
|
||||||
- [Fig](#fig)
|
- [Fig](#fig)
|
||||||
|
- [NixOS](#nixos)
|
||||||
|
|
||||||
### Manual
|
### Manual
|
||||||
|
|
||||||
|
|
@ -549,6 +550,42 @@ ln -s /usr/share/zsh/plugins/powerlevel10k ~/.local/share/zsh/plugins/
|
||||||
Follow the instructions on
|
Follow the instructions on
|
||||||
[this page](https://fig.io/plugins/other/powerlevel10k).
|
[this page](https://fig.io/plugins/other/powerlevel10k).
|
||||||
|
|
||||||
|
### NixOS
|
||||||
|
|
||||||
|
**Home Manager**
|
||||||
|
|
||||||
|
```nix
|
||||||
|
programs.zsh = {
|
||||||
|
...
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "zsh-powerlevel10k";
|
||||||
|
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
|
||||||
|
file = "powerlevel10k.zsh-theme";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# NixOS 24.11 or earlier:
|
||||||
|
initExtra = ''
|
||||||
|
source ~/.p10k.zsh
|
||||||
|
'';
|
||||||
|
|
||||||
|
# NixOS 25.05 or later:
|
||||||
|
# initContent = let initExtra = lib.mkOrder 1000 '' [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh ''; in lib.mkMerge [initExtra];
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
**System wide**
|
||||||
|
```nix
|
||||||
|
programs.zsh = {
|
||||||
|
...
|
||||||
|
promptInit = ''
|
||||||
|
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||||
|
source ~/.p10k.zsh
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
- [For new users](#for-new-users)
|
- [For new users](#for-new-users)
|
||||||
|
|
|
||||||
|
|
@ -3527,7 +3527,9 @@ _p9k_prompt_time_compute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_p9k_prompt_time_async() {
|
_p9k_prompt_time_async() {
|
||||||
sleep 1 || true
|
zmodload zsh/mathfunc zsh/zselect || return
|
||||||
|
local -F t=_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC
|
||||||
|
zselect -t $((int(ceil(100 * (t - EPOCHREALTIME % t))))) || true
|
||||||
}
|
}
|
||||||
|
|
||||||
_p9k_prompt_time_sync() {
|
_p9k_prompt_time_sync() {
|
||||||
|
|
@ -7809,8 +7811,13 @@ _p9k_init_params() {
|
||||||
# commands will contain the start times of their commands as opposed to the default
|
# commands will contain the start times of their commands as opposed to the default
|
||||||
# behavior where they contain the end times of their preceding commands.
|
# behavior where they contain the end times of their preceding commands.
|
||||||
_p9k_declare -b POWERLEVEL9K_TIME_UPDATE_ON_COMMAND 0
|
_p9k_declare -b POWERLEVEL9K_TIME_UPDATE_ON_COMMAND 0
|
||||||
# If set to true, time will update every second.
|
# If set to true, time will update every
|
||||||
|
# POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC seconds.
|
||||||
_p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0
|
_p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0
|
||||||
|
_p9k_declare -F POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC 1
|
||||||
|
if (( _POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC <= 0 )); then
|
||||||
|
_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC=1
|
||||||
|
fi
|
||||||
|
|
||||||
_p9k_declare -b POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH 0
|
_p9k_declare -b POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH 0
|
||||||
typeset -g _p9k_nix_shell_cond='${IN_NIX_SHELL:#0}'
|
typeset -g _p9k_nix_shell_cond='${IN_NIX_SHELL:#0}'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue