diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-01-03 22:37:27 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-01-03 22:37:27 +0100 |
commit | 5f21ebc0d3539276ccee967dd510e7aba8b31c0c (patch) | |
tree | bd29c23d4031f1161e704d1d7fc5aa901c38be12 /user-profiles/zsh/p10k.zsh | |
parent | d48742861083f37c670447ca98fb43490531be80 (diff) | |
download | nixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.tar nixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.tar.gz nixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.tar.bz2 nixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.tar.xz nixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.zip |
zsh customization
Diffstat (limited to 'user-profiles/zsh/p10k.zsh')
-rw-r--r-- | user-profiles/zsh/p10k.zsh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/user-profiles/zsh/p10k.zsh b/user-profiles/zsh/p10k.zsh index fb9af12c..ff66f0df 100644 --- a/user-profiles/zsh/p10k.zsh +++ b/user-profiles/zsh/p10k.zsh | |||
@@ -37,6 +37,7 @@ | |||
37 | vcs # git status | 37 | vcs # git status |
38 | # =========================[ Line #2 ]========================= | 38 | # =========================[ Line #2 ]========================= |
39 | newline # \n | 39 | newline # \n |
40 | dir | ||
40 | prompt_char # prompt symbol | 41 | prompt_char # prompt symbol |
41 | ) | 42 | ) |
42 | 43 | ||
@@ -100,6 +101,9 @@ | |||
100 | time # current time | 101 | time # current time |
101 | # =========================[ Line #2 ]========================= | 102 | # =========================[ Line #2 ]========================= |
102 | newline | 103 | newline |
104 | status | ||
105 | command_execution_time | ||
106 | time | ||
103 | # ip # ip address and bandwidth usage for a specified network interface | 107 | # ip # ip address and bandwidth usage for a specified network interface |
104 | # public_ip # public IP address | 108 | # public_ip # public IP address |
105 | # proxy # system-wide http/https/ftp proxy | 109 | # proxy # system-wide http/https/ftp proxy |
@@ -500,7 +504,7 @@ | |||
500 | 504 | ||
501 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as | 505 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as |
502 | # it will signify error by turning red. | 506 | # it will signify error by turning red. |
503 | typeset -g POWERLEVEL9K_STATUS_ERROR=false | 507 | typeset -g POWERLEVEL9K_STATUS_ERROR=true |
504 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 | 508 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 |
505 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' | 509 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' |
506 | 510 | ||
@@ -1540,7 +1544,10 @@ | |||
1540 | # - always: Trim down prompt when accepting a command line. | 1544 | # - always: Trim down prompt when accepting a command line. |
1541 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command | 1545 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command |
1542 | # typed after changing current working directory. | 1546 | # typed after changing current working directory. |
1543 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always | 1547 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off |
1548 | |||
1549 | function p10k-on-pre-prompt() { p10k display '1'=show '2/left/dir'=hide '2/right/(status|command_execution_time|time)'=hide } | ||
1550 | function p10k-on-post-prompt() { p10k display '2/left/(dir|prompt_char)'=show 'empty_line|1'=hide '2/right/(status|command_execution_time|time)'=show } | ||
1544 | 1551 | ||
1545 | # Instant prompt mode. | 1552 | # Instant prompt mode. |
1546 | # | 1553 | # |