From b474978b2e9435c10ca66f8281352ebc825264f4 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 3 Apr 2023 14:23:14 +0200 Subject: [PATCH 001/140] wizard: prefer POWERLEVEL9K_MODE=nerdfont-complete over nerdfont-v3 Apparently Windows Terminal has a bug. To reproduce: print -P '\UF0737%K{red} %k' The expected output: x_ Here 'x' signifies any glyph of width 1, and '_' signifies a red block. The actual output: x _ Notice the space. The output of the following two commands is as expected: print -P '\UFC35%K{red} %k' print -P '\UFC35x' --- internal/wizard.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index ecc9a476..c2079e52 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -2094,13 +2094,13 @@ while true; do elif (( ! cap_diamond )); then POWERLEVEL9K_MODE=awesome-fontconfig else - ask_arrow '\UF0737' || continue + ask_arrow '\uFC35' || continue if (( cap_arrow )); then - POWERLEVEL9K_MODE=nerdfont-v3 + POWERLEVEL9K_MODE=nerdfont-complete else - ask_arrow '\uFC35' "Let's try another one." || continue + ask_arrow '\UF0737' "Let's try another one." || continue if (( cap_arrow )); then - POWERLEVEL9K_MODE=nerdfont-complete + POWERLEVEL9K_MODE=nerdfont-v3 else POWERLEVEL9K_MODE=awesome-fontconfig ask_python || continue From 1cff22491b730c6a7bed7a306376f975ee16f81f Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 5 Apr 2023 18:14:52 +0200 Subject: [PATCH 002/140] fix the kubernetes icon (#2217) --- internal/icons.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index 4a60756b..0a6c665d 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -524,7 +524,7 @@ function _p9k_init_icons() { EXECUTION_TIME_ICON '\uF252'$s #  SSH_ICON '\uF489'$s #  VPN_ICON '\UF023' #  - KUBERNETES_ICON '\F10FE' # 󱃾 + KUBERNETES_ICON '\UF10FE' # 󱃾 DROPBOX_ICON '\UF16B'$s #  DATE_ICON '\uF073 ' #  TIME_ICON '\uF017 ' #  From fb1287fedbb877201572d164ba0bad5c9d375b4f Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 7 Apr 2023 13:24:49 +0200 Subject: [PATCH 003/140] simplify _p9k_url_escape --- internal/p10k.zsh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index cd49b689..d638cfc1 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1747,16 +1747,9 @@ function _p9k_shorten_delim_len() { # Percents are duplicated because this function is currently used only # where the result is going to be percent-expanded. function _p9k_url_escape() { - if [[ $1 == [a-zA-Z0-9"/:_.-!'()~ "]# ]]; then - _p9k__ret=${1// /%%20} - else - local c - _p9k__ret= - for c in ${(s::)1}; do - [[ $c == [a-zA-Z0-9"/:_.-!'()~"] ]] || printf -v c '%%%%%02X' $(( #c )) - _p9k__ret+=$c - done - fi + emulate -L zsh -o no_multi_byte -o extended_glob + local MATCH MBEGIN MEND + _p9k__ret=${1//(#m)[^a-zA-Z0-9"\/:_.-!'()~"]/%%${(l:2::0:)$(([##16]#MATCH))}} } ################################################################ From bab655fb1f457de5ae5ad9f3c425a2e5186aa6b8 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 12 Apr 2023 11:07:32 +0200 Subject: [PATCH 004/140] do not infer nix_shell from PATH unless POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH is set to true (#2246) --- config/p10k-classic.zsh | 3 +++ config/p10k-lean-8colors.zsh | 3 +++ config/p10k-lean.zsh | 3 +++ config/p10k-rainbow.zsh | 3 +++ internal/p10k.zsh | 12 ++++++++---- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index aead8089..441be2ce 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -752,6 +752,9 @@ # 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= diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index c40b3efa..50e42617 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -750,6 +750,9 @@ # 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= diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 3009d464..b938ce69 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -746,6 +746,9 @@ # 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= diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 775b919e..e989b0a7 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -777,6 +777,9 @@ 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= diff --git a/internal/p10k.zsh b/internal/p10k.zsh index d638cfc1..64a58591 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4956,13 +4956,11 @@ function prompt_nix_shell() { } _p9k_prompt_nix_shell_init() { - typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${IN_NIX_SHELL:#0}${${path[(I)/nix/store/*]}:#0}' + typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"=$_p9k_nix_shell_cond } function instant_prompt_nix_shell() { - _p9k_prompt_segment prompt_nix_shell 4 $_p9k_color1 NIX_SHELL_ICON 1 \ - '${IN_NIX_SHELL:#0}${${path[(I)/nix/store/*]}:#0}' \ - '${(M)IN_NIX_SHELL:#(pure|impure)}' + _p9k_prompt_segment prompt_nix_shell 4 $_p9k_color1 NIX_SHELL_ICON 1 "$_p9k_nix_shell_cond" '${(M)IN_NIX_SHELL:#(pure|impure)}' } function prompt_terraform() { @@ -7651,6 +7649,12 @@ _p9k_init_params() { # If set to true, time will update every second. _p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0 + _p9k_declare -b POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH 0 + typeset -g _p9k_nix_shell_cond='${IN_NIX_SHELL:#0}' + if (( _POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH )); then + _p9k_nix_shell_cond+='${path[(r)/nix/store/*]}' + fi + local -i i=1 while (( i <= $#_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS )); do local segment=${${(U)_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[i]}//İ/I} From f27d192eb20cbf9cf690a372f342110b7347c8d6 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 12 Apr 2023 11:08:01 +0200 Subject: [PATCH 005/140] bump version --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 64a58591..4354a2e0 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8354,7 +8354,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v141\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=$'v144\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' From 954f38d589212753e1c767f56b3a3fed9cfacfe2 Mon Sep 17 00:00:00 2001 From: Lucas Larson Date: Fri, 14 Apr 2023 10:37:01 -0400 Subject: [PATCH 006/140] use less surprising input for clock option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for the three clock options (no clock, a 12-hour clock, or a 24-hour clock), use the first character of the option as the input to fix #2266. This pull request is a reissue of – and supersession of – #2267, which was pushed on a branch with non-ASCII characters in the name. Signed-off-by: Lucas Larson --- internal/wizard.zsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index c2079e52..a89b40f6 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1037,19 +1037,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 } From 045f006c50d782a6d3acbd8a07d1595322ff7e43 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 18 Apr 2023 09:50:43 +0200 Subject: [PATCH 007/140] correctly resolve node_version when using nodenv (#2268) --- internal/p10k.zsh | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 4354a2e0..ac4783e4 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -2424,14 +2424,41 @@ function _p9k_cached_cmd() { prompt_node_version() { _p9k_upglob package.json -. local -i idx=$? - if (( idx )); then - _p9k_cached_cmd 0 $_p9k__parent_dirs[idx]/package.json node --version || return - else - (( _POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY )) && return - _p9k_cached_cmd 0 '' node --version || return + (( idx || ! _POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY )) || return + + local node=$commands[node] + local -a file_deps env_deps + if [[ $node == ${NODENV_ROOT:-$HOME/.nodenv}/shims/node ]]; then + env_deps+=("$NODENV_VERSION") + file_deps+=(${NODENV_ROOT:-$HOME/.nodenv}/version) + if [[ $NODENV_DIR != (|.) ]]; then + [[ $NODENV_DIR == /* ]] && local dir=$NODENV_DIR || local dir="$_p9k__cwd_a/$NODENV_DIR" + dir=${dir:A} + if [[ $dir != $_p9k__cwd_a ]]; then + while true; do + if [[ -e $dir/.node-version ]]; then + file_deps+=($dir/.node-version) + break + fi + [[ $dir == (/|.) ]] && break + dir=${dir:h} + done + fi + fi + _p9k_upglob .node-version -. || file_deps+=($_p9k__parent_dirs[idx]/.node-version) + elif (( idx )); then + file_deps+=($_p9k__parent_dirs[idx]/package.json) fi - [[ $_p9k__ret == v?* ]] || return - _p9k_prompt_segment "$0" "green" "white" 'NODE_ICON' 0 '' "${_p9k__ret#v}" + + if ! _p9k_cache_stat_get "$0 $#env_deps ${(j: :)${(@q)env_deps}} ${(j: :)${(@q)file_deps}}" $file_deps $node; then + local out + out=$($node --version 2>/dev/null) + _p9k_cache_stat_set $(( ! $? )) "$out" + fi + (( $_p9k__cache_val[1] )) || return + local v=$_p9k__cache_val[2] + [[ $v == v?* ]] || return + _p9k_prompt_segment "$0" "green" "white" 'NODE_ICON' 0 '' "${${v#v}//\%/%%}" } _p9k_prompt_node_version_init() { @@ -8354,7 +8381,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v144\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=$'v145\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' From 94c4428ddc9aab97aeaf1c7fffe2f13cdcd1b8bb Mon Sep 17 00:00:00 2001 From: Martin Mosler Date: Sun, 23 Apr 2023 21:08:36 +0200 Subject: [PATCH 008/140] added icon for kali linux --- internal/icons.zsh | 7 +++++++ internal/p10k.zsh | 1 + 2 files changed, 8 insertions(+) diff --git a/internal/icons.zsh b/internal/icons.zsh index 0a6c665d..cb0c3995 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -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 #  @@ -191,6 +192,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 #  @@ -331,6 +333,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}" @@ -464,6 +467,7 @@ function _p9k_init_icons() { LINUX_CENTOS_ICON '\uF304'$s #  LINUX_COREOS_ICON '\uF305'$s #  LINUX_DEBIAN_ICON '\uF306' #  + LINUX_KALI_ICON '\uF327' #  LINUX_RASPBIAN_ICON '\uF315' #  LINUX_ELEMENTARY_ICON '\uF309'$s #  LINUX_FEDORA_ICON '\uF30a'$s #  @@ -600,6 +604,7 @@ function _p9k_init_icons() { LINUX_CENTOS_ICON '\uF304'$s #  LINUX_COREOS_ICON '\uF305'$s #  LINUX_DEBIAN_ICON '\uF306' #  + LINUX_KALI_ICON '\uF327' #  LINUX_RASPBIAN_ICON '\uF315' #  LINUX_ELEMENTARY_ICON '\uF309'$s #  LINUX_FEDORA_ICON '\uF30a'$s #  @@ -732,6 +737,7 @@ function _p9k_init_icons() { LINUX_ICON 'linux' LINUX_ARCH_ICON 'arch' LINUX_DEBIAN_ICON 'debian' + LINUX_KALI_ICON 'kali' LINUX_RASPBIAN_ICON 'pi' LINUX_UBUNTU_ICON 'ubuntu' LINUX_CENTOS_ICON 'centos' @@ -867,6 +873,7 @@ function _p9k_init_icons() { LINUX_ICON 'Lx' LINUX_ARCH_ICON 'Arc' LINUX_DEBIAN_ICON 'Deb' + LINUX_KALI_ICON 'Kal' LINUX_RASPBIAN_ICON 'RPi' LINUX_UBUNTU_ICON 'Ubu' LINUX_CENTOS_ICON 'Cen' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index ac4783e4..87c5017d 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8493,6 +8493,7 @@ function _p9k_init_cacheable() { *elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;; *fedora*) _p9k_set_os Linux LINUX_FEDORA_ICON;; *coreos*) _p9k_set_os Linux LINUX_COREOS_ICON;; + *kali*) _p9k_set_os Linux LINUX_KALI_ICON;; *gentoo*) _p9k_set_os Linux LINUX_GENTOO_ICON;; *mageia*) _p9k_set_os Linux LINUX_MAGEIA_ICON;; *centos*) _p9k_set_os Linux LINUX_CENTOS_ICON;; From bbea8d2d06382f6f0001c9212da91a319076f06e Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 24 Apr 2023 10:39:39 +0200 Subject: [PATCH 009/140] use U+F327 (Kali Linux logo) only with POWERLEVEL9K_MODE=nerdfont-v3 (#2281) --- internal/icons.zsh | 8 ++++---- internal/wizard.zsh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index cb0c3995..6b3a9b09 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -467,7 +467,6 @@ function _p9k_init_icons() { LINUX_CENTOS_ICON '\uF304'$s #  LINUX_COREOS_ICON '\uF305'$s #  LINUX_DEBIAN_ICON '\uF306' #  - LINUX_KALI_ICON '\uF327' #  LINUX_RASPBIAN_ICON '\uF315' #  LINUX_ELEMENTARY_ICON '\uF309'$s #  LINUX_FEDORA_ICON '\uF30a'$s #  @@ -485,6 +484,7 @@ function _p9k_init_icons() { LINUX_VOID_ICON '\UF32E'$s #  LINUX_ARTIX_ICON '\UF31F'$s #  LINUX_UBUNTU_ICON '\uF31b'$s #  + LINUX_KALI_ICON '\uF327'$s #  LINUX_RHEL_ICON '\uF316'$s #  LINUX_AMZN_ICON '\uF270'$s #  LINUX_ENDEAVOUROS_ICON '\UF322'$s #  @@ -604,7 +604,6 @@ function _p9k_init_icons() { LINUX_CENTOS_ICON '\uF304'$s #  LINUX_COREOS_ICON '\uF305'$s #  LINUX_DEBIAN_ICON '\uF306' #  - LINUX_KALI_ICON '\uF327' #  LINUX_RASPBIAN_ICON '\uF315' #  LINUX_ELEMENTARY_ICON '\uF309'$s #  LINUX_FEDORA_ICON '\uF30a'$s #  @@ -622,6 +621,7 @@ 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' #  @@ -737,9 +737,9 @@ function _p9k_init_icons() { LINUX_ICON 'linux' LINUX_ARCH_ICON 'arch' LINUX_DEBIAN_ICON 'debian' - LINUX_KALI_ICON 'kali' LINUX_RASPBIAN_ICON 'pi' LINUX_UBUNTU_ICON 'ubuntu' + LINUX_KALI_ICON 'kali' LINUX_CENTOS_ICON 'centos' LINUX_COREOS_ICON 'coreos' LINUX_ELEMENTARY_ICON 'elementary' @@ -873,9 +873,9 @@ function _p9k_init_icons() { LINUX_ICON 'Lx' LINUX_ARCH_ICON 'Arc' LINUX_DEBIAN_ICON 'Deb' - LINUX_KALI_ICON 'Kal' LINUX_RASPBIAN_ICON 'RPi' LINUX_UBUNTU_ICON 'Ubu' + LINUX_KALI_ICON 'Kal' LINUX_CENTOS_ICON 'Cen' LINUX_COREOS_ICON 'Cor' LINUX_ELEMENTARY_ICON 'Elm' diff --git a/internal/wizard.zsh b/internal/wizard.zsh index a89b40f6..c18474b2 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1100,6 +1100,7 @@ function os_icon_name() { *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;; From 630c1868df23bb3b62abf90d50e8801ca084b9d3 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 29 Apr 2023 08:51:49 +0200 Subject: [PATCH 010/140] add POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC --- internal/p10k.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 87c5017d..7e6affe6 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -7611,6 +7611,7 @@ _p9k_init_params() { _p9k_declare -i POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM -1 _p9k_declare -i POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM -1 _p9k_declare -b POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS 0 + _p9k_declare -F POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC 5 _p9k_declare -b POWERLEVEL9K_DISABLE_GITSTATUS 0 _p9k_declare -e POWERLEVEL9K_VI_INSERT_MODE_STRING "INSERT" _p9k_declare -e POWERLEVEL9K_VI_COMMAND_MODE_STRING "NORMAL" @@ -8381,7 +8382,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v145\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=$'v146\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' @@ -8661,7 +8662,7 @@ _p9k_init_vcs() { () { trap 'return 130' INT { - gitstatus_start_p9k_ POWERLEVEL9K + gitstatus_start_p9k_ -t $_POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC POWERLEVEL9K } always { trap ':' INT } @@ -8705,6 +8706,7 @@ _p9k_init_vcs() { -d $_POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM \ -c $_POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM \ -m $_POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \ + -t $_POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC \ ${${_POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS:#0}:+-e} \ POWERLEVEL9K } always { From dff735c26173183dc44864ae5d9aa4c1d74fe150 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 29 Apr 2023 08:52:46 +0200 Subject: [PATCH 011/140] increase the default value of POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC from 5 to 10 --- internal/p10k.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 7e6affe6..a8223299 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -7611,7 +7611,7 @@ _p9k_init_params() { _p9k_declare -i POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM -1 _p9k_declare -i POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM -1 _p9k_declare -b POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS 0 - _p9k_declare -F POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC 5 + _p9k_declare -F POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC 10 _p9k_declare -b POWERLEVEL9K_DISABLE_GITSTATUS 0 _p9k_declare -e POWERLEVEL9K_VI_INSERT_MODE_STRING "INSERT" _p9k_declare -e POWERLEVEL9K_VI_COMMAND_MODE_STRING "NORMAL" @@ -8382,7 +8382,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v146\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=$'v147\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' From ce0bee979bec1b63d2d2005d96253bbe87fe2a72 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 4 May 2023 10:40:52 +0200 Subject: [PATCH 012/140] wizard: check for unicode 9 support before asking about U+F0737 --- internal/wizard.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index c18474b2..c77f8151 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -767,6 +767,11 @@ function ask_quotes() { } 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)" From 0af598cbed78660066f8a8f4465844501ba5695b Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 4 May 2023 11:50:14 +0200 Subject: [PATCH 013/140] wizard: add a screen for detecting faulty terminals that render glyphs such as U+F0001 as wide (e.g., Windows Terminal) --- internal/wizard.zsh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index c77f8151..2265b07c 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -795,6 +795,39 @@ function ask_arrow() { return 0 } +function print_indented() { + local -i max_width=$1 + local text=$2 + local -i indent='(wizard_columns - max_width) / 2' + print -P "${(l:$indent:: :)}$text" +} + +function ask_width() { + add_widget 0 flowing -c %BWhat digit is the%b "%2Fdownwards arrow%f" %Bpointing "at?%b" + add_widget 0 print -P "" + add_widget 0 print_indented 11 '%3F\UF0734%f %3F\UF0734%f %3F\UF0734%f %2F\UF072E%f' + add_widget 0 print_indented 11 ' 111222' + add_widget 0 print -P "" + add_widget 3 + add_widget 0 print -P "%B(1) It is pointing at '1'.%b" + add_widget 0 print -P "" + add_widget 1 + add_widget 0 print -P "%B(2) It is pointing at '2'.%b" + add_widget 0 print -P "" + add_widget 1 + add_widget 0 print -P "%B(3) Something else.%b" + add_widget 0 print -P "" + add_widget 2 + add_widget 0 print -P "(r) Restart from the beginning." + ask 123r + case $choice in + r) return 1;; + 1) cap_arrow=1;; + 2|3) cap_arrow=0;; + esac + return 0 +} + function ask_icon_padding() { if [[ $POWERLEVEL9K_MODE == (powerline|compatible|ascii) ]]; then POWERLEVEL9K_ICON_PADDING=none @@ -2105,6 +2138,9 @@ while true; do POWERLEVEL9K_MODE=nerdfont-complete else ask_arrow '\UF0737' "Let's try another one." || continue + if (( cap_arrow )); then + ask_width || continue + fi if (( cap_arrow )); then POWERLEVEL9K_MODE=nerdfont-v3 else From 5d16c106ed2807fb368dcac4df0e2b3dd619bb8d Mon Sep 17 00:00:00 2001 From: Zaidhaan Hussain Date: Sat, 6 May 2023 15:52:08 +0800 Subject: [PATCH 014/140] nvm: implement POWERLEVEL9K_NVM_SHOW_SYSTEM and default to true --- config/p10k-classic.zsh | 2 ++ config/p10k-lean-8colors.zsh | 2 ++ config/p10k-lean.zsh | 2 ++ config/p10k-rainbow.zsh | 2 ++ internal/p10k.zsh | 4 ++++ 5 files changed, 12 insertions(+) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 441be2ce..231c8009 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1007,6 +1007,8 @@ ##############[ 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 equal to "system". + typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true # Custom icon. # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 50e42617..36dc7287 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -988,6 +988,8 @@ ##############[ 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 equal to "system". + typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true # Custom icon. # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index b938ce69..09403985 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -984,6 +984,8 @@ ##############[ 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 equal to "system". + typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true # Custom icon. # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index e989b0a7..c6fd0553 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1053,6 +1053,8 @@ # Nvm color. typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 + # 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='⭐' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index a8223299..cf32f9ba 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -2568,6 +2568,9 @@ prompt_nvm() { [[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return local current=$_p9k__ret ! _p9k_nvm_ls_default || [[ $_p9k__ret != $current ]] || return + if (( !_POWERLEVEL9K_NVM_SHOW_SYSTEM )); then + [[ $current == system ]] && return + fi _p9k_prompt_segment "$0" "magenta" "black" 'NODE_ICON' 0 '' "${${current#v}//\%/%%}" } @@ -7530,6 +7533,7 @@ _p9k_init_params() { _p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global _p9k_declare -b POWERLEVEL9K_NODENV_SHOW_SYSTEM 1 + _p9k_declare -b POWERLEVEL9K_NVM_SHOW_SYSTEM 1 _p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global _p9k_declare -b POWERLEVEL9K_RBENV_SHOW_SYSTEM 1 From 4ed8aae3246da5c8f16978266ba6af139a1d06ca Mon Sep 17 00:00:00 2001 From: Zaidhaan Hussain Date: Sun, 7 May 2023 17:10:08 +0800 Subject: [PATCH 015/140] nvm: implement POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW and default to false --- config/p10k-classic.zsh | 3 +++ config/p10k-lean-8colors.zsh | 3 +++ config/p10k-lean.zsh | 3 +++ config/p10k-rainbow.zsh | 3 +++ internal/p10k.zsh | 6 +++++- 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 231c8009..d29aa2f8 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1007,6 +1007,9 @@ ##############[ 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. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 36dc7287..9fbd5fa2 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -988,6 +988,9 @@ ##############[ 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. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 09403985..844c1bfe 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -984,6 +984,9 @@ ##############[ 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. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index c6fd0553..c21d879a 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1053,6 +1053,9 @@ # 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. diff --git a/internal/p10k.zsh b/internal/p10k.zsh index cf32f9ba..87af17e8 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -2567,7 +2567,10 @@ _p9k_nvm_ls_current() { prompt_nvm() { [[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return local current=$_p9k__ret - ! _p9k_nvm_ls_default || [[ $_p9k__ret != $current ]] || return + _p9k_nvm_ls_default + if (( !_POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW )); then + [[ $current == $_p9k__ret ]] && return + fi if (( !_POWERLEVEL9K_NVM_SHOW_SYSTEM )); then [[ $current == system ]] && return fi @@ -7533,6 +7536,7 @@ _p9k_init_params() { _p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global _p9k_declare -b POWERLEVEL9K_NODENV_SHOW_SYSTEM 1 + _p9k_declare -b POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW 0 _p9k_declare -b POWERLEVEL9K_NVM_SHOW_SYSTEM 1 _p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global From 016512f493c52d2b32d4ade4fbd4638617a8cf83 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 8 May 2023 09:04:43 +0200 Subject: [PATCH 016/140] nvm: change the default value of POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW to true and fix the way it is used (#2296) --- internal/p10k.zsh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 87af17e8..67561c45 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -2567,13 +2567,13 @@ _p9k_nvm_ls_current() { prompt_nvm() { [[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return local current=$_p9k__ret - _p9k_nvm_ls_default - if (( !_POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW )); then - [[ $current == $_p9k__ret ]] && return - fi - if (( !_POWERLEVEL9K_NVM_SHOW_SYSTEM )); then - [[ $current == system ]] && return - fi + (( _POWERLEVEL9K_NVM_SHOW_SYSTEM )) || + [[ $current != system ]] || + return + (( _POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW )) || + ! _p9k_nvm_ls_default || + [[ $_p9k__ret != $current ]] || + return _p9k_prompt_segment "$0" "magenta" "black" 'NODE_ICON' 0 '' "${${current#v}//\%/%%}" } @@ -7536,7 +7536,7 @@ _p9k_init_params() { _p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global _p9k_declare -b POWERLEVEL9K_NODENV_SHOW_SYSTEM 1 - _p9k_declare -b POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW 0 + _p9k_declare -b POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW 1 _p9k_declare -b POWERLEVEL9K_NVM_SHOW_SYSTEM 1 _p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global @@ -8390,7 +8390,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v147\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=$'v148\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' From 0a9eb73e161fd4d73140bd90c00c52602cf9aa42 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 8 May 2023 09:10:24 +0200 Subject: [PATCH 017/140] nvm: change the default value of POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW back to false (#2296) --- internal/p10k.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 67561c45..171c26f8 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -7536,7 +7536,7 @@ _p9k_init_params() { _p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global _p9k_declare -b POWERLEVEL9K_NODENV_SHOW_SYSTEM 1 - _p9k_declare -b POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW 1 + _p9k_declare -b POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW 0 _p9k_declare -b POWERLEVEL9K_NVM_SHOW_SYSTEM 1 _p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global @@ -8390,7 +8390,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v148\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=$'v149\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' From 064f4d22097a8086eb857f04d11c00eb4b452275 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 10 May 2023 09:25:01 +0200 Subject: [PATCH 018/140] whitelist DCS in startup console output (#2299) --- internal/p10k.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 171c26f8..31a6d621 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -6605,7 +6605,9 @@ function _p9k_clear_instant_prompt() { unset _z4h_saved_screen fi print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed] - local unexpected=${(S)${${content//$'\e[?'<->'c'}//$'\e['<->' q'}//$'\e'[^$'\a\e']#($'\a'|$'\e\\')} + local unexpected=${${content//$'\e[?'<->'c'}//$'\e['<->' q'} + unexpected=${(S)unexpected//$'\eP'*[^$'\e']#($'\e\\')} + unexpected=${(S)unexpected//$'\e'[^$'\a\e']#($'\a'|$'\e\\')} # Visual Studio Code prints this garbage. unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'} if [[ -n $unexpected ]]; then From 1dcd8825937e2a58519bef4fb7ef3f0322a91db8 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 10 May 2023 09:25:31 +0200 Subject: [PATCH 019/140] set P9K_STARTUP_CONSOLE_OUTPUT to assist in debugging startup console output problems --- internal/p10k.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 31a6d621..ae9ffacd 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -6610,6 +6610,7 @@ function _p9k_clear_instant_prompt() { unexpected=${(S)unexpected//$'\e'[^$'\a\e']#($'\a'|$'\e\\')} # Visual Studio Code prints this garbage. unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'} + typeset -g P9K_STARTUP_CONSOLE_OUTPUT=("$content" "$unexpected") if [[ -n $unexpected ]]; then local omz1='[Oh My Zsh] Would you like to update? [Y/n]: ' local omz2='Updating Oh My Zsh' From 9b47a22f13402ba95262b66ada569f122f5528a0 Mon Sep 17 00:00:00 2001 From: Arthur McLain Date: Thu, 11 May 2023 03:24:16 +0200 Subject: [PATCH 020/140] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6629e910..314f839d 100644 --- a/README.md +++ b/README.md @@ -839,7 +839,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` | @@ -893,7 +893,7 @@ 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'` | + | [Zap](#zap) | `zsh -ic 'zap clean'` | | [Homebrew](#homebrew) | `brew uninstall powerlevel10k; brew untap romkatv/powerlevel10k` | | [Arch Linux](#arch-linux) | `yay -R --noconfirm zsh-theme-powerlevel10k-git` | | [Alpine Linux](#alpine-linux) | `apk del zsh-theme-powerlevel10k` | From 7bb3f053186f597b1a93a0fb7daf02e8fa83376d Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 16 May 2023 10:16:05 +0200 Subject: [PATCH 021/140] annotate right prompt for warp (#2307) --- internal/p10k.zsh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index ae9ffacd..9e955413 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8266,9 +8266,17 @@ _p9k_init_prompt() { if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then _p9k_prompt_prefix_left+=$'%{\e]133;A\a%}' _p9k_prompt_suffix_left+=$'%{\e]133;B\a%}' + if [[ $TERM_PROGRAM == WarpTerminal ]]; then + _p9k_prompt_prefix_right=$'%{\e]133;P;k=r\a%}'$_p9k_prompt_prefix_right + _p9k_prompt_suffix_right+=$'%{\e]133;B\a%}' + fi if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then _p9k_prompt_prefix_left+=$'%{\ePtmux;\e\e]133;A\a\e\\%}' _p9k_prompt_suffix_left+=$'%{\ePtmux;\e\e]133;B\a\e\\%}' + if [[ $TERM_PROGRAM == WarpTerminal ]]; then + _p9k_prompt_prefix_right=$'%{\ePtmux;\e\e]133;P;k=r\a\e\\%}'$_p9k_prompt_prefix_right + _p9k_prompt_suffix_right+=$'%{\ePtmux;\e\e]133;B\a\e\\%}' + fi fi fi @@ -8393,8 +8401,8 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v149\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' - _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1' + _p9k__param_pat=$'v150\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1'${(q)TERM_PROGRAM}$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' _p9k__param_pat+=$'$GITSTATUS_CACHE_DIR\1$GITSTATUS_AUTO_INSTALL\1${ZLE_RPROMPT_INDENT:-1}\1' From f4a7e6d0e033b1428279313c6849ceec0a3f1757 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 16 May 2023 10:16:42 +0200 Subject: [PATCH 022/140] force shell integration when running under warp (#2307) --- internal/p10k.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 9e955413..4867f481 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8950,6 +8950,8 @@ _p9k_precmd_first() { if [[ -n $KITTY_SHELL_INTEGRATION && KITTY_SHELL_INTEGRATION[(wIe)no-prompt-mark] -eq 0 ]]; then KITTY_SHELL_INTEGRATION+=' no-prompt-mark' (( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1 + elif [[ $TERM_PROGRAM == WarpTerminal ]]; then + (( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1 fi typeset -ga precmd_functions=(${precmd_functions:#_p9k_precmd_first}) } From a69aa22fa8a4fe0927bb73716c2f7c9d2580a51d Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 16 May 2023 10:43:49 +0200 Subject: [PATCH 023/140] show the right cwd when some part of it gets renamed (#2304) --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index ae9ffacd..a3541bac 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1904,7 +1904,7 @@ prompt_dir() { else local key= fi - if ! _p9k_cache_ephemeral_get $0 $e $i $_p9k__cwd || [[ $key != $_p9k__cache_val[1] ]]; then + if ! _p9k_cache_ephemeral_get $0 $e $i $_p9k__cwd $p || [[ $key != $_p9k__cache_val[1] ]]; then local rtail=${(j./.)rparts[i,-1]} local parent=$_p9k__cwd[1,-2-$#rtail] _p9k_prompt_length $delim From 8cce84643f53354a227fccd109c61d99940d910a Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 17 May 2023 17:57:29 +0200 Subject: [PATCH 024/140] set P9K_VERSION (#2307) --- internal/p10k.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 4867f481..d166744e 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8401,7 +8401,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v150\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=${(q)P9K_VERSION}$'\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$__p9k_force_term_shell_integration$'\1'${(q)TERM_PROGRAM}$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' @@ -9351,6 +9351,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi +typeset -g P9K_VERSION=1.18.1 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 6740f08f61395665714fbba150c82e99ffe0e784 Mon Sep 17 00:00:00 2001 From: Alkindi42 Date: Thu, 18 May 2023 11:57:40 +0200 Subject: [PATCH 025/140] chezmoi: add chezmoi prompt --- internal/p10k.zsh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index a3541bac..dea5e26d 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4260,6 +4260,17 @@ instant_prompt_vi_mode() { fi } +################################################################ +# Segment to display chezmoi information. +# More information: https://www.chezmoi.io/ +prompt_chezmoi() { + _p9k_prompt_segment "$0" "blue" "$_p9k_color1" '' 0 '' "chezmoi" +} + +_p9k_prompt_chezmoi_init() { + typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$CHEZMOI' +} + ################################################################ # Virtualenv: current working virtualenv # More information on virtualenv (Python): From 951d6957895b1887567b3ea7e548f9533daa3c83 Mon Sep 17 00:00:00 2001 From: Skyler <81177923+Sarvasv-0@users.noreply.github.com> Date: Sat, 20 May 2023 13:08:26 +0530 Subject: [PATCH 026/140] Update README.md Fixed a small bug in alpine linux hyperlink under Installation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 314f839d..30f9927c 100644 --- a/README.md +++ b/README.md @@ -415,7 +415,7 @@ Powerlevel10k. - [Zap](#zap) - [Homebrew](#homebrew) - [Arch Linux](#arch-linux) -- [Alpine Linux](#arch-linux) +- [Alpine Linux](#alpine-linux) - [Fig](#fig) ### Manual From 29c0b258505c5214667c20ce4cb5d4f7e743776c Mon Sep 17 00:00:00 2001 From: Alkindi42 Date: Sun, 21 May 2023 21:42:09 +0200 Subject: [PATCH 027/140] feat: enable chezmoi prompt in configurations --- config/p10k-classic.zsh | 1 + config/p10k-lean-8colors.zsh | 1 + config/p10k-lean.zsh | 1 + config/p10k-pure.zsh | 1 + config/p10k-rainbow.zsh | 1 + 5 files changed, 5 insertions(+) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index d29aa2f8..25c2f79c 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -42,6 +42,7 @@ status # exit code of the last command command_execution_time # duration of the last command background_jobs # presence of background jobs + chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) direnv # direnv status (https://direnv.net/) asdf # asdf version manager (https://github.com/asdf-vm/asdf) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 9fbd5fa2..608e93f6 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -42,6 +42,7 @@ status # exit code of the last command command_execution_time # duration of the last command background_jobs # presence of background jobs + chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) direnv # direnv status (https://direnv.net/) asdf # asdf version manager (https://github.com/asdf-vm/asdf) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 844c1bfe..c427b529 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -42,6 +42,7 @@ status # exit code of the last command command_execution_time # duration of the last command background_jobs # presence of background jobs + chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) direnv # direnv status (https://direnv.net/) asdf # asdf version manager (https://github.com/asdf-vm/asdf) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) diff --git a/config/p10k-pure.zsh b/config/p10k-pure.zsh index 97c1a207..4682fc76 100644 --- a/config/p10k-pure.zsh +++ b/config/p10k-pure.zsh @@ -51,6 +51,7 @@ newline # \n virtualenv # python virtual environment prompt_char # prompt symbol + chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) ) # Right prompt segments. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index c21d879a..5213589c 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -45,6 +45,7 @@ direnv # direnv status (https://direnv.net/) asdf # asdf version manager (https://github.com/asdf-vm/asdf) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) + chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) anaconda # conda environment (https://conda.io/) pyenv # python environment (https://github.com/pyenv/pyenv) goenv # go environment (https://github.com/syndbg/goenv) From 6db5920bb9ecdba25b8253a93120f973b686199f Mon Sep 17 00:00:00 2001 From: Alkindi42 Date: Sun, 21 May 2023 21:45:11 +0200 Subject: [PATCH 028/140] feat: add chezmoi icon --- internal/icons.zsh | 5 +++++ internal/p10k.zsh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index 6b3a9b09..b5f1d0ec 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -107,6 +107,7 @@ function _p9k_init_icons() { VCS_SVN_ICON 'svn'$q RUST_ICON 'R' PYTHON_ICON '\uE63C'$s #  (doesn't always work) + CHEZMOI_ICON '\uf015' #  SWIFT_ICON 'Swift' GO_ICON 'Go' GOLANG_ICON 'Go' @@ -243,6 +244,7 @@ function _p9k_init_icons() { VCS_SVN_ICON 'svn'$q RUST_ICON '\uE6A8' #  PYTHON_ICON '\uE63C'$s #  + CHEZMOI_ICON '\uf015' #  SWIFT_ICON 'Swift' GO_ICON 'Go' GOLANG_ICON 'Go' @@ -384,6 +386,7 @@ function _p9k_init_icons() { VCS_SVN_ICON 'svn'$q RUST_ICON '\uE6A8' #  PYTHON_ICON '\U1F40D' # 🐍 + CHEZMOI_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME}" 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}" @@ -519,6 +522,7 @@ function _p9k_init_icons() { VCS_SVN_ICON '\uE72D'$q #  RUST_ICON '\uE7A8'$q #  PYTHON_ICON '\UE73C ' #  + CHEZMOI_ICON '\Uf015' #  SWIFT_ICON '\uE755' #  GO_ICON '\uE626' #  GOLANG_ICON '\uE626' #  @@ -656,6 +660,7 @@ function _p9k_init_icons() { VCS_SVN_ICON '\uE72D'$q #  RUST_ICON '\uE7A8'$q #  PYTHON_ICON '\UE73C ' #  + CHEZMOI_ICON '\Uf015' #  SWIFT_ICON '\uE755' #  GO_ICON '\uE626' #  GOLANG_ICON '\uE626' #  diff --git a/internal/p10k.zsh b/internal/p10k.zsh index dea5e26d..b2b07aa6 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4264,7 +4264,7 @@ instant_prompt_vi_mode() { # Segment to display chezmoi information. # More information: https://www.chezmoi.io/ prompt_chezmoi() { - _p9k_prompt_segment "$0" "blue" "$_p9k_color1" '' 0 '' "chezmoi" + _p9k_prompt_segment "$0" "black" "white" 'CHEZMOI_ICON' 0 '' "chezmoi" } _p9k_prompt_chezmoi_init() { From 9ed51ec315cd438063f6514e50dd630bad9c62f2 Mon Sep 17 00:00:00 2001 From: Alkindi42 Date: Sun, 21 May 2023 21:54:50 +0200 Subject: [PATCH 029/140] doc: add chezmoi prompt in the README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 314f839d..210c6b8e 100644 --- a/README.md +++ b/README.md @@ -314,6 +314,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start | `azure` | [azure](https://docs.microsoft.com/en-us/cli/azure) account name | | `background_jobs` | presence of background jobs | | `battery` | internal battery state and charge level (yep, batteries *literally* included) | +| `chezmoi` | [chezmoi](https://github.com/twpayne/chezmoi) shell | | `command_execution_time` | duration (wall time) of the last command | | `context` | user@hostname | | `cpu_arch` | CPU architecture | From 79753faacb6dc511088cb0d136ec438873613932 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sun, 4 Jun 2023 20:11:07 +0200 Subject: [PATCH 030/140] add a comment within .p10k.zsh explaining the use of "_joined" (#2332) --- config/p10k-classic.zsh | 3 +++ config/p10k-rainbow.zsh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index d29aa2f8..de12ec1d 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -168,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. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index c21d879a..674d51ef 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -165,6 +165,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. From e4b8925478d79795713c80dca4680782a33cdc1b Mon Sep 17 00:00:00 2001 From: kvanzuijlen <8818390+kvanzuijlen@users.noreply.github.com> Date: Wed, 7 Jun 2023 14:33:37 +0200 Subject: [PATCH 031/140] Added cert manager cmctl to POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND --- config/p10k-classic.zsh | 2 +- config/p10k-lean-8colors.zsh | 2 +- config/p10k-lean.zsh | 2 +- config/p10k-rainbow.zsh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index de12ec1d..c67d63a0 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1256,7 +1256,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|kubecolor' + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl' # Kubernetes context classes for the purpose of using different colors, icons and expansions with # different contexts. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 9fbd5fa2..c63bc6c7 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -1195,7 +1195,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|kubecolor' + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl' # Kubernetes context classes for the purpose of using different colors, icons and expansions with # different contexts. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 844c1bfe..154dc0ec 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -1191,7 +1191,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|kubecolor' + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl' # Kubernetes context classes for the purpose of using different colors, icons and expansions with # different contexts. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 674d51ef..7f35949c 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1329,7 +1329,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|kubecolor' + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl' # Kubernetes context classes for the purpose of using different colors, icons and expansions with # different contexts. From 7b197465803cd5f646e916b631f1b239d02efebf Mon Sep 17 00:00:00 2001 From: Alkindi42 Date: Sat, 10 Jun 2023 14:09:50 +0200 Subject: [PATCH 032/140] feat: add color and custom icon --- config/p10k-classic.zsh | 6 ++++++ config/p10k-lean-8colors.zsh | 6 ++++++ config/p10k-lean.zsh | 6 ++++++ config/p10k-rainbow.zsh | 7 +++++++ 4 files changed, 25 insertions(+) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 25c2f79c..74c05409 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -737,6 +737,12 @@ # Custom icon. # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' + ##################[ chezmoi: chezmoi shell (https://github.com/twpayne/chezmoi) ]################## + # chezmoi shell color. + typeset -g POWERLEVEL9K_CHEZMOI_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_CHEZMOI_VISUAL_IDENTIFIER_EXPANSION='⭐' + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### # Vim shell indicator color. typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 608e93f6..70c87668 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -735,6 +735,12 @@ # Custom icon. # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' + ##################[ chezmoi: chezmoi shell (https://github.com/twpayne/chezmoi) ]################## + # chezmoi shell color. + typeset -g POWERLEVEL9K_CHEZMOI_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_CHEZMOI_VISUAL_IDENTIFIER_EXPANSION='⭐' + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### # Vim shell indicator color. typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=3 diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index c427b529..5e58b448 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -731,6 +731,12 @@ # Custom icon. # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' + ##################[ chezmoi: chezmoi shell (https://github.com/twpayne/chezmoi) ]################## + # chezmoi shell color. + typeset -g POWERLEVEL9K_CHEZMOI_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_CHEZMOI_VISUAL_IDENTIFIER_EXPANSION='⭐' + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### # Vim shell indicator color. typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 5213589c..ce57757b 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -759,6 +759,13 @@ # Custom icon. # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' + ##################[ chezmoi: chezmoi shell (https://github.com/twpayne/chezmoi) ]################## + # chezmoi shell color. + typeset -g POWERLEVEL9K_CHEZMOI_FOREGROUND=0 + typeset -g POWERLEVEL9K_CHEZMOI_BACKGROUND=6 + # Custom icon. + # typeset -g POWERLEVEL9K_CHEZMOI_VISUAL_IDENTIFIER_EXPANSION='⭐' + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### # Vim shell indicator color. typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 From 3ecef8c6a5d12d7aaf0335efc3483c4145371337 Mon Sep 17 00:00:00 2001 From: Alkindi42 Date: Sat, 10 Jun 2023 14:25:17 +0200 Subject: [PATCH 033/140] feat(chezmoi): add instant_prompt_chezmoi --- internal/p10k.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index b2b07aa6..5a72b7e4 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4271,6 +4271,10 @@ _p9k_prompt_chezmoi_init() { typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$CHEZMOI' } +function instant_prompt_chezmoi() { + _p9k_prompt_segment prompt_chezmoi "black" "white" CHEZMOI_ICON 0 '' 'chezmoi' +} + ################################################################ # Virtualenv: current working virtualenv # More information on virtualenv (Python): From cc4878aef2bdefbac98fa135fca6070d27e4f041 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sun, 11 Jun 2023 09:07:41 +0200 Subject: [PATCH 034/140] fix chezmoi segment and rename it to chezmoi_shell (#2311) - Link to the project's homepage rather than its source code. - Move `chezmoi_shell` next to all the other *shell indicator* segments. - Use a shade of blue that resembes the color on chezmoi.io. - Don't go beyond 8 colors in 8-color configs. - Remove the segment from the *pure* config. - Fix whitespace padding on `CHEZMOI_ICON`. - Use the appropriate icon with all fonts (the same as `HOME`). - Add missing `CHEZMOI_ICON` definitions for "powerline" and "ascii" font modes. - Remove the redundant literal "chezmoi" content from the segment. - Fix instant prompt so that the segment is shown only when `$CHEZMOI` is non-empty. --- README.md | 2 +- config/p10k-classic.zsh | 14 +++++++------- config/p10k-lean-8colors.zsh | 14 +++++++------- config/p10k-lean.zsh | 14 +++++++------- config/p10k-pure.zsh | 1 - config/p10k-rainbow.zsh | 16 ++++++++-------- internal/icons.zsh | 12 +++++++----- internal/p10k.zsh | 14 ++++++-------- 8 files changed, 43 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 1de5aac5..a4aff1fc 100644 --- a/README.md +++ b/README.md @@ -314,7 +314,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start | `azure` | [azure](https://docs.microsoft.com/en-us/cli/azure) account name | | `background_jobs` | presence of background jobs | | `battery` | internal battery state and charge level (yep, batteries *literally* included) | -| `chezmoi` | [chezmoi](https://github.com/twpayne/chezmoi) shell | +| `chezmoi_shell` | [chezmoi](https://www.chezmoi.io/) shell | | `command_execution_time` | duration (wall time) of the last command | | `context` | user@hostname | | `cpu_arch` | CPU architecture | diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 8a52ae1e..5ea3dba3 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -42,7 +42,6 @@ status # exit code of the last command command_execution_time # duration of the last command background_jobs # presence of background jobs - chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) direnv # direnv status (https://direnv.net/) asdf # asdf version manager (https://github.com/asdf-vm/asdf) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) @@ -88,6 +87,7 @@ 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 @@ -740,12 +740,6 @@ # Custom icon. # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' - ##################[ chezmoi: chezmoi shell (https://github.com/twpayne/chezmoi) ]################## - # chezmoi shell color. - typeset -g POWERLEVEL9K_CHEZMOI_FOREGROUND=72 - # Custom icon. - # typeset -g POWERLEVEL9K_CHEZMOI_VISUAL_IDENTIFIER_EXPANSION='⭐' - ###########################[ vim_shell: vim shell indicator (:sh) ]########################### # Vim shell indicator color. typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 @@ -771,6 +765,12 @@ # 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 diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index b4ee4e8a..3ce3f2c9 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -42,7 +42,6 @@ status # exit code of the last command command_execution_time # duration of the last command background_jobs # presence of background jobs - chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) direnv # direnv status (https://direnv.net/) asdf # asdf version manager (https://github.com/asdf-vm/asdf) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) @@ -88,6 +87,7 @@ 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 @@ -735,12 +735,6 @@ # Custom icon. # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' - ##################[ chezmoi: chezmoi shell (https://github.com/twpayne/chezmoi) ]################## - # chezmoi shell color. - typeset -g POWERLEVEL9K_CHEZMOI_FOREGROUND=72 - # Custom icon. - # typeset -g POWERLEVEL9K_CHEZMOI_VISUAL_IDENTIFIER_EXPANSION='⭐' - ###########################[ vim_shell: vim shell indicator (:sh) ]########################### # Vim shell indicator color. typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=3 @@ -766,6 +760,12 @@ # 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 diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 1c8520bd..e08237bf 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -42,7 +42,6 @@ status # exit code of the last command command_execution_time # duration of the last command background_jobs # presence of background jobs - chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) direnv # direnv status (https://direnv.net/) asdf # asdf version manager (https://github.com/asdf-vm/asdf) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) @@ -88,6 +87,7 @@ 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 @@ -731,12 +731,6 @@ # Custom icon. # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' - ##################[ chezmoi: chezmoi shell (https://github.com/twpayne/chezmoi) ]################## - # chezmoi shell color. - typeset -g POWERLEVEL9K_CHEZMOI_FOREGROUND=72 - # Custom icon. - # typeset -g POWERLEVEL9K_CHEZMOI_VISUAL_IDENTIFIER_EXPANSION='⭐' - ###########################[ vim_shell: vim shell indicator (:sh) ]########################### # Vim shell indicator color. typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 @@ -762,6 +756,12 @@ # 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 diff --git a/config/p10k-pure.zsh b/config/p10k-pure.zsh index 4682fc76..97c1a207 100644 --- a/config/p10k-pure.zsh +++ b/config/p10k-pure.zsh @@ -51,7 +51,6 @@ newline # \n virtualenv # python virtual environment prompt_char # prompt symbol - chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) ) # Right prompt segments. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index f8290dc2..48fdacfd 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -45,7 +45,6 @@ direnv # direnv status (https://direnv.net/) asdf # asdf version manager (https://github.com/asdf-vm/asdf) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) - chezmoi # chezmoi prompt (https://github.com/twpayne/chezmoi) anaconda # conda environment (https://conda.io/) pyenv # python environment (https://github.com/pyenv/pyenv) goenv # go environment (https://github.com/syndbg/goenv) @@ -88,6 +87,7 @@ 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 @@ -762,13 +762,6 @@ # Custom icon. # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' - ##################[ chezmoi: chezmoi shell (https://github.com/twpayne/chezmoi) ]################## - # chezmoi shell color. - typeset -g POWERLEVEL9K_CHEZMOI_FOREGROUND=0 - typeset -g POWERLEVEL9K_CHEZMOI_BACKGROUND=6 - # Custom icon. - # typeset -g POWERLEVEL9K_CHEZMOI_VISUAL_IDENTIFIER_EXPANSION='⭐' - ###########################[ vim_shell: vim shell indicator (:sh) ]########################### # Vim shell indicator color. typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 @@ -797,6 +790,13 @@ # 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 diff --git a/internal/icons.zsh b/internal/icons.zsh index b5f1d0ec..4fce1ee0 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -107,7 +107,7 @@ function _p9k_init_icons() { VCS_SVN_ICON 'svn'$q RUST_ICON 'R' PYTHON_ICON '\uE63C'$s #  (doesn't always work) - CHEZMOI_ICON '\uf015' #  + CHEZMOI_ICON '\uE12C'$s #  SWIFT_ICON 'Swift' GO_ICON 'Go' GOLANG_ICON 'Go' @@ -244,7 +244,7 @@ function _p9k_init_icons() { VCS_SVN_ICON 'svn'$q RUST_ICON '\uE6A8' #  PYTHON_ICON '\uE63C'$s #  - CHEZMOI_ICON '\uf015' #  + CHEZMOI_ICON '\uF015'$s #  SWIFT_ICON 'Swift' GO_ICON 'Go' GOLANG_ICON 'Go' @@ -386,7 +386,7 @@ function _p9k_init_icons() { VCS_SVN_ICON 'svn'$q RUST_ICON '\uE6A8' #  PYTHON_ICON '\U1F40D' # 🐍 - CHEZMOI_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME}" + 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}" @@ -522,7 +522,7 @@ function _p9k_init_icons() { VCS_SVN_ICON '\uE72D'$q #  RUST_ICON '\uE7A8'$q #  PYTHON_ICON '\UE73C ' #  - CHEZMOI_ICON '\Uf015' #  + CHEZMOI_ICON '\uF015'$s #  SWIFT_ICON '\uE755' #  GO_ICON '\uE626' #  GOLANG_ICON '\uE626' #  @@ -660,7 +660,7 @@ function _p9k_init_icons() { VCS_SVN_ICON '\uE72D'$q #  RUST_ICON '\uE7A8'$q #  PYTHON_ICON '\UE73C ' #  - CHEZMOI_ICON '\Uf015' #  + CHEZMOI_ICON '\uF015'$s #  SWIFT_ICON '\uE755' #  GO_ICON '\uE626' #  GOLANG_ICON '\uE626' #  @@ -795,6 +795,7 @@ function _p9k_init_icons() { VCS_SVN_ICON '' RUST_ICON 'rust' PYTHON_ICON 'py' + CHEZMOI_ICON 'chezmoi' SWIFT_ICON 'swift' GO_ICON 'go' GOLANG_ICON 'go' @@ -931,6 +932,7 @@ function _p9k_init_icons() { VCS_SVN_ICON '' RUST_ICON 'R' PYTHON_ICON 'Py' + CHEZMOI_ICON 'Chez' SWIFT_ICON 'Swift' GO_ICON 'Go' GOLANG_ICON 'Go' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index b41c6ebb..ca735e50 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4260,19 +4260,17 @@ instant_prompt_vi_mode() { fi } -################################################################ -# Segment to display chezmoi information. -# More information: https://www.chezmoi.io/ -prompt_chezmoi() { - _p9k_prompt_segment "$0" "black" "white" 'CHEZMOI_ICON' 0 '' "chezmoi" +# Chezmoi shell indicator: https://www.chezmoi.io/ +prompt_chezmoi_shell() { + _p9k_prompt_segment $0 blue $_p9k_color1 CHEZMOI_ICON 0 '' '' } -_p9k_prompt_chezmoi_init() { +_p9k_prompt_chezmoi_shell_init() { typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$CHEZMOI' } -function instant_prompt_chezmoi() { - _p9k_prompt_segment prompt_chezmoi "black" "white" CHEZMOI_ICON 0 '' 'chezmoi' +function instant_prompt_chezmoi_shell() { + _p9k_prompt_segment prompt_chezmoi_shell blue $_p9k_color1 CHEZMOI_ICON 1 '$CHEZMOI_ICON' '' } ################################################################ From 944f52fc430259ff49f497f3516a3ddfb45a0a6b Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sun, 11 Jun 2023 09:09:24 +0200 Subject: [PATCH 035/140] move chezmoi_shell in the docs closer to other shell indicator segments --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4aff1fc..d4cbc457 100644 --- a/README.md +++ b/README.md @@ -314,7 +314,6 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start | `azure` | [azure](https://docs.microsoft.com/en-us/cli/azure) account name | | `background_jobs` | presence of background jobs | | `battery` | internal battery state and charge level (yep, batteries *literally* included) | -| `chezmoi_shell` | [chezmoi](https://www.chezmoi.io/) shell | | `command_execution_time` | duration (wall time) of the last command | | `context` | user@hostname | | `cpu_arch` | CPU architecture | @@ -339,6 +338,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 | From 360dcd3907a7556a2ffa841380142e1f9dc6ec33 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 15 Jun 2023 08:44:50 +0200 Subject: [PATCH 036/140] respect XDG_DATA_HOME when looking for the timewarrior data directory (#2344) The logic for finding the data directory is as follows: 1. Find the root directory: 1.1 If TIMEWARRIORDB is set, use that. 1.2 Else if ~/.timewarrior is an existing directory, use that. 1.3 Else if XDG_DATA_HOME is set, use $XDG_DATA_HOME/timewarrior. 1.4 Else use ~/.local/share/timewarrior. 2. Append "/data" to the root directory. --- internal/p10k.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index ca735e50..a6cd9afe 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5084,8 +5084,11 @@ function _p9k_timewarrior_clear() { } function prompt_timewarrior() { + local dir + [[ -n ${dir::=$TIMEWARRIORDB} || -n ${dir::=~/.timewarrior}(#qN/) ]] || + dir=${XDG_DATA_HOME:-~/.local/share}/timewarrior + dir+=/data local -a stat - local dir=${TIMEWARRIORDB:-~/.timewarrior}/data [[ $dir == $_p9k_timewarrior_dir ]] || _p9k_timewarrior_clear if [[ -n $_p9k_timewarrior_file_name ]]; then zstat -A stat +mtime -- $dir $_p9k_timewarrior_file_name 2>/dev/null || stat=() From ab8bac01e2a90e1cd749d4936e4decbdba3c2727 Mon Sep 17 00:00:00 2001 From: Koen van Zuijlen <8818390+kvanzuijlen@users.noreply.github.com> Date: Sat, 17 Jun 2023 10:46:55 +0200 Subject: [PATCH 037/140] Add sparkctl to POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND (#2346) --- config/p10k-classic.zsh | 2 +- config/p10k-lean-8colors.zsh | 2 +- config/p10k-lean.zsh | 2 +- config/p10k-rainbow.zsh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 5ea3dba3..4e80e407 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1263,7 +1263,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|kubecolor|cmctl' + 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. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 3ce3f2c9..08cccfef 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -1202,7 +1202,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|kubecolor|cmctl' + 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. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index e08237bf..fe7d7448 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -1198,7 +1198,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|kubecolor|cmctl' + 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. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 48fdacfd..c60e95b4 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1337,7 +1337,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|kubecolor|cmctl' + 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. From 017395a266aa15011c09e64e44a1c98ed91c478c Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 23 Jun 2023 07:44:27 +0200 Subject: [PATCH 038/140] release v1.19.0 --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index a6cd9afe..da9c92c0 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9367,7 +9367,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.18.1 +typeset -g P9K_VERSION=1.19.0 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 20323d6f8cd267805a793dafc840d22330653867 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 26 Jun 2023 10:33:21 +0200 Subject: [PATCH 039/140] display `=` in git status if up to date with the remote (#2361) --- README.md | 1 + config/p10k-classic.zsh | 16 +++++++++++----- config/p10k-lean-8colors.zsh | 16 +++++++++++----- config/p10k-lean.zsh | 16 +++++++++++----- config/p10k-rainbow.zsh | 16 +++++++++++----- 5 files changed, 45 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index d4cbc457..25fccedf 100644 --- a/README.md +++ b/README.md @@ -1135,6 +1135,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}` | diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 4e80e407..a14c150a 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -427,11 +427,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 + # = 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+=" " diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 08cccfef..484de217 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -422,11 +422,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 + # = 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+=" " diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index fe7d7448..ed6c1dec 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -418,11 +418,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 + # = 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+=" " diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index c60e95b4..33dff0d3 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -428,11 +428,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 + # = 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+=" " From 4dca4bdfbb118953b73a131f511094462165971d Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sun, 9 Jul 2023 09:42:35 +0200 Subject: [PATCH 040/140] bug fix: honor POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR in instant prompt (#2376) --- internal/p10k.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index da9c92c0..41cee213 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8490,7 +8490,14 @@ function _p9k_init_cacheable() { _p9k_transient_prompt+='${${P9K_CONTENT::="❯"}+}' _p9k_param prompt_prompt_char_ERROR_VIINS CONTENT_EXPANSION '${P9K_CONTENT}' _p9k_transient_prompt+='${:-"'$_p9k__ret'"}' - _p9k_transient_prompt+=')%b%k%f%s%u ' + _p9k_transient_prompt+=')%b%k%f%s%u' + _p9k_get_icon '' LEFT_SEGMENT_END_SEPARATOR + if [[ $_p9k__ret != (| ) ]]; then + _p9k__ret+=%b%k%f + # Not escaped for historical reasons. + _p9k__ret='${:-"'$_p9k__ret'"}' + fi + _p9k_transient_prompt+=$_p9k__ret if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then _p9k_transient_prompt=$'%{\e]133;A\a%}'$_p9k_transient_prompt$'%{\e]133;B\a%}' if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then @@ -9367,7 +9374,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.0 +typeset -g P9K_VERSION=1.19.1 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 0c28fec137b2a505667d1980ece0c1943a033000 Mon Sep 17 00:00:00 2001 From: BEN MANSOUR Mohamed Rafik Date: Mon, 10 Jul 2023 22:07:28 +0200 Subject: [PATCH 041/140] fix pattern coloration for azure defined classes --- config/p10k-classic.zsh | 31 +++++++++++++++++++++++++++++-- internal/p10k.zsh | 1 + 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index a14c150a..01a518bd 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1404,8 +1404,35 @@ # 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' - # Azure account name color. - typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 + + # 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 subscription 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 profile class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current AZURE subscription 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. + '*' DEFAULT) + typeset -g POWERLEVEL9K_AZURE_DEFAULT_FOREGROUND=32 # Custom icon. # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 41cee213..c020cd9a 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4655,6 +4655,7 @@ prompt_azure() { fi local pat class state for pat class in "${_POWERLEVEL9K_AZURE_CLASSES[@]}"; do + name="${_p9k__cache_val[1]//\%/%%}" if [[ $name == ${~pat} ]]; then [[ -n $class ]] && state=_${${(U)class}//İ/I} break From 078497570f58aa9fc4fe3a7cfd5951a67d7c8f5d Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 11 Jul 2023 10:53:52 +0200 Subject: [PATCH 042/140] clean up the handling of POWERLEVEL9K_AZURE_CLASSES and put it in all configs (#2379) This reverts commit 343d4f44e524e9674ecfb6f0df9114563232b889, reversing changes made to 4dca4bdfbb118953b73a131f511094462165971d. --- config/p10k-classic.zsh | 18 ++++++++++-------- config/p10k-lean-8colors.zsh | 33 +++++++++++++++++++++++++++++++-- config/p10k-lean.zsh | 33 +++++++++++++++++++++++++++++++-- config/p10k-rainbow.zsh | 36 +++++++++++++++++++++++++++++++++--- internal/p10k.zsh | 14 +++++++------- 5 files changed, 112 insertions(+), 22 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 01a518bd..1f262731 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1406,11 +1406,11 @@ 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 subscription gets matched. + # 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 profile class. Patterns are tried in order. The + # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The # first match wins. # # For example, given these settings: @@ -1418,10 +1418,10 @@ # typeset -g POWERLEVEL9K_AZURE_CLASSES=( # '*prod*' PROD # '*test*' TEST - # '*' DEFAULT) + # '*' OTHER) # - # If your current AZURE subscription is "company_test", its class is TEST - # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. + # If your current azure account is "project_test", its class is TEST because "project_test" + # doesn't match the pattern '*prod*' but does match '*test*'. # # You can define different colors, icons and content expansions for different classes: # @@ -1431,10 +1431,12 @@ typeset -g POWERLEVEL9K_AZURE_CLASSES=( # '*prod*' PROD # These values are examples that are unlikely # '*test*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - typeset -g POWERLEVEL9K_AZURE_DEFAULT_FOREGROUND=32 + '*' OTHER) + + # Azure account name color. + 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. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 484de217..4f22754f 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -1382,10 +1382,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 "project_test", its class is TEST because "project_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. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index ed6c1dec..b21400bf 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -1378,10 +1378,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 "project_test", its class is TEST because "project_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. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 33dff0d3..8e8074f7 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1482,11 +1482,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 "project_test", its class is TEST because "project_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. diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c020cd9a..3ab76e3e 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4643,9 +4643,10 @@ _p9k_prompt_java_version_init() { } prompt_azure() { - local cfg=${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json - if ! _p9k_cache_stat_get $0 $cfg; then - local name + local name cfg=${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json + if _p9k_cache_stat_get $0 $cfg; then + name=$_p9k__cache_val[1] + else if (( $+commands[jq] )) && name="$(jq -r '[.subscriptions[]|select(.isDefault==true)|.name][]|strings' $cfg 2>/dev/null)"; then name=${name%%$'\n'*} elif ! name="$(az account show --query name --output tsv 2>/dev/null)"; then @@ -4653,16 +4654,15 @@ prompt_azure() { fi _p9k_cache_stat_set "$name" fi + [[ -n $name ]] || return local pat class state for pat class in "${_POWERLEVEL9K_AZURE_CLASSES[@]}"; do - name="${_p9k__cache_val[1]//\%/%%}" if [[ $name == ${~pat} ]]; then [[ -n $class ]] && state=_${${(U)class}//İ/I} break fi done - [[ -n $_p9k__cache_val[1] ]] || return - _p9k_prompt_segment "$0$state" "blue" "white" "AZURE_ICON" 0 '' "${_p9k__cache_val[1]//\%/%%}" + _p9k_prompt_segment "$0$state" "blue" "white" "AZURE_ICON" 0 '' "${name//\%/%%}" } _p9k_prompt_azure_init() { @@ -9375,7 +9375,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.1 +typeset -g P9K_VERSION=1.19.2 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 93d97b7eba9fb4e0866dd8e4e2eda9a89226bd84 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 11 Jul 2023 11:11:21 +0200 Subject: [PATCH 043/140] better comments --- config/p10k-classic.zsh | 2 +- config/p10k-lean-8colors.zsh | 2 +- config/p10k-lean.zsh | 2 +- config/p10k-rainbow.zsh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 1f262731..b61212ca 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1420,7 +1420,7 @@ # '*test*' TEST # '*' OTHER) # - # If your current azure account is "project_test", its class is TEST because "project_test" + # 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: diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 4f22754f..10b63cc7 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -1398,7 +1398,7 @@ # '*test*' TEST # '*' OTHER) # - # If your current azure account is "project_test", its class is TEST because "project_test" + # 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: diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index b21400bf..936854d8 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -1394,7 +1394,7 @@ # '*test*' TEST # '*' OTHER) # - # If your current azure account is "project_test", its class is TEST because "project_test" + # 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: diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 8e8074f7..14dee5aa 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1498,7 +1498,7 @@ # '*test*' TEST # '*' OTHER) # - # If your current azure account is "project_test", its class is TEST because "project_test" + # 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: From 932954a8b1e31ae540e9df5e5e464100d46e53ec Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 12 Jul 2023 15:01:32 +0200 Subject: [PATCH 044/140] do not display an indicator when a git branch is up to date with a remote https://github.com/romkatv/powerlevel10k/issues/2361 requested an indicator for up to date branches, which was added in 20323d6f8cd267805a793dafc840d22330653867. Since then, 3 users complained about the new indicator: - https://github.com/romkatv/powerlevel10k/issues/2377 - https://github.com/romkatv/powerlevel10k/issues/2380 - https://github.com/romkatv/powerlevel10k/issues/2361#issuecomment-1630731045 On one hand we have one request to add a feature. On the other hand we have three complaints about the feature's existence. The feature is going away. --- config/p10k-classic.zsh | 4 ++-- config/p10k-lean-8colors.zsh | 4 ++-- config/p10k-lean.zsh | 4 ++-- config/p10k-rainbow.zsh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index b61212ca..14ebd38c 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -434,8 +434,8 @@ (( 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 - # = if up to date with the remote. - res+=" ${clean}=" + # Tip: Uncomment the next line to display '=' if up to date with the remote. + # res+=" ${clean}=" fi # ⇠42 if behind the push remote. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 10b63cc7..917fe714 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -429,8 +429,8 @@ (( 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 - # = if up to date with the remote. - res+=" ${clean}=" + # Tip: Uncomment the next line to display '=' if up to date with the remote. + # res+=" ${clean}=" fi # ⇠42 if behind the push remote. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 936854d8..97c7e288 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -425,8 +425,8 @@ (( 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 - # = if up to date with the remote. - res+=" ${clean}=" + # Tip: Uncomment the next line to display '=' if up to date with the remote. + # res+=" ${clean}=" fi # ⇠42 if behind the push remote. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 14dee5aa..53606ff2 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -435,8 +435,8 @@ (( 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 - # = if up to date with the remote. - res+=" ${clean}=" + # Tip: Uncomment the next line to display '=' if up to date with the remote. + # res+=" ${clean}=" fi # ⇠42 if behind the push remote. From 2453fd27e20e9c1e4bac43eb1b8b9476749e429f Mon Sep 17 00:00:00 2001 From: hugo <102398135+hugivar@users.noreply.github.com> Date: Fri, 21 Jul 2023 16:18:24 -0400 Subject: [PATCH 045/140] Update README.md as Terminus is now known as Tabby --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 25fccedf..fda818b8 100644 --- a/README.md +++ b/README.md @@ -669,7 +669,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**: 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*. From 646bae0dd629045e08928c3ba7baa54fbbe79faa Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 21 Jul 2023 22:48:11 +0200 Subject: [PATCH 046/140] docs: Terminus is now called Tabby --- README.md | 2 +- font.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fda818b8..f5713b64 100644 --- a/README.md +++ b/README.md @@ -669,7 +669,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. - - **Tabby**: 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*. diff --git a/font.md b/font.md index e7505ef4..2fb2f8be 100644 --- a/font.md +++ b/font.md @@ -62,7 +62,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*. From e8aa8cce7f3c2017a21e62f502217be22e066aea Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 25 Jul 2023 07:54:38 +0200 Subject: [PATCH 047/140] unquote ID in /etc/os-release (#2388) --- internal/p10k.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 3ab76e3e..341356f6 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8525,7 +8525,7 @@ function _p9k_init_cacheable() { if [[ -r /etc/os-release ]]; then local lines=(${(f)"$(/dev/null fi -typeset -g P9K_VERSION=1.19.2 +typeset -g P9K_VERSION=1.19.3 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 1d96f5e066a5dd569ddd24787d7e9a3c3abe3024 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 25 Jul 2023 07:55:26 +0200 Subject: [PATCH 048/140] unquote ID in /etc/os-release (#2388) --- internal/p10k.zsh | 2 +- internal/wizard.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 341356f6..33b36df4 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9375,7 +9375,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.3 +typeset -g P9K_VERSION=1.19.4 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 2265b07c..f32de395 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1126,7 +1126,7 @@ function os_icon_name() { if [[ -r /etc/os-release ]]; then local lines=(${(f)"$( Date: Tue, 25 Jul 2023 13:25:19 +0200 Subject: [PATCH 049/140] new segment: per_directory_history (#2384) --- config/p10k-classic.zsh | 14 ++++++++++++++ config/p10k-lean-8colors.zsh | 14 ++++++++++++++ config/p10k-lean.zsh | 14 ++++++++++++++ config/p10k-rainbow.zsh | 16 ++++++++++++++++ internal/icons.zsh | 7 +++++++ internal/p10k.zsh | 27 ++++++++++++++++++++++++++- 6 files changed, 91 insertions(+), 1 deletion(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 14ebd38c..aacb22d4 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -97,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 ]========================= @@ -887,6 +888,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 diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 917fe714..9d1d3003 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -96,6 +96,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 ]========================= @@ -865,6 +866,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 diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 97c7e288..1581c170 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -96,6 +96,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 ]========================= @@ -861,6 +862,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 diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 53606ff2..3fe2dfaf 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -97,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 ]========================= @@ -924,6 +925,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 diff --git a/internal/icons.zsh b/internal/icons.zsh index 4fce1ee0..3172ed2f 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -153,6 +153,7 @@ function _p9k_init_icons() { SCALA_ICON 'scala' TOOLBOX_ICON '\u2B22' # ⬢ ARCH_ICON 'arch' + HISTORY_ICON 'hist' ) ;; 'awesome-fontconfig') @@ -290,6 +291,7 @@ function _p9k_init_icons() { SCALA_ICON 'scala' TOOLBOX_ICON '\u2B22' # ⬢ ARCH_ICON 'arch' + HISTORY_ICON 'hist' ) ;; 'awesome-mapped-fontconfig') @@ -430,6 +432,7 @@ function _p9k_init_icons() { SCALA_ICON 'scala' TOOLBOX_ICON '\u2B22' # ⬢ ARCH_ICON 'arch' + HISTORY_ICON 'hist' ) ;; 'nerdfont-v3') @@ -568,6 +571,7 @@ function _p9k_init_icons() { SCALA_ICON '\uE737' #  TOOLBOX_ICON '\uE20F'$s #  ARCH_ICON '\uE266' #  + HISTORY_ICON '\uF1DA'$s #  ) ;; 'nerdfont-complete'|'nerdfont-fontconfig') @@ -706,6 +710,7 @@ function _p9k_init_icons() { SCALA_ICON '\uE737' #  TOOLBOX_ICON '\uE20F'$s #  ARCH_ICON '\uE266' #  + HISTORY_ICON '\uF1DA'$s #  ) ;; ascii) @@ -841,6 +846,7 @@ function _p9k_init_icons() { SCALA_ICON 'scala' TOOLBOX_ICON 'toolbox' ARCH_ICON 'arch' + HISTORY_ICON 'hist' ) ;; *) @@ -978,6 +984,7 @@ function _p9k_init_icons() { SCALA_ICON 'scala' TOOLBOX_ICON '\u2B22' # ⬢ ARCH_ICON 'arch' + HISTORY_ICON 'hist' ) ;; esac diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 33b36df4..97c14710 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5731,6 +5731,31 @@ _p9k_prompt_cpu_arch_init() { typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[machine]$commands[arch]' } +################################################################ +# Oh My Zsh per-directory-history local/global indicator +prompt_per_directory_history() { + if [[ $_per_directory_history_is_global == true ]]; then + _p9k_prompt_segment ${0}_GLOBAL 3 $_p9k_color1 HISTORY_ICON 0 '' global + else + _p9k_prompt_segment ${0}_LOCAL 5 $_p9k_color1 HISTORY_ICON 0 '' local + fi +} + +instant_prompt_per_directory_history() { + case $HISTORY_START_WITH_GLOBAL in + true) + _p9k_prompt_segment prompt_per_directory_history_GLOBAL 3 $_p9k_color1 HISTORY_ICON 0 '' global + ;; + ?*) + _p9k_prompt_segment prompt_per_directory_history_LOCAL 5 $_p9k_color1 HISTORY_ICON 0 '' local + ;; + esac +} + +_p9k_prompt_per_directory_history_init() { + typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$PER_DIRECTORY_HISTORY_TOGGLE' +} + # Use two preexec hooks to survive https://github.com/MichaelAquilina/zsh-you-should-use with # YSU_HARDCORE=1. See https://github.com/romkatv/powerlevel10k/issues/427. _p9k_preexec1() { @@ -9375,7 +9400,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.4 +typeset -g P9K_VERSION=1.19.5 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 12aa3fa3c423fa2aaaf9fe22d8c2021af1d73ecb Mon Sep 17 00:00:00 2001 From: Markus Kurtz Date: Tue, 25 Jul 2023 20:50:59 +0200 Subject: [PATCH 050/140] Add rocky icon --- internal/icons.zsh | 7 +++++++ internal/p10k.zsh | 1 + 2 files changed, 8 insertions(+) diff --git a/internal/icons.zsh b/internal/icons.zsh index 3172ed2f..69a721f0 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -73,6 +73,7 @@ function _p9k_init_icons() { LINUX_RHEL_ICON '\uE271'$s #  LINUX_AMZN_ICON '\uE271'$s #  LINUX_ENDEAVOUROS_ICON '\uE271'$s #  + LINUX_ROCKY_ICON '\uE271'$s #  SUNOS_ICON '\U1F31E'$q # 🌞 HOME_ICON '\uE12C'$s #  HOME_SUB_ICON '\uE18D'$s #  @@ -215,6 +216,7 @@ function _p9k_init_icons() { LINUX_RHEL_ICON '\uF17C'$s #  LINUX_AMZN_ICON '\uF17C'$s #  LINUX_ENDEAVOUROS_ICON '\uF17C'$s #  + LINUX_ROCKY_ICON '\uF17C'$s #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  HOME_SUB_ICON '\uF07C'$s #  @@ -358,6 +360,7 @@ function _p9k_init_icons() { 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}" 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}" @@ -494,6 +497,7 @@ function _p9k_init_icons() { LINUX_RHEL_ICON '\uF316'$s #  LINUX_AMZN_ICON '\uF270'$s #  LINUX_ENDEAVOUROS_ICON '\UF322'$s #  + LINUX_ROCKY_ICON '\UF32b'$s #  LINUX_ICON '\uF17C' #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  @@ -633,6 +637,7 @@ function _p9k_init_icons() { LINUX_RHEL_ICON '\uF316'$s #  LINUX_AMZN_ICON '\uF270'$s #  LINUX_ENDEAVOUROS_ICON '\uF17C' #  + LINUX_ROCKY_ICON '\uF17C' #  LINUX_ICON '\uF17C' #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  @@ -770,6 +775,7 @@ function _p9k_init_icons() { LINUX_RHEL_ICON 'rhel' LINUX_AMZN_ICON 'amzn' LINUX_ENDEAVOUROS_ICON 'edvos' + LINUX_ROCKY_ICON 'rocky' SUNOS_ICON 'sunos' HOME_ICON '' HOME_SUB_ICON '' @@ -908,6 +914,7 @@ function _p9k_init_icons() { LINUX_RHEL_ICON 'RH' LINUX_AMZN_ICON 'Amzn' LINUX_ENDEAVOUROS_ICON 'Edv' + LINUX_ROCKY_ICON 'Roc' SUNOS_ICON 'Sun' HOME_ICON '' HOME_SUB_ICON '' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 97c14710..c3d96561 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8580,6 +8580,7 @@ function _p9k_init_cacheable() { *rhel*) _p9k_set_os Linux LINUX_RHEL_ICON;; amzn) _p9k_set_os Linux LINUX_AMZN_ICON;; endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;; + rocky) _p9k_set_os Linux LINUX_ROCKY_ICON;; *) _p9k_set_os Linux LINUX_ICON;; esac ;; From 367c667de66e8227d55b4726390d07aa45c4b3f6 Mon Sep 17 00:00:00 2001 From: Markus Kurtz Date: Tue, 25 Jul 2023 21:36:13 +0200 Subject: [PATCH 051/140] Add rocky icon to wizard --- internal/wizard.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index f32de395..87c45378 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1156,6 +1156,7 @@ function os_icon_name() { *rhel*) echo LINUX_RHEL_ICON;; amzn) echo LINUX_AMZN_ICON;; endeavouros) echo LINUX_ENDEAVOUROS_ICON;; + rocky) echo LINUX_ROCKY_ICON;; *) echo LINUX_ICON;; esac ;; From 68104494a7d407d4b8044cb445eea09e111120ac Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 25 Jul 2023 21:42:48 +0200 Subject: [PATCH 052/140] bump version + cleanup (#2391) --- internal/icons.zsh | 2 +- internal/p10k.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index 69a721f0..5beb5f4d 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -497,7 +497,7 @@ function _p9k_init_icons() { LINUX_RHEL_ICON '\uF316'$s #  LINUX_AMZN_ICON '\uF270'$s #  LINUX_ENDEAVOUROS_ICON '\UF322'$s #  - LINUX_ROCKY_ICON '\UF32b'$s #  + LINUX_ROCKY_ICON '\UF32B'$s #  LINUX_ICON '\uF17C' #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c3d96561..be6c2e9f 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9401,7 +9401,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.5 +typeset -g P9K_VERSION=1.19.6 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From a8fa0e2a1b67513331f19dab96de92333ad832f5 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Wed, 26 Jul 2023 17:07:17 +0000 Subject: [PATCH 053/140] Add documentation explaining lack of support for skipHash libgit2 does not support skipHash which causes the prompt to be incorrect for repos that have it toggled. Add the documentation for this gap. fixes #2387 --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index f5713b64..fa5fa267 100644 --- a/README.md +++ b/README.md @@ -1511,6 +1511,7 @@ Powerlevel10k are released. This may change in the future but not soon. - [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) +- [Git status looks incorrect](#git-status-looks-incorrect) ### Question mark in prompt @@ -2020,3 +2021,15 @@ 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 ``` + +### Git status looks incorrect + +Powerlevel10k uses [gitstatus](https://github.com/romkatv/gitstatus) to provide a much faster response to traditional `git status`. +The project relies on the [libgit2](https://github.com/libgit2/libgit2) library however which has some gaps in it's implementation. + +#### skipHash not supported + +If your `.git/config` has `skipHash` enabled, then you will likely see an incorrect status prompt as this is not supported +by libgit2 at the moment. [issue](https://github.com/libgit2/libgit2/issues/6531) + +Note: `skipHash` can be set by implicitly by other configuration toggles such as `feature.manyFiles` From 9bb15e9ffbf43663a77949ea31d6f18c74e8981c Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 26 Jul 2023 19:24:52 +0200 Subject: [PATCH 054/140] docs: rephrase "Git status looks incorrect" section --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fa5fa267..5fa806c6 100644 --- a/README.md +++ b/README.md @@ -1511,7 +1511,7 @@ Powerlevel10k are released. This may change in the future but not soon. - [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) -- [Git status looks incorrect](#git-status-looks-incorrect) +- [Incorrect git status in prompt](#incorrect-git-status-in-prompt) ### Question mark in prompt @@ -2022,14 +2022,15 @@ Some fonts have this incorrect dotted icon in bold typeface. There are two ways typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' # not bold ``` -### Git status looks incorrect +### Incorrect git status in prompt -Powerlevel10k uses [gitstatus](https://github.com/romkatv/gitstatus) to provide a much faster response to traditional `git status`. -The project relies on the [libgit2](https://github.com/libgit2/libgit2) library however which has some gaps in it's implementation. +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. -#### skipHash not supported - -If your `.git/config` has `skipHash` enabled, then you will likely see an incorrect status prompt as this is not supported -by libgit2 at the moment. [issue](https://github.com/libgit2/libgit2/issues/6531) - -Note: `skipHash` can be set by implicitly by other configuration toggles such as `feature.manyFiles` +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 ceratin git features, such as `manyFiles`. From f851f41fc14d5bd66266b4b4af917d50c1c8b7fe Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 29 Jul 2023 17:01:40 +0200 Subject: [PATCH 055/140] remove MULTIBYTE requirement from the configuration wizard (#2397) --- README.md | 13 +++++++++---- internal/configure.zsh | 1 - internal/wizard.zsh | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5fa806c6..f819c204 100644 --- a/README.md +++ b/README.md @@ -1696,10 +1696,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 diff --git a/internal/configure.zsh b/internal/configure.zsh index 3e880f23..0e13bdec 100644 --- a/internal/configure.zsh +++ b/internal/configure.zsh @@ -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 } diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 87c45378..c7a03844 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -2107,7 +2107,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 From 717f9a1881c1bd179658951b8628f1b395c1cb11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Thu, 10 Aug 2023 09:31:37 +0200 Subject: [PATCH 056/140] fix typos in docs and comments --- README.md | 4 ++-- internal/p10k.zsh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f819c204..3fdb339f 100644 --- a/README.md +++ b/README.md @@ -1187,7 +1187,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. @@ -2038,4 +2038,4 @@ 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 ceratin git features, such as `manyFiles`. +when activating certain git features, such as `manyFiles`. diff --git a/internal/p10k.zsh b/internal/p10k.zsh index be6c2e9f..2514ae5d 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -532,7 +532,7 @@ _p9k_get_icon() { _p9k_translate_color() { if [[ $1 == <-> ]]; then # decimal color code: 255 _p9k__ret=${(l.3..0.)1} - elif [[ $1 == '#'[[:xdigit:]]## ]]; then # hexademical color code: #ffffff + elif [[ $1 == '#'[[:xdigit:]]## ]]; then # hexadecimal color code: #ffffff _p9k__ret=${${(L)1}//ı/i} else # named color: red # Strip prifixes if there are any. @@ -2420,7 +2420,7 @@ function _p9k_cached_cmd() { } ################################################################ -# Segment to diplay Node version +# Segment to display Node version prompt_node_version() { _p9k_upglob package.json -. local -i idx=$? @@ -3718,7 +3718,7 @@ function +vi-hg-bookmarks() { if [[ -n "${hgbmarks[@]}" ]]; then hook_com[hg-bookmark-string]=" $(print_icon 'VCS_BOOKMARK_ICON')${hgbmarks[@]}" - # To signal that we want to use the sting we just generated, set the special + # To signal that we want to use the string we just generated, set the special # variable `ret' to something other than the default zero: ret=1 return 0 @@ -3962,7 +3962,7 @@ function _p9k_vcs_render() { fi # It's weird that removing vcs-detect-changes from POWERLEVEL9K_VCS_GIT_HOOKS gets rid - # of the GIT icon. That's what vcs_info does, so we do the same in the name of compatiblity. + # of the GIT icon. That's what vcs_info does, so we do the same in the name of compatibility. _p9k_vcs_icon icon=$_p9k__ret fi From 22cb2f79ddb89a368dd823e815fa1b0587ff1b6a Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 10 Aug 2023 09:32:33 +0200 Subject: [PATCH 057/140] Squashed 'gitstatus/' changes from 4b47ca047..abb4f6a52 abb4f6a52 fix typos in docs and comments 958ae4e6d docs: explicitly mention that core.fsmonitor was disable in git benchmarks (#370) git-subtree-dir: gitstatus git-subtree-split: abb4f6a5225d12f51ffd8196060804b0c770482e --- README.md | 4 ++-- gitstatus.plugin.sh | 2 +- gitstatus.plugin.zsh | 2 +- src/check.h | 2 +- src/dir.h | 2 +- src/options.cc | 6 +++--- src/options.h | 2 +- src/repo.cc | 2 +- src/tag_db.cc | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 82a19981..a6631f63 100644 --- a/README.md +++ b/README.md @@ -255,7 +255,7 @@ repository was checked out to an ext4 filesystem on M.2 SSD. Three functionally equivalent tools for computing git status were benchmarked: * `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 +381,7 @@ generated with the same tools and the same flags as the profile of libgit2. Since both profiles were generated from the same workload, absolute numbers can be compared. We can see that gitstatusd took 62 seconds in total compared to libgit2's 232 seconds. System calls at the -core of the algorithm are cleary visible. `__GI___fxstatat` is a flavor of `stat()`, and the other +core of the algorithm are clearly visible. `__GI___fxstatat` is a flavor of `stat()`, and the other three calls -- `__libc_openat64`, `__libc_close` and `__GI___fxstat` are responsible for opening directories and finding untracked files. Notice that there is almost nothing else in the profile apart from these calls. The rest of the code accounts for 3.77 seconds of CPU time -- 32 times less diff --git a/gitstatus.plugin.sh b/gitstatus.plugin.sh index 37b78f44..bfe16dc2 100644 --- a/gitstatus.plugin.sh +++ b/gitstatus.plugin.sh @@ -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]... # diff --git a/gitstatus.plugin.zsh b/gitstatus.plugin.zsh index 228fea74..b74396d3 100644 --- a/gitstatus.plugin.zsh +++ b/gitstatus.plugin.zsh @@ -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 # diff --git a/src/check.h b/src/check.h index 82dceae1..682675a2 100644 --- a/src/check.h +++ b/src/check.h @@ -23,7 +23,7 @@ #include // 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(0), (!!(cond)) ? static_cast(0) : LOG(FATAL) << #cond << ": " diff --git a/src/dir.h b/src/dir.h index 4d4cf3da..2a7533a3 100644 --- a/src/dir.h +++ b/src/dir.h @@ -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 diff --git a/src/options.cc b/src/options.cc index 46f3845c..b7abe5db 100644 --- a/src/options.cc +++ b/src/options.cc @@ -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" diff --git a/src/options.h b/src/options.h index fd561e11..bb373155 100644 --- a/src/options.h +++ b/src/options.h @@ -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 diff --git a/src/repo.cc b/src/repo.cc index d7ea7d3e..a81594a4 100644 --- a/src/repo.cc +++ b/src/repo.cc @@ -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(); diff --git a/src/tag_db.cc b/src/tag_db.cc index 52cbaede..8bd445c7 100644 --- a/src/tag_db.cc +++ b/src/tag_db.cc @@ -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); } From 9401ed17c0a8c3d1654214a204b8d5b5f7ccf386 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 10 Aug 2023 11:48:54 +0200 Subject: [PATCH 058/140] Squashed 'gitstatus/' changes from abb4f6a52..bdaad2e8d bdaad2e8d Makefile: remove the explicit check for the existence of $(CXX) 6d32e0272 Merge branch 'criadoperez-fix/makefile' c0e3c250e improved Makefile git-subtree-dir: gitstatus git-subtree-split: bdaad2e8d0e6e2f9928e067c85de8096b87e21fa --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 450d5ea0..fede08af 100644 --- a/Makefile +++ b/Makefile @@ -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" From d8041e4700ace779aaf42e19c3de2d25a14dbae8 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 15 Aug 2023 10:30:02 +0200 Subject: [PATCH 059/140] Squashed 'gitstatus/' changes from bdaad2e8d..38d35b959 38d35b959 cleanup 7e7b5e807 bash prompt: set PROMPT_COMMAND in a nicer and more robust manner (#403) 7ee9227de Merge branch 'samiam-append_prompt' 198ed58ce Revert "Update README to append to PROMPT_COMMAND" 8b6a229fa Switch to using var assignment for backward compatibility 693f9efa0 Update README to append to PROMPT_COMMAND a48175ce1 Append to PROMPT_COMMAND to play nice with other prompt programs git-subtree-dir: gitstatus git-subtree-split: 38d35b95926e09d07b8cf78edade7cee7a9a1dcf --- gitstatus.prompt.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gitstatus.prompt.sh b/gitstatus.prompt.sh index 8ee28de0..f54c11ac 100644 --- a/gitstatus.prompt.sh +++ b/gitstatus.prompt.sh @@ -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. From 011b8469ab716d7d6fd1dc050ebdff81b6b830b0 Mon Sep 17 00:00:00 2001 From: Nanda Lopes Date: Sun, 27 Aug 2023 10:42:57 -0300 Subject: [PATCH 060/140] typo: s/.tool-version/.tool-versions/ in all configs --- config/p10k-classic.zsh | 2 +- config/p10k-lean-8colors.zsh | 2 +- config/p10k-lean.zsh | 2 +- config/p10k-rainbow.zsh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index aacb22d4..5ea8faec 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -242,7 +242,7 @@ .java-version .perl-version .php-version - .tool-version + .tool-versions .shorten_folder_marker .svn .terraform diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 9d1d3003..38328c4e 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -233,7 +233,7 @@ .java-version .perl-version .php-version - .tool-version + .tool-versions .shorten_folder_marker .svn .terraform diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 1581c170..7cb97e90 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -233,7 +233,7 @@ .java-version .perl-version .php-version - .tool-version + .tool-versions .shorten_folder_marker .svn .terraform diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 3fe2dfaf..ab36838f 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -242,7 +242,7 @@ .java-version .perl-version .php-version - .tool-version + .tool-versions .shorten_folder_marker .svn .terraform From f8595a35bf062279a639b6bdbecc478c18c3f009 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 7 Sep 2023 13:58:03 +0200 Subject: [PATCH 061/140] use powerlevel10k from homebrew/core when installing with brew --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3fdb339f..4eb75685 100644 --- a/README.md +++ b/README.md @@ -509,7 +509,7 @@ Add `plug "romkatv/powerlevel10k"` to `~/.zshrc`. ### Homebrew ```zsh -brew install romkatv/powerlevel10k/powerlevel10k +brew install powerlevel10k echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc ``` @@ -894,8 +894,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). From be4c68fd0a6cc139cb02e24294c96a2a5e50576d Mon Sep 17 00:00:00 2001 From: Jussi Timperi <236182+Ban3@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:11:37 +0300 Subject: [PATCH 062/140] add Guix System icon (#2424) --- internal/icons.zsh | 7 +++++++ internal/p10k.zsh | 1 + internal/wizard.zsh | 1 + 3 files changed, 9 insertions(+) diff --git a/internal/icons.zsh b/internal/icons.zsh index 5beb5f4d..616b9e49 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -74,6 +74,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON '\uE271'$s #  LINUX_ENDEAVOUROS_ICON '\uE271'$s #  LINUX_ROCKY_ICON '\uE271'$s #  + LINUX_GUIX_ICON '\uE271'$s #  SUNOS_ICON '\U1F31E'$q # 🌞 HOME_ICON '\uE12C'$s #  HOME_SUB_ICON '\uE18D'$s #  @@ -217,6 +218,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON '\uF17C'$s #  LINUX_ENDEAVOUROS_ICON '\uF17C'$s #  LINUX_ROCKY_ICON '\uF17C'$s #  + LINUX_GUIX_ICON '\uF17C'$s #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  HOME_SUB_ICON '\uF07C'$s #  @@ -361,6 +363,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_ENDEAVOUROS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_ROCKY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" + LINUX_GUIX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" 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}" @@ -498,6 +501,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON '\uF270'$s #  LINUX_ENDEAVOUROS_ICON '\UF322'$s #  LINUX_ROCKY_ICON '\UF32B'$s #  + LINUX_GUIX_ICON '\UF325'$s #  LINUX_ICON '\uF17C' #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  @@ -638,6 +642,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON '\uF270'$s #  LINUX_ENDEAVOUROS_ICON '\uF17C' #  LINUX_ROCKY_ICON '\uF17C' #  + LINUX_GUIX_ICON '\uF325'$s #  LINUX_ICON '\uF17C' #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  @@ -776,6 +781,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON 'amzn' LINUX_ENDEAVOUROS_ICON 'edvos' LINUX_ROCKY_ICON 'rocky' + LINUX_GUIX_ICON 'guix' SUNOS_ICON 'sunos' HOME_ICON '' HOME_SUB_ICON '' @@ -915,6 +921,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON 'Amzn' LINUX_ENDEAVOUROS_ICON 'Edv' LINUX_ROCKY_ICON 'Roc' + LINUX_GUIX_ICON 'Guix' SUNOS_ICON 'Sun' HOME_ICON '' HOME_SUB_ICON '' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 2514ae5d..e4b0b328 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8581,6 +8581,7 @@ function _p9k_init_cacheable() { amzn) _p9k_set_os Linux LINUX_AMZN_ICON;; endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;; rocky) _p9k_set_os Linux LINUX_ROCKY_ICON;; + guix) _p9k_set_os Linux LINUX_GUIX_ICON;; *) _p9k_set_os Linux LINUX_ICON;; esac ;; diff --git a/internal/wizard.zsh b/internal/wizard.zsh index c7a03844..589e0cfe 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1157,6 +1157,7 @@ function os_icon_name() { amzn) echo LINUX_AMZN_ICON;; endeavouros) echo LINUX_ENDEAVOUROS_ICON;; rocky) echo LINUX_ROCKY_ICON;; + guix) echo LINUX_GUIX_ICON;; *) echo LINUX_ICON;; esac ;; From 215b20e08714ba0539a83be2723ff8ab17702c88 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 8 Sep 2023 12:16:35 +0200 Subject: [PATCH 063/140] bump version --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index e4b0b328..1193540e 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9402,7 +9402,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.6 +typeset -g P9K_VERSION=1.19.7 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 873c4ff09c559a507d33e528df7e27a8a48705d7 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 9 Sep 2023 11:41:14 +0200 Subject: [PATCH 064/140] fix the path to powerlevel10k when installing with homebrew (#2429) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4eb75685..6ff6f449 100644 --- a/README.md +++ b/README.md @@ -510,7 +510,7 @@ Add `plug "romkatv/powerlevel10k"` to `~/.zshrc`. ```zsh brew install powerlevel10k -echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc +echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc ``` ### Arch Linux From 862440ae112603c8e2d202f6edb94eeaa1509120 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 9 Oct 2023 10:17:06 +0200 Subject: [PATCH 065/140] add an icon for azure to vcs (#2447) --- internal/icons.zsh | 7 +++++++ internal/p10k.zsh | 15 +++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index 616b9e49..308a01d8 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -105,6 +105,7 @@ 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_HG_ICON '\uE1C3 ' #  VCS_SVN_ICON 'svn'$q RUST_ICON 'R' @@ -245,6 +246,7 @@ 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_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON 'svn'$q RUST_ICON '\uE6A8' #  @@ -390,6 +392,7 @@ 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_HG_ICON "${CODEPOINT_OF_AWESOME_FLASK:+\\u$CODEPOINT_OF_AWESOME_FLASK }" VCS_SVN_ICON 'svn'$q RUST_ICON '\uE6A8' #  @@ -529,6 +532,7 @@ function _p9k_init_icons() { VCS_GIT_GITHUB_ICON '\uF113 ' #  VCS_GIT_BITBUCKET_ICON '\uE703 ' #  VCS_GIT_GITLAB_ICON '\uF296 ' #  + VCS_GIT_AZURE_ICON '\UF0805 ' # 󰠅 VCS_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON '\uE72D'$q #  RUST_ICON '\uE7A8'$q #  @@ -670,6 +674,7 @@ 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_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON '\uE72D'$q #  RUST_ICON '\uE7A8'$q #  @@ -808,6 +813,7 @@ function _p9k_init_icons() { VCS_GIT_GITHUB_ICON '' VCS_GIT_BITBUCKET_ICON '' VCS_GIT_GITLAB_ICON '' + VCS_GIT_AZURE_ICON '' VCS_HG_ICON '' VCS_SVN_ICON '' RUST_ICON 'rust' @@ -948,6 +954,7 @@ function _p9k_init_icons() { VCS_GIT_GITHUB_ICON '' VCS_GIT_BITBUCKET_ICON '' VCS_GIT_GITLAB_ICON '' + VCS_GIT_AZURE_ICON '' VCS_HG_ICON '' VCS_SVN_ICON '' RUST_ICON 'R' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 1193540e..d105665e 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3874,11 +3874,14 @@ function _p9k_vcs_status_purge() { function _p9k_vcs_icon() { case "$VCS_STATUS_REMOTE_URL" in - *github*) _p9k__ret=VCS_GIT_GITHUB_ICON;; - *bitbucket*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; - *stash*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; - *gitlab*) _p9k__ret=VCS_GIT_GITLAB_ICON;; - *) _p9k__ret=VCS_GIT_ICON;; + *github*) _p9k__ret=VCS_GIT_GITHUB_ICON;; + *bitbucket*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; + *stash*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; + *gitlab*) _p9k__ret=VCS_GIT_GITLAB_ICON;; + # https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate + (|*@)vs-ssh.visualstudio.com(|:*)) _p9k__ret=VCS_GIT_AZURE_ICON;; # old + (|*@)ssh.dev.azure.com(|:*)) _p9k__ret=VCS_GIT_AZURE_ICON;; # new + *) _p9k__ret=VCS_GIT_ICON;; esac } @@ -9402,7 +9405,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.7 +typeset -g P9K_VERSION=1.19.8 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From c7fa7d6748cf6935ff7aeaa4d0d76a1ed2bfb852 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 23 Oct 2023 10:09:41 +0200 Subject: [PATCH 066/140] make rust_version segment compatible with the new rustup toolchain file (#2413) --- internal/p10k.zsh | 105 ++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 59 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index d105665e..dbc69c41 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3186,70 +3186,57 @@ instant_prompt_root_indicator() { prompt_root_indicator; } ################################################################ # Segment to display Rust version number prompt_rust_version() { - unset P9K_RUST_VERSION - if (( _POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY )); then - _p9k_upglob Cargo.toml -. && return - fi - local rustc=$commands[rustc] toolchain deps=() - if (( $+commands[ldd] )); then - if ! _p9k_cache_stat_get $0_so $rustc; then - local line so - for line in "${(@f)$(ldd $rustc 2>/dev/null)}"; do - [[ $line == (#b)[[:space:]]#librustc_driver[^[:space:]]#.so' => '(*)' (0x'[[:xdigit:]]#')' ]] || continue - so=$match[1] - break - done - _p9k_cache_stat_set "$so" - fi - deps+=$_p9k__cache_val[1] - fi - if (( $+commands[rustup] )); then - local rustup=$commands[rustup] - local rustup_home=${RUSTUP_HOME:-~/.rustup} - local cfg=($rustup_home/settings.toml(.N)) - deps+=($cfg $rustup_home/update-hashes/*(.N)) - if [[ -z ${toolchain::=$RUSTUP_TOOLCHAIN} ]]; then - if ! _p9k_cache_stat_get $0_overrides $rustup $cfg; then - local lines=(${(f)"$(rustup override list 2>/dev/null)"}) - if [[ $lines[1] == "no overrides" ]]; then - _p9k_cache_stat_set - else - local MATCH - local keys=(${(@)${lines%%[[:space:]]#[^[:space:]]#}/(#m)*/${(b)MATCH}/}) - local vals=(${(@)lines/(#m)*/$MATCH[(I)/] ${MATCH##*[[:space:]]}}) - _p9k_cache_stat_set ${keys:^vals} - fi - fi - local -A overrides=($_p9k__cache_val) - _p9k_upglob rust-toolchain -. - local dir=$_p9k__parent_dirs[$?] - local -i n m=${dir[(I)/]} - local pair - for pair in ${overrides[(K)$_p9k__cwd/]}; do - n=${pair%% *} - (( n <= m )) && continue - m=n - toolchain=${pair#* } - done - if [[ -z $toolchain && -n $dir ]]; then - _p9k_read_word $dir/rust-toolchain - toolchain=$_p9k__ret - fi - fi - fi - if ! _p9k_cache_stat_get $0_v$toolchain $rustc $deps; then - _p9k_cache_stat_set "$($rustc --version 2>/dev/null)" - fi - local v=${${_p9k__cache_val[1]#rustc }%% *} - [[ -n $v ]] || return - typeset -g P9K_RUST_VERSION=$_p9k__cache_val[1] - _p9k_prompt_segment "$0" "darkorange" "$_p9k_color1" 'RUST_ICON' 0 '' "${v//\%/%%}" + local -i len=$#_p9k__prompt _p9k__has_upglob + _p9k_prompt_segment $0 darkorange $_p9k_color1 RUST_ICON 1 '$P9K_RUST_VERSION' '${P9K_RUST_VERSION//\%/%%}' + (( _p9k__has_upglob )) || typeset -g "_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]"=$_p9k__prompt[len+1,-1] } -_p9k_prompt_rust_version_init() { +function _p9k_prompt_rust_version_init() { + _p9k__async_segments_compute+='_p9k_rust_version_prefetch' typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[rustc]' } +_p9k_rust_version_prefetch() { + local rustc=$commands[rustc] + if [[ -z $rustc ]] || + { (( _POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY )) && _p9k_upglob Cargo.toml -. }; then + unset P9K_RUST_VERSION + return + fi + _p9k_worker_invoke rust_version \ + "_p9k_prompt_rust_version_compute ${(q)P9K_RUST_VERSION} ${(q)rustc} ${(q)_p9k__cwd_a}" +} + +_p9k_prompt_rust_version_compute() { + _p9k_worker_async \ + "_p9k_prompt_rust_version_async ${(q)1} ${(q)2} ${(q)3}" \ + _p9k_prompt_rust_version_sync +} + +_p9k_prompt_rust_version_async() { + typeset -g P9K_RUST_VERSION=$1 + local rustc=$2 cwd=$3 v + if pushd -q -- $cwd; then + { + v=${${"$($rustc --version)"#rustc }%% *} || v= + } always { + popd -q + } + fi + + [[ $v != $P9K_RUST_VERSION ]] || return + typeset -g P9K_RUST_VERSION=$v + _p9k_print_params P9K_RUST_VERSION + echo -E - 'reset=1' +} + +_p9k_prompt_rust_version_sync() { + if [[ -n $REPLY ]]; then + eval $REPLY + _p9k_worker_reply $REPLY + fi +} + # RSpec test ratio prompt_rspec_stats() { if [[ -d app && -d spec ]]; then From 430616734aa06ff3def48cb511fb43db7466a64e Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 23 Oct 2023 10:44:15 +0200 Subject: [PATCH 067/140] make terraform_version compatible with tfenv (#2049) --- internal/p10k.zsh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index dbc69c41..09985e0b 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5021,12 +5021,16 @@ _p9k_prompt_terraform_init() { } function prompt_terraform_version() { - _p9k_cached_cmd 0 '' terraform --version || return - local v=${_p9k__ret#Terraform v} - (( $#v < $#_p9k__ret )) || return - v=${v%%$'\n'*} + local v cfg terraform=${commands[terraform]} + _p9k_upglob .terraform-version -. || cfg=$_p9k__parent_dirs[$?]/.terraform-version + if _p9k_cache_stat_get $0.$TFENV_TERRAFORM_VERSION $terraform $cfg; then + v=$_p9k__cache_val[1] + else + v=${${"$(terraform --version 2>/dev/null)"#Terraform v}%%$'\n'*} || v= + _p9k_cache_stat_set "$v" + fi [[ -n $v ]] || return - _p9k_prompt_segment $0 $_p9k_color1 blue TERRAFORM_ICON 0 '' $v + _p9k_prompt_segment $0 $_p9k_color1 blue TERRAFORM_ICON 0 '' ${v//\%/%%} } _p9k_prompt_terraform_version_init() { From 18f0bec1bbdcd595a6cc8155dc09c44acee06d32 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 1 Nov 2023 10:37:54 +0100 Subject: [PATCH 068/140] use newer icons for azure and azure devops (#2472) --- internal/icons.zsh | 4 ++-- internal/p10k.zsh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index 308a01d8..f01b991d 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -532,7 +532,7 @@ function _p9k_init_icons() { VCS_GIT_GITHUB_ICON '\uF113 ' #  VCS_GIT_BITBUCKET_ICON '\uE703 ' #  VCS_GIT_GITLAB_ICON '\uF296 ' #  - VCS_GIT_AZURE_ICON '\UF0805 ' # 󰠅 + VCS_GIT_AZURE_ICON '\uEBE8 ' #  VCS_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON '\uE72D'$q #  RUST_ICON '\uE7A8'$q #  @@ -560,7 +560,7 @@ function _p9k_init_icons() { PROXY_ICON '\u2194' # ↔ DOTNET_ICON '\uE77F' #  DOTNET_CORE_ICON '\uE77F' #  - AZURE_ICON '\UF0805' # 󰠅 + AZURE_ICON '\uEBD8 ' #  DIRENV_ICON '\u25BC' # ▼ FLUTTER_ICON 'F' # F GCLOUD_ICON '\UF02AD' # 󰊭 diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 09985e0b..aea27f4c 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9396,7 +9396,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.8 +typeset -g P9K_VERSION=1.19.9 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 174ce9bf0166c657404a21f4dc9608da935f7325 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 1 Nov 2023 10:44:43 +0100 Subject: [PATCH 069/140] recognize azure devops git remote HTTPS URLs (#2472) --- internal/p10k.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index aea27f4c..e50bcce5 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3865,9 +3865,11 @@ function _p9k_vcs_icon() { *bitbucket*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; *stash*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; *gitlab*) _p9k__ret=VCS_GIT_GITLAB_ICON;; + # Azure DevOps: visualstudio.com is the old hostname, dev.azure.com is the new one. # https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate - (|*@)vs-ssh.visualstudio.com(|:*)) _p9k__ret=VCS_GIT_AZURE_ICON;; # old - (|*@)ssh.dev.azure.com(|:*)) _p9k__ret=VCS_GIT_AZURE_ICON;; # new + (|*@|*.)(visualstudio.com|dev.azure.com)(|:*|/*)) + _p9k__ret=VCS_GIT_AZURE_ICON + ;; # old *) _p9k__ret=VCS_GIT_ICON;; esac } @@ -9396,7 +9398,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.9 +typeset -g P9K_VERSION=1.19.10 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 92bee796428eac486c8766e7fc7c2a2e4b712dfd Mon Sep 17 00:00:00 2001 From: hasecilu Date: Thu, 23 Nov 2023 16:49:36 -0600 Subject: [PATCH 070/140] Add icons for VCS_GIT usage The icons are from organizations that manage a git instance by themselves. --- internal/icons.zsh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/internal/icons.zsh b/internal/icons.zsh index f01b991d..1865b836 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -247,6 +247,15 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '\uF171 ' #  VCS_GIT_GITLAB_ICON '\uF296 ' #  VCS_GIT_AZURE_ICON '\u2601 ' # ☁ + VCS_GIT_ARCH_ICON '\uF303 ' #  + VCS_GIT_CODEBERG_ICON '\uF330 ' #  + VCS_GIT_DEBIAN_ICON '\uF306 ' #  + VCS_GIT_FREEBSD_ICON '\UF30C ' #  + VCS_GIT_FREEDESKTOP_ICON '\uF360 ' #  + VCS_GIT_GNOME_ICON '\uF361 ' #  + VCS_GIT_GNU_ICON '\uE779 ' #  + VCS_GIT_KDE_ICON '\uF332 ' #  + VCS_GIT_LINUX_ICON '\uF17C ' #  VCS_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON 'svn'$q RUST_ICON '\uE6A8' #  @@ -533,6 +542,15 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '\uE703 ' #  VCS_GIT_GITLAB_ICON '\uF296 ' #  VCS_GIT_AZURE_ICON '\uEBE8 ' #  + VCS_GIT_ARCH_ICON '\uF303 ' #  + VCS_GIT_CODEBERG_ICON '\uF330 ' #  + VCS_GIT_DEBIAN_ICON '\uF306 ' #  + VCS_GIT_FREEBSD_ICON '\UF30C ' #  + VCS_GIT_FREEDESKTOP_ICON '\uF360 ' #  + VCS_GIT_GNOME_ICON '\uF361 ' #  + VCS_GIT_GNU_ICON '\uE779 ' #  + VCS_GIT_KDE_ICON '\uF332 ' #  + VCS_GIT_LINUX_ICON '\uF17C ' #  VCS_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON '\uE72D'$q #  RUST_ICON '\uE7A8'$q #  @@ -675,6 +693,15 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '\uE703 ' #  VCS_GIT_GITLAB_ICON '\uF296 ' #  VCS_GIT_AZURE_ICON '\uFD03 ' # ﴃ + VCS_GIT_ARCH_ICON '\uF303 ' #  + VCS_GIT_CODEBERG_ICON '\uF330 ' #  + VCS_GIT_DEBIAN_ICON '\uF306 ' #  + VCS_GIT_FREEBSD_ICON '\UF30C ' #  + VCS_GIT_FREEDESKTOP_ICON '\uF360 ' #  + VCS_GIT_GNOME_ICON '\uF361 ' #  + VCS_GIT_GNU_ICON '\uE779 ' #  + VCS_GIT_KDE_ICON '\uF332 ' #  + VCS_GIT_LINUX_ICON '\uF17C ' #  VCS_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON '\uE72D'$q #  RUST_ICON '\uE7A8'$q #  @@ -814,6 +841,15 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '' VCS_GIT_GITLAB_ICON '' VCS_GIT_AZURE_ICON '' + VCS_GIT_ARCH_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_HG_ICON '' VCS_SVN_ICON '' RUST_ICON 'rust' @@ -955,6 +991,15 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '' VCS_GIT_GITLAB_ICON '' VCS_GIT_AZURE_ICON '' + VCS_GIT_ARCH_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_HG_ICON '' VCS_SVN_ICON '' RUST_ICON 'R' From 47d5397baa7473db2b4d8f9c59cef8fa51c78376 Mon Sep 17 00:00:00 2001 From: hasecilu Date: Thu, 23 Nov 2023 16:55:36 -0600 Subject: [PATCH 071/140] Add various remote git server instances Currently only icons for big providers of git hosting service are available. Organizations of open source software usually manage their own instances. Adding the remote addresses of some of this organizations will let us to identify via a glyph icon the provider of the source code. --- internal/p10k.zsh | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index e50bcce5..62c71ab3 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3723,7 +3723,27 @@ function +vi-vcs-detect-changes() { elif [[ "$remote" =~ "stash" ]] then vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON' elif [[ "$remote" =~ "gitlab" ]] then - vcs_visual_identifier='VCS_GIT_GITLAB_ICON' + elif [[ "$remote" =~ "archlinux" ]] then + vcs_visual_identifier='VCS_GIT_ARCH_ICON' + if [[ "$remote" =~ "freedesktop" ]] then + vcs_visual_identifier='VCS_GIT_FREEDESKTOP_ICON' + elif [[ "$remote" =~ "gnome" ]] then + vcs_visual_identifier='VCS_GIT_GNOME_ICON' + else + vcs_visual_identifier='VCS_GITLAB_ICON' + fi + elif [[ "$remote" =~ "codeberg" ]] then + vcs_visual_identifier='VCS_GIT_CODEBERG_ICON' + elif [[ "$remote" =~ "debian" ]] then + vcs_visual_identifier='VCS_GIT_DEBIAN_ICON' + elif [[ "$remote" =~ "freebsd" ]] then + vcs_visual_identifier='VCS_GIT_FREEBSD_ICON' + elif [[ "$remote" =~ "gnu" ]] then + vcs_visual_identifier='VCS_GIT_GNU_ICON' + elif [[ "$remote" =~ "kde" ]] then + vcs_visual_identifier='VCS_GIT_KDE_ICON' + elif [[ "$remote" =~ "kernel" ]] then + vcs_visual_identifier='VCS_GIT_LINUX_ICON' else vcs_visual_identifier='VCS_GIT_ICON' fi @@ -3864,7 +3884,16 @@ function _p9k_vcs_icon() { *github*) _p9k__ret=VCS_GIT_GITHUB_ICON;; *bitbucket*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; *stash*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; + *archlinux*) _p9k__ret=VCS_GIT_ARCH_ICON;; + *freedesktop*) _p9k__ret=VCS_GIT_FREEDESKTOP_ICON;; + *gnome*) _p9k__ret=VCS_GIT_GNOME_ICON;; *gitlab*) _p9k__ret=VCS_GIT_GITLAB_ICON;; + *codeberg*) _p9k__ret=VCS_GIT_CODEBERG_ICON;; + *debian*) _p9k__ret=VCS_GIT_DEBIAN_ICON;; + (#i)*freebsd*) _p9k__ret=VCS_GIT_FREEBSD_ICON;; + *gnu*) _p9k__ret=VCS_GIT_GNU_ICON;; + *kde*) _p9k__ret=VCS_GIT_KDE_ICON;; + *kernel*) _p9k__ret=VCS_GIT_LINUX_ICON;; # Azure DevOps: visualstudio.com is the old hostname, dev.azure.com is the new one. # https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate (|*@|*.)(visualstudio.com|dev.azure.com)(|:*|/*)) From 211c90343f51884ed1655de4284ebe12342db9d8 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 30 Nov 2023 09:47:34 +0100 Subject: [PATCH 072/140] wizard: recognize `source -- ~.p10k.zsh` in .zshrc --- internal/wizard.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 589e0cfe..b87f0dfc 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -2026,7 +2026,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' From 096a731db3947caa69f350243f5f2ea0ce2da47e Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 2 Dec 2023 09:44:17 +0100 Subject: [PATCH 073/140] define usable defaults for VCS_*_ICON (#2493) --- internal/icons.zsh | 56 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index 1865b836..ebf017a2 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -106,6 +106,15 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '\uE20E ' # VCS_GIT_GITLAB_ICON '\uE20E ' # VCS_GIT_AZURE_ICON '\uE20E ' # + VCS_GIT_ARCH_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_HG_ICON '\uE1C3 ' #  VCS_SVN_ICON 'svn'$q RUST_ICON 'R' @@ -247,15 +256,15 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '\uF171 ' #  VCS_GIT_GITLAB_ICON '\uF296 ' #  VCS_GIT_AZURE_ICON '\u2601 ' # ☁ - VCS_GIT_ARCH_ICON '\uF303 ' #  - VCS_GIT_CODEBERG_ICON '\uF330 ' #  - VCS_GIT_DEBIAN_ICON '\uF306 ' #  - VCS_GIT_FREEBSD_ICON '\UF30C ' #  - VCS_GIT_FREEDESKTOP_ICON '\uF360 ' #  - VCS_GIT_GNOME_ICON '\uF361 ' #  - VCS_GIT_GNU_ICON '\uE779 ' #  - VCS_GIT_KDE_ICON '\uF332 ' #  - VCS_GIT_LINUX_ICON '\uF17C ' #  + VCS_GIT_ARCH_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_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON 'svn'$q RUST_ICON '\uE6A8' #  @@ -402,6 +411,15 @@ function _p9k_init_icons() { 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_ARCH_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_HG_ICON "${CODEPOINT_OF_AWESOME_FLASK:+\\u$CODEPOINT_OF_AWESOME_FLASK }" VCS_SVN_ICON 'svn'$q RUST_ICON '\uE6A8' #  @@ -543,13 +561,17 @@ function _p9k_init_icons() { VCS_GIT_GITLAB_ICON '\uF296 ' #  VCS_GIT_AZURE_ICON '\uEBE8 ' #  VCS_GIT_ARCH_ICON '\uF303 ' #  - VCS_GIT_CODEBERG_ICON '\uF330 ' #  + # v3.1 has \uF330. + VCS_GIT_CODEBERG_ICON '\uF1D3 ' #  VCS_GIT_DEBIAN_ICON '\uF306 ' #  VCS_GIT_FREEBSD_ICON '\UF30C ' #  - VCS_GIT_FREEDESKTOP_ICON '\uF360 ' #  - VCS_GIT_GNOME_ICON '\uF361 ' #  + # v3.1 has \uF360. + VCS_GIT_FREEDESKTOP_ICON '\uF296 ' #  + # v3.1 has \uF361. + VCS_GIT_GNOME_ICON '\uF296 ' #  VCS_GIT_GNU_ICON '\uE779 ' #  - VCS_GIT_KDE_ICON '\uF332 ' #  + # v3.1 has \uF332. + VCS_GIT_KDE_ICON '\uF296 ' #  VCS_GIT_LINUX_ICON '\uF17C ' #  VCS_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON '\uE72D'$q #  @@ -694,13 +716,13 @@ function _p9k_init_icons() { VCS_GIT_GITLAB_ICON '\uF296 ' #  VCS_GIT_AZURE_ICON '\uFD03 ' # ﴃ VCS_GIT_ARCH_ICON '\uF303 ' #  - VCS_GIT_CODEBERG_ICON '\uF330 ' #  + VCS_GIT_CODEBERG_ICON '\uF1D3 ' #  VCS_GIT_DEBIAN_ICON '\uF306 ' #  VCS_GIT_FREEBSD_ICON '\UF30C ' #  - VCS_GIT_FREEDESKTOP_ICON '\uF360 ' #  - VCS_GIT_GNOME_ICON '\uF361 ' #  + VCS_GIT_FREEDESKTOP_ICON '\uF296 ' #  + VCS_GIT_GNOME_ICON '\uF296 ' #  VCS_GIT_GNU_ICON '\uE779 ' #  - VCS_GIT_KDE_ICON '\uF332 ' #  + VCS_GIT_KDE_ICON '\uF296 ' #  VCS_GIT_LINUX_ICON '\uF17C ' #  VCS_HG_ICON '\uF0C3 ' #  VCS_SVN_ICON '\uE72D'$q #  From c39e5304a13760804ee41cce52c4b49946baa2e7 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 2 Dec 2023 09:49:50 +0100 Subject: [PATCH 074/140] add VCS_GIT_GITEA_ICON and VCS_GIT_SOURCEHUT_ICON (#2493) --- internal/icons.zsh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/internal/icons.zsh b/internal/icons.zsh index ebf017a2..87db7cec 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -115,6 +115,8 @@ function _p9k_init_icons() { 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' @@ -265,6 +267,8 @@ function _p9k_init_icons() { 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' #  @@ -420,6 +424,8 @@ function _p9k_init_icons() { 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' #  @@ -573,6 +579,9 @@ function _p9k_init_icons() { # 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 #  @@ -724,6 +733,8 @@ function _p9k_init_icons() { 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 #  @@ -872,6 +883,8 @@ function _p9k_init_icons() { 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' @@ -1022,6 +1035,8 @@ function _p9k_init_icons() { 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' From 9547f228224e73b4b34c365e1937f096b06da830 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 2 Dec 2023 11:50:18 +0100 Subject: [PATCH 075/140] s/VCS_GIT_ARCH_ICON/VCS_GIT_ARCHLINUX_ICON/ (#2493) --- internal/icons.zsh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index 87db7cec..dc3d675e 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -106,7 +106,7 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '\uE20E ' # VCS_GIT_GITLAB_ICON '\uE20E ' # VCS_GIT_AZURE_ICON '\uE20E ' # - VCS_GIT_ARCH_ICON '\uE20E ' # + VCS_GIT_ARCHLINUX_ICON '\uE20E ' # VCS_GIT_CODEBERG_ICON '\uE20E ' # VCS_GIT_DEBIAN_ICON '\uE20E ' # VCS_GIT_FREEBSD_ICON '\uE20E ' # @@ -258,7 +258,7 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '\uF171 ' #  VCS_GIT_GITLAB_ICON '\uF296 ' #  VCS_GIT_AZURE_ICON '\u2601 ' # ☁ - VCS_GIT_ARCH_ICON '\uF1D3 ' #  + VCS_GIT_ARCHLINUX_ICON '\uF1D3 ' #  VCS_GIT_CODEBERG_ICON '\uF1D3 ' #  VCS_GIT_DEBIAN_ICON '\uF1D3 ' #  VCS_GIT_FREEBSD_ICON '\uF1D3 ' #  @@ -415,7 +415,7 @@ function _p9k_init_icons() { 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_ARCH_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }" + 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 }" @@ -566,7 +566,7 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '\uE703 ' #  VCS_GIT_GITLAB_ICON '\uF296 ' #  VCS_GIT_AZURE_ICON '\uEBE8 ' #  - VCS_GIT_ARCH_ICON '\uF303 ' #  + VCS_GIT_ARCHLINUX_ICON '\uF303 ' #  # v3.1 has \uF330. VCS_GIT_CODEBERG_ICON '\uF1D3 ' #  VCS_GIT_DEBIAN_ICON '\uF306 ' #  @@ -724,7 +724,7 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '\uE703 ' #  VCS_GIT_GITLAB_ICON '\uF296 ' #  VCS_GIT_AZURE_ICON '\uFD03 ' # ﴃ - VCS_GIT_ARCH_ICON '\uF303 ' #  + VCS_GIT_ARCHLINUX_ICON '\uF303 ' #  VCS_GIT_CODEBERG_ICON '\uF1D3 ' #  VCS_GIT_DEBIAN_ICON '\uF306 ' #  VCS_GIT_FREEBSD_ICON '\UF30C ' #  @@ -874,7 +874,7 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '' VCS_GIT_GITLAB_ICON '' VCS_GIT_AZURE_ICON '' - VCS_GIT_ARCH_ICON '' + VCS_GIT_ARCHLINUX_ICON '' VCS_GIT_CODEBERG_ICON '' VCS_GIT_DEBIAN_ICON '' VCS_GIT_FREEBSD_ICON '' @@ -1026,7 +1026,7 @@ function _p9k_init_icons() { VCS_GIT_BITBUCKET_ICON '' VCS_GIT_GITLAB_ICON '' VCS_GIT_AZURE_ICON '' - VCS_GIT_ARCH_ICON '' + VCS_GIT_ARCHLINUX_ICON '' VCS_GIT_CODEBERG_ICON '' VCS_GIT_DEBIAN_ICON '' VCS_GIT_FREEBSD_ICON '' From 7fd76370f53f87f956c811766a452c83ced4014b Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 2 Dec 2023 11:56:37 +0100 Subject: [PATCH 076/140] be a lot more strict when matching the remote git URL (#2493) When you choose "Many icons" option in the configuration wizard, git repositories with a remote receive an icon that depends on the remote's URL. In the past the matching of the URL was rather lax: both https://foo.bar/github.com and https://github.com.foo.bar/ were recognized as belonging to github.com. This is no longer the case. If you start seeing the plain "git" icon where you were used to seeing a github/gitlab/etc logo, please open an issue. Make sure to mention the remote URL of your repo. This change also allows you to specify the mapping from remote URLs to icons. Here's an example: typeset -g POWERLEVEL9K_VCS_GIT_REMOTE_ICONS=( '*@my-company.com:*' VCS_GIT_MY_COMPANY_ICON '?*' VCS_GIT_ICON '*' '' ) POWERLEVEL9K_VCS_GIT_MY_COMPANY_ICON='my-company-logo' The matching is done in the specified order: the first match wins. --- internal/p10k.zsh | 100 ++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 57 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 62c71ab3..3c784625 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3714,40 +3714,9 @@ function +vi-hg-bookmarks() { function +vi-vcs-detect-changes() { if [[ "${hook_com[vcs]}" == "git" ]]; then - local remote="$(git ls-remote --get-url 2> /dev/null)" - if [[ "$remote" =~ "github" ]] then - vcs_visual_identifier='VCS_GIT_GITHUB_ICON' - elif [[ "$remote" =~ "bitbucket" ]] then - vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON' - elif [[ "$remote" =~ "stash" ]] then - vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON' - elif [[ "$remote" =~ "gitlab" ]] then - elif [[ "$remote" =~ "archlinux" ]] then - vcs_visual_identifier='VCS_GIT_ARCH_ICON' - if [[ "$remote" =~ "freedesktop" ]] then - vcs_visual_identifier='VCS_GIT_FREEDESKTOP_ICON' - elif [[ "$remote" =~ "gnome" ]] then - vcs_visual_identifier='VCS_GIT_GNOME_ICON' - else - vcs_visual_identifier='VCS_GITLAB_ICON' - fi - elif [[ "$remote" =~ "codeberg" ]] then - vcs_visual_identifier='VCS_GIT_CODEBERG_ICON' - elif [[ "$remote" =~ "debian" ]] then - vcs_visual_identifier='VCS_GIT_DEBIAN_ICON' - elif [[ "$remote" =~ "freebsd" ]] then - vcs_visual_identifier='VCS_GIT_FREEBSD_ICON' - elif [[ "$remote" =~ "gnu" ]] then - vcs_visual_identifier='VCS_GIT_GNU_ICON' - elif [[ "$remote" =~ "kde" ]] then - vcs_visual_identifier='VCS_GIT_KDE_ICON' - elif [[ "$remote" =~ "kernel" ]] then - vcs_visual_identifier='VCS_GIT_LINUX_ICON' - else - vcs_visual_identifier='VCS_GIT_ICON' - fi - + _p9k_vcs_icon "$remote" + vcs_visual_identifier=$_p9k__ret elif [[ "${hook_com[vcs]}" == "hg" ]]; then vcs_visual_identifier='VCS_HG_ICON' elif [[ "${hook_com[vcs]}" == "svn" ]]; then @@ -3880,27 +3849,14 @@ function _p9k_vcs_status_purge() { } function _p9k_vcs_icon() { - case "$VCS_STATUS_REMOTE_URL" in - *github*) _p9k__ret=VCS_GIT_GITHUB_ICON;; - *bitbucket*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; - *stash*) _p9k__ret=VCS_GIT_BITBUCKET_ICON;; - *archlinux*) _p9k__ret=VCS_GIT_ARCH_ICON;; - *freedesktop*) _p9k__ret=VCS_GIT_FREEDESKTOP_ICON;; - *gnome*) _p9k__ret=VCS_GIT_GNOME_ICON;; - *gitlab*) _p9k__ret=VCS_GIT_GITLAB_ICON;; - *codeberg*) _p9k__ret=VCS_GIT_CODEBERG_ICON;; - *debian*) _p9k__ret=VCS_GIT_DEBIAN_ICON;; - (#i)*freebsd*) _p9k__ret=VCS_GIT_FREEBSD_ICON;; - *gnu*) _p9k__ret=VCS_GIT_GNU_ICON;; - *kde*) _p9k__ret=VCS_GIT_KDE_ICON;; - *kernel*) _p9k__ret=VCS_GIT_LINUX_ICON;; - # Azure DevOps: visualstudio.com is the old hostname, dev.azure.com is the new one. - # https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate - (|*@|*.)(visualstudio.com|dev.azure.com)(|:*|/*)) - _p9k__ret=VCS_GIT_AZURE_ICON - ;; # old - *) _p9k__ret=VCS_GIT_ICON;; - esac + local pat icon + for pat icon in "${(@)_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS}"; do + if [[ $1 == $~pat ]]; then + _p9k__ret=$icon + return + fi + done + _p9k__ret= } function _p9k_vcs_render() { @@ -3930,7 +3886,7 @@ function _p9k_vcs_render() { state=CLEAN fi fi - _p9k_vcs_icon + _p9k_vcs_icon "$VCS_STATUS_REMOTE_URL" _p9k_prompt_segment prompt_vcs_$state "${__p9k_vcs_states[$state]}" "$_p9k_color1" "$_p9k__ret" 0 '' "" return 0 fi @@ -3984,7 +3940,7 @@ function _p9k_vcs_render() { # It's weird that removing vcs-detect-changes from POWERLEVEL9K_VCS_GIT_HOOKS gets rid # of the GIT icon. That's what vcs_info does, so we do the same in the name of compatibility. - _p9k_vcs_icon + _p9k_vcs_icon "$VCS_STATUS_REMOTE_URL" icon=$_p9k__ret fi @@ -7435,6 +7391,36 @@ _p9k_init_params() { _p9k_declare -b POWERLEVEL9K_VCS_CONFLICTED_STATE 0 _p9k_declare -b POWERLEVEL9K_HIDE_BRANCH_ICON 0 _p9k_declare -b POWERLEVEL9K_VCS_HIDE_TAGS 0 + _p9k_declare -a POWERLEVEL9K_VCS_GIT_REMOTE_ICONS + if (( $+_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS )); then + (( $#_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS & 1 )) && _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS+=('') + else + local domain= icon= domain2icon=( + 'archlinux.org' VCS_GIT_ARCHLINUX_ICON + 'dev.azure.com|visualstudio.com' VCS_GIT_AZURE_ICON + 'bitbucket.org' VCS_GIT_BITBUCKET_ICON + 'codeberg.org' VCS_GIT_CODEBERG_ICON + 'debian.org' VCS_GIT_DEBIAN_ICON + 'freebsd.org' VCS_GIT_FREEBSD_ICON + 'freedesktop.org' VCS_GIT_FREEDESKTOP_ICON + 'gitea.com|gitea.io' VCS_GIT_GITEA_ICON + 'github.com' VCS_GIT_GITHUB_ICON + 'gitlab.com' VCS_GIT_GITLAB_ICON + 'gnome.org' VCS_GIT_GNOME_ICON + 'gnu.org' VCS_GIT_GNU_ICON + 'kde.org' VCS_GIT_KDE_ICON + 'kernel.org' VCS_GIT_LINUX_ICON + 'sourcehut.org' VCS_GIT_SOURCEHUT_ICON + ) + typeset -ga _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS + for domain icon in "${domain2icon[@]}"; do + _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS+=( + '(|[A-Za-z0-9][A-Za-z0-9+.-]#://)(|[^:/?#]#[.@])((#i)'$domain')(|[/:?#]*)' + $icon + ) + done + _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS+=('*' VCS_GIT_ICON) + fi _p9k_declare -i POWERLEVEL9K_CHANGESET_HASH_LENGTH 8 # Specifies the maximum number of elements in the cache. When the cache grows over this limit, # it gets cleared. This is meant to avoid memory leaks when a rogue prompt is filling the cache @@ -9427,7 +9413,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.10 +typeset -g P9K_VERSION=1.19.11 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From b9a2d846efff427fd13b7e95d83a5761666329ac Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sun, 3 Dec 2023 16:47:50 +0100 Subject: [PATCH 077/140] docs: clarify that powerlevel10k does not install new commands (#2498) --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6ff6f449..ef57b974 100644 --- a/README.md +++ b/README.md @@ -300,10 +300,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 | |--------:|---------| @@ -968,6 +969,8 @@ 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? From 47b0187a675afed6b49007fe1915b2c0fe94b7bc Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 6 Dec 2023 08:59:36 +0100 Subject: [PATCH 078/140] docs: add a note about `p10k reload` (#2006) --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index ef57b974..ee4786f3 100644 --- a/README.md +++ b/README.md @@ -397,6 +397,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. From 44f754d711c108dbbbfc2e0612961cd44afb71ea Mon Sep 17 00:00:00 2001 From: Dominic Reich Date: Fri, 8 Dec 2023 18:49:24 +0100 Subject: [PATCH 079/140] use "rm" instead of "unlink" to delete old config file --- internal/wizard.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index b87f0dfc..9dd48e42 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1950,7 +1950,7 @@ function generate_config() { command mkdir -p -- ${__p9k_cfg_path:h} || return if [[ -e $__p9k_cfg_path ]]; then - unlink $__p9k_cfg_path || return + rm $__p9k_cfg_path || return fi print -lr -- "$header" "$lines[@]" >$__p9k_cfg_path } From 36cce9a088c8cd7d7b1a3adccc74cf2a130c51e0 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 9 Dec 2023 09:38:45 +0100 Subject: [PATCH 080/140] wizard: replace rm with zf_rm (#2504) --- internal/wizard.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 9dd48e42..e07225e0 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1950,7 +1950,7 @@ function generate_config() { command mkdir -p -- ${__p9k_cfg_path:h} || return if [[ -e $__p9k_cfg_path ]]; then - rm $__p9k_cfg_path || return + zf_rm -f -- $__p9k_cfg_path || return fi print -lr -- "$header" "$lines[@]" >$__p9k_cfg_path } From dec881651ccbd90f7f68b2a2012cf4870741d0dd Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sun, 10 Dec 2023 12:15:00 +0100 Subject: [PATCH 081/140] Squashed 'gitstatus/' changes from 38d35b959..215063d47 215063d47 update libgit2 ref (#414) git-subtree-dir: gitstatus git-subtree-split: 215063d4703b944f66cc7cc92543205586a35485 --- build.info | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.info b/build.info index baa30b07..9a4967e8 100644 --- a/build.info +++ b/build.info @@ -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" From cc6ed4be416b70fe4e3f97d17061c751abaca04f Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 16 Dec 2023 08:36:29 +0100 Subject: [PATCH 082/140] add `cdk` to POWERLEVEL9K_AWS_SHOW_ON_COMMAND (#1104) --- config/p10k-classic.zsh | 2 +- config/p10k-lean-8colors.zsh | 2 +- config/p10k-lean.zsh | 2 +- config/p10k-rainbow.zsh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 5ea8faec..0e950d30 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1370,7 +1370,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. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 38328c4e..ca6e3d61 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -1348,7 +1348,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. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 7cb97e90..e129c98a 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -1344,7 +1344,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. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index ab36838f..6b932c9e 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1448,7 +1448,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. From d804048efc46b8b248693fa3a7bfc9f863bb1254 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 5 Jan 2024 05:27:33 +0100 Subject: [PATCH 083/140] fix a bug in DCS detection within instant prompt output (#2518) --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 3c784625..a8297bc2 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -6629,7 +6629,7 @@ function _p9k_clear_instant_prompt() { fi print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed] local unexpected=${${content//$'\e[?'<->'c'}//$'\e['<->' q'} - unexpected=${(S)unexpected//$'\eP'*[^$'\e']#($'\e\\')} + unexpected=${(S)unexpected//$'\eP'(|*[^$'\e'])($'\e\e')#$'\e\\'} unexpected=${(S)unexpected//$'\e'[^$'\a\e']#($'\a'|$'\e\\')} # Visual Studio Code prints this garbage. unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'} From 651033c3df5465b56f40f019a78dac1ef9807a57 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 15 Jan 2024 15:11:55 +0100 Subject: [PATCH 084/140] work around a bug in laravel that results in colorized output (#2534) --- internal/p10k.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index a8297bc2..c21b27f9 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -2317,6 +2317,10 @@ prompt_laravel_version() { [[ -r $app ]] || return if ! _p9k_cache_stat_get $0 $dir/artisan $app; then local v="$(php $dir/artisan --version 2> /dev/null)" + v="${${(M)v:#Laravel Framework *}#Laravel Framework }" + # In some versions the output is colorized. + # https://github.com/romkatv/powerlevel10k/issues/2534 + v=${${v#$'\e['<->m}%$'\e['<->m} _p9k_cache_stat_set "${${(M)v:#Laravel Framework *}#Laravel Framework }" fi [[ -n $_p9k__cache_val[1] ]] || return @@ -9413,7 +9417,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.11 +typeset -g P9K_VERSION=1.19.12 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From f5d5abfe1f89e5ea0d6f7cde6f3d9cd4b7c89d14 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 15 Jan 2024 17:17:14 +0100 Subject: [PATCH 085/140] fix a silly bug introduced in the last commit (#2534) --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c21b27f9..2f723824 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -2321,7 +2321,7 @@ prompt_laravel_version() { # In some versions the output is colorized. # https://github.com/romkatv/powerlevel10k/issues/2534 v=${${v#$'\e['<->m}%$'\e['<->m} - _p9k_cache_stat_set "${${(M)v:#Laravel Framework *}#Laravel Framework }" + _p9k_cache_stat_set "$v" fi [[ -n $_p9k__cache_val[1] ]] || return _p9k_prompt_segment "$0" "maroon" "white" 'LARAVEL_ICON' 0 '' "${_p9k__cache_val[1]//\%/%%}" From cda24b72b790b0bec54a6090ab85a0f23caea8b6 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 15 Jan 2024 17:18:10 +0100 Subject: [PATCH 086/140] bump version --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 2f723824..5496864e 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9417,7 +9417,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.12 +typeset -g P9K_VERSION=1.19.13 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 9be438f8625139d58877ef00a5d414c809608672 Mon Sep 17 00:00:00 2001 From: Rhea Date: Mon, 15 Jan 2024 16:16:32 -0500 Subject: [PATCH 087/140] add foot font instructions This adds instructions to the README for users of [foot](https://codeberg.org/dnkl/foot) to enable the MesloLGS Nerd Font as the default in their terminal. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index ee4786f3..3660a946 100644 --- a/README.md +++ b/README.md @@ -700,6 +700,15 @@ If you are using a different terminal, proceed with manual font installation. normal: family: "MesloLGS NF" ``` + - **foot**: Create or open `~/.config/foot/foot.ini` and add the following section + to it: + ```ini + font=MesloLGS NF + ``` + or to specify a custom font size, e.g. 12, + ```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 From c180a5e040d078eab501a71dc455a8eadc43fd44 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 16 Jan 2024 08:22:08 +0100 Subject: [PATCH 088/140] font: fix foot instructions (#2536) --- README.md | 11 +++-------- font.md | 4 ++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3660a946..3f712732 100644 --- a/README.md +++ b/README.md @@ -700,16 +700,11 @@ If you are using a different terminal, proceed with manual font installation. normal: family: "MesloLGS NF" ``` - - **foot**: Create or open `~/.config/foot/foot.ini` and add the following section - to it: - ```ini - font=MesloLGS NF - ``` - or to specify a custom font size, e.g. 12, + - **foot**: Create or open `~/.config/foot/foot.ini` and add the following section to it: ```ini font=MesloLGS NF:size=12 - `` - - **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it: + ``` + - **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it: ```text font_family MesloLGS NF ``` diff --git a/font.md b/font.md index 2fb2f8be..82ae1a4f 100644 --- a/font.md +++ b/font.md @@ -87,6 +87,10 @@ If you are using a different terminal, proceed with manual font installation. normal: family: "MesloLGS NF" ``` + - **foot**: Create or open `~/.config/foot/foot.ini` and add the following section to it: + ```ini + font=MesloLGS NF:size=12 + ``` - **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it: ```text font_family MesloLGS NF From 4d7925c983c923e83f3f87ab6da5a279d6a8173c Mon Sep 17 00:00:00 2001 From: Mikalai Rahachou Date: Fri, 19 Jan 2024 16:31:44 +0100 Subject: [PATCH 089/140] Add parsing of pyvenv.cfg --- internal/p10k.zsh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 5496864e..26df0e1f 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4254,6 +4254,26 @@ function instant_prompt_chezmoi_shell() { _p9k_prompt_segment prompt_chezmoi_shell blue $_p9k_color1 CHEZMOI_ICON 1 '$CHEZMOI_ICON' '' } +function _p9k_parse_virtualenv_cfg() { + local cfg=$1 + echo $cfg + typeset -g reply + [[ -f $cfg && -r $cfg ]] || return + + local -a lines + lines=(${(f)"$(<$cfg)"}) || return + + local line prompt + local -a match mbegin mend + for line in $lines; do + if [[ $line =~ 'prompt = (.*)' ]]; then + prompt=$match[1] + eval "reply=$prompt" + return + fi + done +} + ################################################################ # Virtualenv: current working virtualenv # More information on virtualenv (Python): @@ -4269,6 +4289,15 @@ prompt_virtualenv() { elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then v=${VIRTUAL_ENV:h:t} fi + local cfg="$VIRTUAL_ENV/pyvenv.cfg" + if ! _p9k_cache_stat_get $0 $cfg; then + local -a reply + _p9k_parse_virtualenv_cfg $cfg + _p9k_cache_stat_set $reply + fi + if [[ -n $_p9k__cache_val[1] ]]; then + v=$_p9k__cache_val[1] + fi msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER" case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in false) From 30ba16ecd84cde5ef8b7eaef407d26f909371f3a Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 20 Jan 2024 09:19:22 +0100 Subject: [PATCH 090/140] font: update alacritty instructions (#2539) Alacritty has switched from yaml to toml for its config file. --- README.md | 11 +++++------ font.md | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3f712732..2aba3755 100644 --- a/README.md +++ b/README.md @@ -693,12 +693,11 @@ If you are using a different terminal, proceed with manual font installation. - **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 diff --git a/font.md b/font.md index 82ae1a4f..c80df910 100644 --- a/font.md +++ b/font.md @@ -80,12 +80,11 @@ If you are using a different terminal, proceed with manual font installation. - **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 From 8fefef228571c08ce8074d42304adec3b0876819 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 20 Jan 2024 10:30:56 +0100 Subject: [PATCH 091/140] rewrite the handling of custom prompt in virtualenv (#2540) --- internal/p10k.zsh | 61 ++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 26df0e1f..0b003853 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4255,23 +4255,33 @@ function instant_prompt_chezmoi_shell() { } function _p9k_parse_virtualenv_cfg() { - local cfg=$1 - echo $cfg - typeset -g reply - [[ -f $cfg && -r $cfg ]] || return + typeset -ga reply=(0) + [[ -f $1 && -r $1 ]] || return - local -a lines - lines=(${(f)"$(<$cfg)"}) || return + local cfg + cfg=$(<$1) || return - local line prompt local -a match mbegin mend - for line in $lines; do - if [[ $line =~ 'prompt = (.*)' ]]; then - prompt=$match[1] - eval "reply=$prompt" - return - fi - done + [[ $'\n'$cfg$'\n' == (#b)*$'\n'prompt[$' \t']#=[$' \t']#([^$' \t']#)[$' \t']#$'\n'* ]] || return + local res=$match[1] + if [[ $res == (\"*\"|\'*\') ]]; then + # The string is quoted in python style, which isn't the same as quoting in zsh. + # For example, the literal 'foo"\'bar' denotes foo"'bar in python but in zsh + # it is malformed. + # + # We cheat a bit and impelement not exactly correct unquoting. It may produce + # different visual results but won't perform unintended expansions or bleed out + # any escape sequences. + # + # Note that venv performs unusual and obviously unintended expansions on the + # value of `prompt`: single-word expansions are performed twice by `activate`, + # and then again on every prompt if `prompt_subst` is in effect. While in general + # I am OK with being bug-compatible with other software, the bugs in venv are a + # bit too extreme for my comfort. I am going to disable all expansions and + # display the configured prompt literally. + res=${(Vg:e:)${res[2,-2]}} + fi + reply=(1 "$res") } ################################################################ @@ -4283,20 +4293,21 @@ prompt_virtualenv() { if (( _POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION )) && _p9k_python_version; then msg="${_p9k__ret//\%/%%} " fi - local v=${VIRTUAL_ENV:t} - if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then - v=$VIRTUAL_ENV_PROMPT[2,-3] - elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then - v=${VIRTUAL_ENV:h:t} - fi - local cfg="$VIRTUAL_ENV/pyvenv.cfg" + local cfg=$VIRTUAL_ENV/pyvenv.cfg if ! _p9k_cache_stat_get $0 $cfg; then local -a reply _p9k_parse_virtualenv_cfg $cfg - _p9k_cache_stat_set $reply + _p9k_cache_stat_set "${reply[@]}" fi - if [[ -n $_p9k__cache_val[1] ]]; then - v=$_p9k__cache_val[1] + if (( _p9k__cache_val[1] )); then + local v=$_p9k__cache_val[2] + else + local v=${VIRTUAL_ENV:t} + if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then + v=$VIRTUAL_ENV_PROMPT[2,-3] + elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then + v=${VIRTUAL_ENV:h:t} + fi fi msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER" case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in @@ -9446,7 +9457,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.13 +typeset -g P9K_VERSION=1.19.14 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From ab6a863e231b1d85c89e152165719bfe826bc449 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 22 Jan 2024 18:28:28 +0100 Subject: [PATCH 092/140] docs: mention truecolor --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2aba3755..69dafff9 100644 --- a/README.md +++ b/README.md @@ -1322,12 +1322,19 @@ 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) From a6fa4e43049715141df7390964b97b618421338c Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 23 Jan 2024 08:52:57 +0100 Subject: [PATCH 093/140] faq: [oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 69dafff9..ee011ba5 100644 --- a/README.md +++ b/README.md @@ -1509,6 +1509,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-powerlevel10k-powerlevel10k-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) @@ -1531,6 +1532,27 @@ Powerlevel10k are released. This may change in the future but not soon. - [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 If it looks like a regular `?`, that's normal. It means you have untracked files in the current Git From bd0fa8a08f62a6e49f8a2ef47f5103fa840d2198 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 23 Jan 2024 08:53:43 +0100 Subject: [PATCH 094/140] docs: fix a link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee011ba5..b01936b8 100644 --- a/README.md +++ b/README.md @@ -1509,7 +1509,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-powerlevel10k-powerlevel10k-not-found) +- [`[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) From 35833ea15f14b71dbcebc7e54c104d8d56ca5268 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 26 Jan 2024 07:58:05 +0100 Subject: [PATCH 095/140] docs: document per_directory_history segment (#2384) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b01936b8..13cd994e 100644 --- a/README.md +++ b/README.md @@ -347,6 +347,7 @@ You can enable as many segments as you like. It won't slow down your prompt or Z | `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 | From 307bce24d19fa09d971a0d33c39f3c9fda82924e Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 26 Jan 2024 09:24:27 +0100 Subject: [PATCH 096/140] docs: fix a link to zsh-theme-powerlevel10k archlinux package --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13cd994e..c864fb7f 100644 --- a/README.md +++ b/README.md @@ -531,7 +531,7 @@ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zs 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. + https://www.archlinux.org/packages/extra/x86_64/zsh-theme-powerlevel10k/) package. Historically, [it has been breaking often and for extended periods of time]( https://github.com/romkatv/powerlevel10k/pull/786). **Do not use it.** From 6f4520cc13cd203fef81ecc7f095cd45c7960766 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 31 Jan 2024 23:43:11 +0100 Subject: [PATCH 097/140] add neon support --- internal/icons.zsh | 7 ++++++ internal/p10k.zsh | 53 ++++++--------------------------------------- internal/wizard.zsh | 1 + 3 files changed, 15 insertions(+), 46 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index dc3d675e..f733c7f6 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -75,6 +75,7 @@ function _p9k_init_icons() { LINUX_ENDEAVOUROS_ICON '\uE271'$s #  LINUX_ROCKY_ICON '\uE271'$s #  LINUX_GUIX_ICON '\uE271'$s #  + LINUX_NEON_ICON '\uE271'$s #  SUNOS_ICON '\U1F31E'$q # 🌞 HOME_ICON '\uE12C'$s #  HOME_SUB_ICON '\uE18D'$s #  @@ -231,6 +232,7 @@ function _p9k_init_icons() { LINUX_ENDEAVOUROS_ICON '\uF17C'$s #  LINUX_ROCKY_ICON '\uF17C'$s #  LINUX_GUIX_ICON '\uF17C'$s #  + LINUX_NEON_ICON '\uF17C'$s #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  HOME_SUB_ICON '\uF07C'$s #  @@ -388,6 +390,7 @@ function _p9k_init_icons() { LINUX_ENDEAVOUROS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_ROCKY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_GUIX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" + LINUX_NEON_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" SUNOS_ICON "${CODEPOINT_OF_AWESOME_SUN_O:+\\u$CODEPOINT_OF_AWESOME_SUN_O }" HOME_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME$s}" HOME_SUB_ICON "${CODEPOINT_OF_AWESOME_FOLDER_OPEN:+\\u$CODEPOINT_OF_AWESOME_FOLDER_OPEN$s}" @@ -538,6 +541,7 @@ function _p9k_init_icons() { LINUX_ENDEAVOUROS_ICON '\UF322'$s #  LINUX_ROCKY_ICON '\UF32B'$s #  LINUX_GUIX_ICON '\UF325'$s #  + LINUX_NEON_ICON '\UF331'$s #  LINUX_ICON '\uF17C' #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  @@ -696,6 +700,7 @@ function _p9k_init_icons() { LINUX_ENDEAVOUROS_ICON '\uF17C' #  LINUX_ROCKY_ICON '\uF17C' #  LINUX_GUIX_ICON '\uF325'$s #  + LINUX_NEON_ICON '\UF331'$s #  LINUX_ICON '\uF17C' #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  @@ -847,6 +852,7 @@ function _p9k_init_icons() { LINUX_ENDEAVOUROS_ICON 'edvos' LINUX_ROCKY_ICON 'rocky' LINUX_GUIX_ICON 'guix' + LINUX_NEON_ICON 'neon' SUNOS_ICON 'sunos' HOME_ICON '' HOME_SUB_ICON '' @@ -999,6 +1005,7 @@ function _p9k_init_icons() { LINUX_ENDEAVOUROS_ICON 'Edv' LINUX_ROCKY_ICON 'Roc' LINUX_GUIX_ICON 'Guix' + LINUX_NEON_ICON 'Neon' SUNOS_ICON 'Sun' HOME_ICON '' HOME_SUB_ICON '' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 0b003853..8e6e9d03 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4254,36 +4254,6 @@ function instant_prompt_chezmoi_shell() { _p9k_prompt_segment prompt_chezmoi_shell blue $_p9k_color1 CHEZMOI_ICON 1 '$CHEZMOI_ICON' '' } -function _p9k_parse_virtualenv_cfg() { - typeset -ga reply=(0) - [[ -f $1 && -r $1 ]] || return - - local cfg - cfg=$(<$1) || return - - local -a match mbegin mend - [[ $'\n'$cfg$'\n' == (#b)*$'\n'prompt[$' \t']#=[$' \t']#([^$' \t']#)[$' \t']#$'\n'* ]] || return - local res=$match[1] - if [[ $res == (\"*\"|\'*\') ]]; then - # The string is quoted in python style, which isn't the same as quoting in zsh. - # For example, the literal 'foo"\'bar' denotes foo"'bar in python but in zsh - # it is malformed. - # - # We cheat a bit and impelement not exactly correct unquoting. It may produce - # different visual results but won't perform unintended expansions or bleed out - # any escape sequences. - # - # Note that venv performs unusual and obviously unintended expansions on the - # value of `prompt`: single-word expansions are performed twice by `activate`, - # and then again on every prompt if `prompt_subst` is in effect. While in general - # I am OK with being bug-compatible with other software, the bugs in venv are a - # bit too extreme for my comfort. I am going to disable all expansions and - # display the configured prompt literally. - res=${(Vg:e:)${res[2,-2]}} - fi - reply=(1 "$res") -} - ################################################################ # Virtualenv: current working virtualenv # More information on virtualenv (Python): @@ -4293,21 +4263,11 @@ prompt_virtualenv() { if (( _POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION )) && _p9k_python_version; then msg="${_p9k__ret//\%/%%} " fi - local cfg=$VIRTUAL_ENV/pyvenv.cfg - if ! _p9k_cache_stat_get $0 $cfg; then - local -a reply - _p9k_parse_virtualenv_cfg $cfg - _p9k_cache_stat_set "${reply[@]}" - fi - if (( _p9k__cache_val[1] )); then - local v=$_p9k__cache_val[2] - else - local v=${VIRTUAL_ENV:t} - if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then - v=$VIRTUAL_ENV_PROMPT[2,-3] - elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then - v=${VIRTUAL_ENV:h:t} - fi + local v=${VIRTUAL_ENV:t} + if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then + v=$VIRTUAL_ENV_PROMPT[2,-3] + elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then + v=${VIRTUAL_ENV:h:t} fi msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER" case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in @@ -8637,6 +8597,7 @@ function _p9k_init_cacheable() { endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;; rocky) _p9k_set_os Linux LINUX_ROCKY_ICON;; guix) _p9k_set_os Linux LINUX_GUIX_ICON;; + neon) _p9k_set_os Linux LINUX_NEON_ICON;; *) _p9k_set_os Linux LINUX_ICON;; esac ;; @@ -9457,7 +9418,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.14 +typeset -g P9K_VERSION=1.19.13 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh diff --git a/internal/wizard.zsh b/internal/wizard.zsh index e07225e0..2efd26b7 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1158,6 +1158,7 @@ function os_icon_name() { endeavouros) echo LINUX_ENDEAVOUROS_ICON;; rocky) echo LINUX_ROCKY_ICON;; guix) echo LINUX_GUIX_ICON;; + neon) echo LINUX_NEON_ICON;; *) echo LINUX_ICON;; esac ;; From adc238fa1d188d075e8803ea85dcca44d2deff4f Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 31 Jan 2024 23:49:13 +0100 Subject: [PATCH 098/140] neon support --- internal/p10k.zsh | 52 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 8e6e9d03..d7be4d0a 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4254,6 +4254,36 @@ function instant_prompt_chezmoi_shell() { _p9k_prompt_segment prompt_chezmoi_shell blue $_p9k_color1 CHEZMOI_ICON 1 '$CHEZMOI_ICON' '' } +function _p9k_parse_virtualenv_cfg() { + typeset -ga reply=(0) + [[ -f $1 && -r $1 ]] || return + + local cfg + cfg=$(<$1) || return + + local -a match mbegin mend + [[ $'\n'$cfg$'\n' == (#b)*$'\n'prompt[$' \t']#=[$' \t']#([^$' \t']#)[$' \t']#$'\n'* ]] || return + local res=$match[1] + if [[ $res == (\"*\"|\'*\') ]]; then + # The string is quoted in python style, which isn't the same as quoting in zsh. + # For example, the literal 'foo"\'bar' denotes foo"'bar in python but in zsh + # it is malformed. + # + # We cheat a bit and impelement not exactly correct unquoting. It may produce + # different visual results but won't perform unintended expansions or bleed out + # any escape sequences. + # + # Note that venv performs unusual and obviously unintended expansions on the + # value of `prompt`: single-word expansions are performed twice by `activate`, + # and then again on every prompt if `prompt_subst` is in effect. While in general + # I am OK with being bug-compatible with other software, the bugs in venv are a + # bit too extreme for my comfort. I am going to disable all expansions and + # display the configured prompt literally. + res=${(Vg:e:)${res[2,-2]}} + fi + reply=(1 "$res") +} + ################################################################ # Virtualenv: current working virtualenv # More information on virtualenv (Python): @@ -4263,11 +4293,21 @@ prompt_virtualenv() { if (( _POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION )) && _p9k_python_version; then msg="${_p9k__ret//\%/%%} " fi - local v=${VIRTUAL_ENV:t} - if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then - v=$VIRTUAL_ENV_PROMPT[2,-3] - elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then - v=${VIRTUAL_ENV:h:t} + local cfg=$VIRTUAL_ENV/pyvenv.cfg + if ! _p9k_cache_stat_get $0 $cfg; then + local -a reply + _p9k_parse_virtualenv_cfg $cfg + _p9k_cache_stat_set "${reply[@]}" + fi + if (( _p9k__cache_val[1] )); then + local v=$_p9k__cache_val[2] + else + local v=${VIRTUAL_ENV:t} + if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then + v=$VIRTUAL_ENV_PROMPT[2,-3] + elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then + v=${VIRTUAL_ENV:h:t} + fi fi msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER" case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in @@ -9418,7 +9458,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.13 +typeset -g P9K_VERSION=1.19.14 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 62341054d8aa40ade03fc55bdbc95b9ff2d8d2b6 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 1 Feb 2024 06:44:39 +0100 Subject: [PATCH 099/140] set the default value of LINUX_NEON_ICON to a glyph that exists in the recommended font (#2553) --- internal/icons.zsh | 4 ++-- internal/p10k.zsh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index f733c7f6..81c215e6 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -541,7 +541,7 @@ function _p9k_init_icons() { LINUX_ENDEAVOUROS_ICON '\UF322'$s #  LINUX_ROCKY_ICON '\UF32B'$s #  LINUX_GUIX_ICON '\UF325'$s #  - LINUX_NEON_ICON '\UF331'$s #  + LINUX_NEON_ICON '\uF17C' #  LINUX_ICON '\uF17C' #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  @@ -700,7 +700,7 @@ function _p9k_init_icons() { LINUX_ENDEAVOUROS_ICON '\uF17C' #  LINUX_ROCKY_ICON '\uF17C' #  LINUX_GUIX_ICON '\uF325'$s #  - LINUX_NEON_ICON '\UF331'$s #  + LINUX_NEON_ICON '\uF17C' #  LINUX_ICON '\uF17C' #  SUNOS_ICON '\uF185 ' #  HOME_ICON '\uF015'$s #  diff --git a/internal/p10k.zsh b/internal/p10k.zsh index d7be4d0a..a4a4c00b 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8637,7 +8637,7 @@ function _p9k_init_cacheable() { endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;; rocky) _p9k_set_os Linux LINUX_ROCKY_ICON;; guix) _p9k_set_os Linux LINUX_GUIX_ICON;; - neon) _p9k_set_os Linux LINUX_NEON_ICON;; + neon) _p9k_set_os Linux LINUX_NEON_ICON;; *) _p9k_set_os Linux LINUX_ICON;; esac ;; @@ -9458,7 +9458,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.14 +typeset -g P9K_VERSION=1.19.15 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 34ee1c6bbb6b8e2372c4937d9ea7afa1855957de Mon Sep 17 00:00:00 2001 From: Ulices Date: Sat, 3 Feb 2024 11:13:23 +0000 Subject: [PATCH 100/140] fix: use correct sourcehut repository url (#2556) sourcehut.org is the website of the organization but sr.ht is the website were the repositories are hosted. --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index a4a4c00b..411e5aad 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -7454,7 +7454,7 @@ _p9k_init_params() { 'gnu.org' VCS_GIT_GNU_ICON 'kde.org' VCS_GIT_KDE_ICON 'kernel.org' VCS_GIT_LINUX_ICON - 'sourcehut.org' VCS_GIT_SOURCEHUT_ICON + 'sr.ht' VCS_GIT_SOURCEHUT_ICON ) typeset -ga _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS for domain icon in "${domain2icon[@]}"; do From ce7c242337c6e1002c0af64d43b8c8904007055b Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 3 Feb 2024 12:14:58 +0100 Subject: [PATCH 101/140] bump versions --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 411e5aad..cb11b3f1 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9458,7 +9458,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.19.15 +typeset -g P9K_VERSION=1.20.0 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 5bba4b849b04da665d9776930f47371ebb9974a4 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 6 Feb 2024 09:55:40 +0100 Subject: [PATCH 102/140] skip batteries with "Unknown" status (#2562) --- internal/p10k.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index cb11b3f1..8a44b01d 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1410,6 +1410,9 @@ _p9k_prompt_battery_set_args() { local -i is_full=1 is_calculating is_charching local dir for dir in $bats; do + _p9k_read_file $dir/status(N) && local bat_status=$_p9k__ret || continue + # Skip batteries with "Unknown" status: https://github.com/romkatv/powerlevel10k/pull/2562. + [[ $bat_status == Unknown ]] && continue local -i pow=0 full=0 if _p9k_read_file $dir/(energy_full|charge_full|charge_counter)(N); then (( energy_full += ${full::=_p9k__ret} )) @@ -1422,7 +1425,6 @@ _p9k_prompt_battery_set_args() { elif _p9k_read_file $dir/(energy|charge)_now(N); then (( energy_now += _p9k__ret )) fi - _p9k_read_file $dir/status(N) && local bat_status=$_p9k__ret || continue [[ $bat_status != Full ]] && is_full=0 [[ $bat_status == Charging ]] && is_charching=1 [[ $bat_status == (Charging|Discharging) && $pow == 0 ]] && is_calculating=1 @@ -9458,7 +9460,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.0 +typeset -g P9K_VERSION=1.20.1 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 1aa91f0069bcfbdb82ebdded74eb1730ad0674e1 Mon Sep 17 00:00:00 2001 From: weirdgiraffe Date: Mon, 12 Feb 2024 09:49:34 +0100 Subject: [PATCH 103/140] add icon for yazi level --- internal/icons.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/icons.zsh b/internal/icons.zsh index 81c215e6..ec5b8721 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -139,6 +139,7 @@ function _p9k_init_icons() { JAVA_ICON '\U2615' # ☕︎ LARAVEL_ICON '' RANGER_ICON '\u2B50' # ⭐ + YAZI_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON 'vim' TERRAFORM_ICON 'tf' @@ -292,6 +293,7 @@ function _p9k_init_icons() { JAVA_ICON '\U2615' # ☕︎ LARAVEL_ICON '' RANGER_ICON '\u2B50' # ⭐ + YAZI_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON 'vim' TERRAFORM_ICON 'tf' @@ -448,6 +450,7 @@ function _p9k_init_icons() { JAVA_ICON '\U2615' # ☕︎ LARAVEL_ICON '' RANGER_ICON '\u2B50' # ⭐ + YAZI_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON 'vim' TERRAFORM_ICON 'tf' @@ -607,6 +610,7 @@ function _p9k_init_icons() { JAVA_ICON '\uE738' #  LARAVEL_ICON '\ue73f'$q #  RANGER_ICON '\uF00b ' #  + YAZI_ICON '\uF00b ' #  MIDNIGHT_COMMANDER_ICON 'mc' # mc VIM_ICON '\uE62B' #  TERRAFORM_ICON '\uF1BB ' #  @@ -761,6 +765,7 @@ function _p9k_init_icons() { JAVA_ICON '\uE738' #  LARAVEL_ICON '\ue73f'$q #  RANGER_ICON '\uF00b ' #  + YAZI_ICON '\uF00b ' #  MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON '\uE62B' #  TERRAFORM_ICON '\uF1BB ' #  @@ -912,6 +917,7 @@ function _p9k_init_icons() { JAVA_ICON 'java' LARAVEL_ICON '' RANGER_ICON 'ranger' + YAZI_ICON 'yazi' MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON 'vim' TERRAFORM_ICON 'tf' @@ -1065,6 +1071,7 @@ function _p9k_init_icons() { JAVA_ICON '\U2615' # ☕︎ LARAVEL_ICON '' RANGER_ICON '\u2B50' # ⭐ + YAZI_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON 'vim' TERRAFORM_ICON 'tf' From eb8f96f8080cbab3786425a24b7ad64695a59e91 Mon Sep 17 00:00:00 2001 From: weirdgiraffe Date: Mon, 12 Feb 2024 09:51:22 +0100 Subject: [PATCH 104/140] add prompt segment for yazi levels --- internal/p10k.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 8a44b01d..976d695a 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4955,6 +4955,18 @@ function instant_prompt_ranger() { _p9k_prompt_segment prompt_ranger $_p9k_color1 yellow RANGER_ICON 1 '$RANGER_LEVEL' '$RANGER_LEVEL' } +function prompt_yazi() { + _p9k_prompt_segment $0 $_p9k_color1 yellow YAZI_ICON 0 '' $YAZI_LEVEL +} + +_p9k_prompt_yazi_init() { + typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$YAZI_LEVEL' +} + +function instant_prompt_yazi() { + _p9k_prompt_segment prompt_yazi $_p9k_color1 yellow YAZI_ICON 1 '$YAZI_LEVEL' '$YAZI_LEVEL' +} + function prompt_midnight_commander() { local -i len=$#_p9k__prompt _p9k__has_upglob _p9k_prompt_segment $0 $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '' '' From 67cedd3edcd54aa8edf392d72d9b637fa01eec9f Mon Sep 17 00:00:00 2001 From: weirdgiraffe Date: Mon, 12 Feb 2024 10:16:30 +0100 Subject: [PATCH 105/140] add visual expansion to wizard --- internal/wizard.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 2efd26b7..2714eec2 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1743,6 +1743,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' From 665257d05925bf399741126fd457d471a41e7ccd Mon Sep 17 00:00:00 2001 From: weirdgiraffe Date: Mon, 12 Feb 2024 10:26:42 +0100 Subject: [PATCH 106/140] add themes support --- config/p10k-classic.zsh | 8 ++++++++ config/p10k-lean-8colors.zsh | 7 +++++++ config/p10k-lean.zsh | 7 +++++++ config/p10k-rainbow.zsh | 10 +++++++++- 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 0e950d30..e0d32d84 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -81,6 +81,7 @@ 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) @@ -728,6 +729,12 @@ typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#################### + # Yazi shell color. + typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### # Nnn shell color. @@ -807,6 +814,7 @@ # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' ######################################[ ram: free RAM ]####################################### # RAM color. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index ca6e3d61..3e6d3d95 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -81,6 +81,7 @@ 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) @@ -723,6 +724,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. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index e129c98a..7674f2c5 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -81,6 +81,7 @@ 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) @@ -719,6 +720,12 @@ typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]################### + # Yazi shell color. + typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### # Nnn shell color. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 6b932c9e..325f9879 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -81,6 +81,7 @@ 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) @@ -747,7 +748,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 From f880e18769409ffe407b725c6004c5a8e849408d Mon Sep 17 00:00:00 2001 From: weirdgiraffe Date: Mon, 12 Feb 2024 10:28:49 +0100 Subject: [PATCH 107/140] update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c864fb7f..76b0a422 100644 --- a/README.md +++ b/README.md @@ -358,6 +358,7 @@ You can enable as many segments as you like. It won't slow down your prompt or Z | `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) | From 8e2a22d80ba9f5fd6c784f66dc52c21385eb2642 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 12 Feb 2024 10:45:18 +0100 Subject: [PATCH 108/140] cleanup and bump version (#2572) --- config/p10k-classic.zsh | 6 ++---- config/p10k-lean-8colors.zsh | 2 +- config/p10k-lean.zsh | 2 +- config/p10k-rainbow.zsh | 4 +++- internal/p10k.zsh | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index e0d32d84..bc957abe 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -730,7 +730,7 @@ # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - #####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#################### + ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### # Yazi shell color. typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178 # Custom icon. @@ -811,10 +811,8 @@ # Text and color for insert vi mode. typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66 - # Custom icon. - # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐' ######################################[ ram: free RAM ]####################################### # RAM color. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 3e6d3d95..593c3239 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -725,7 +725,7 @@ # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - ######################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]################### + ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### # Yazi shell color. typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3 # Custom icon. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 7674f2c5..8c724090 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -721,7 +721,7 @@ # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - ######################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]################### + ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### # Yazi shell color. typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178 # Custom icon. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 325f9879..65f07c96 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -749,7 +749,7 @@ # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - ######################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]################### + ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### # Yazi shell color. typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3 typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0 @@ -843,6 +843,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. diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 976d695a..2804bb26 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9472,7 +9472,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.1 +typeset -g P9K_VERSION=1.20.2 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 17cd9e354a283edeb657d340e1bbc0a30de5f967 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 15 Feb 2024 15:32:29 +0100 Subject: [PATCH 109/140] when looking for .fvm/flutter_sdk, require that the last segment is a symlink rather than .fvm (#2573) --- internal/p10k.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 2804bb26..f2ab0e69 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1314,7 +1314,7 @@ function _p9k_fvm_old() { } function _p9k_fvm_new() { - _p9k_upglob .fvm @ && return 1 + _p9k_upglob .fvm/flutter_sdk @ && return 1 local sdk=$_p9k__parent_dirs[$?]/.fvm/flutter_sdk if [[ ${sdk:A} == (#b)*/versions/([^/]##) ]]; then _p9k_prompt_segment prompt_fvm blue $_p9k_color1 FLUTTER_ICON 0 '' ${match[1]//\%/%%} @@ -9472,7 +9472,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.2 +typeset -g P9K_VERSION=1.20.3 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 9e3418d319b1700c768b5c3c94c73ec70351ab09 Mon Sep 17 00:00:00 2001 From: Adam Schumacher Date: Sat, 17 Feb 2024 21:26:53 -0500 Subject: [PATCH 110/140] Detect rpi os based on apt source --- internal/p10k.zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index f2ab0e69..5a52a3a1 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8627,8 +8627,13 @@ function _p9k_init_cacheable() { *arch*) _p9k_set_os Linux LINUX_ARCH_ICON;; *debian*) _p9k_set_os Linux LINUX_DEBIAN_ICON;; *raspbian*) _p9k_set_os Linux LINUX_RASPBIAN_ICON;; - *ubuntu*) _p9k_set_os Linux LINUX_UBUNTU_ICON;; - *elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;; + *debian*) + if [[ -f /etc/apt/sources.list.d/raspi.list ]]; then + _p9k_set_os Linux LINUX_RASPBIAN_ICON + else + _p9k_set_os Linux LINUX_RASPBIAN_ICON + fi + ;; *elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;; *fedora*) _p9k_set_os Linux LINUX_FEDORA_ICON;; *coreos*) _p9k_set_os Linux LINUX_COREOS_ICON;; *kali*) _p9k_set_os Linux LINUX_KALI_ICON;; From 12e0592ac8f1d017b2dc7183b7720d98d8e41ed4 Mon Sep 17 00:00:00 2001 From: Adam Schumacher Date: Sat, 17 Feb 2024 21:29:14 -0500 Subject: [PATCH 111/140] Still keep debian --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 5a52a3a1..e941eebb 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8631,7 +8631,7 @@ function _p9k_init_cacheable() { if [[ -f /etc/apt/sources.list.d/raspi.list ]]; then _p9k_set_os Linux LINUX_RASPBIAN_ICON else - _p9k_set_os Linux LINUX_RASPBIAN_ICON + _p9k_set_os Linux LINUX_DEBIAN_ICON fi ;; *elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;; *fedora*) _p9k_set_os Linux LINUX_FEDORA_ICON;; From bfbc65e63d071220dfbdb708bbde859ac7c64184 Mon Sep 17 00:00:00 2001 From: Adam Schumacher Date: Sat, 17 Feb 2024 21:38:10 -0500 Subject: [PATCH 112/140] whitespace --- internal/p10k.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index e941eebb..c14db837 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8633,7 +8633,8 @@ function _p9k_init_cacheable() { else _p9k_set_os Linux LINUX_DEBIAN_ICON fi - ;; *elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;; + ;; + *elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;; *fedora*) _p9k_set_os Linux LINUX_FEDORA_ICON;; *coreos*) _p9k_set_os Linux LINUX_COREOS_ICON;; *kali*) _p9k_set_os Linux LINUX_KALI_ICON;; From 31d99b694c97107a3db5ee4a8c33ab1308bff107 Mon Sep 17 00:00:00 2001 From: Adam Schumacher Date: Sat, 17 Feb 2024 22:15:53 -0500 Subject: [PATCH 113/140] Fix in wizard.zsh --- internal/p10k.zsh | 1 - internal/wizard.zsh | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c14db837..776e3fb5 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8625,7 +8625,6 @@ function _p9k_init_cacheable() { fi case $os_release_id in *arch*) _p9k_set_os Linux LINUX_ARCH_ICON;; - *debian*) _p9k_set_os Linux LINUX_DEBIAN_ICON;; *raspbian*) _p9k_set_os Linux LINUX_RASPBIAN_ICON;; *debian*) if [[ -f /etc/apt/sources.list.d/raspi.list ]]; then diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 2714eec2..3b854b3b 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1132,7 +1132,14 @@ function os_icon_name() { 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;; From bb16e366c3f7d68f73fa9129f3593524ff6420ac Mon Sep 17 00:00:00 2001 From: Adam Schumacher Date: Sat, 17 Feb 2024 22:17:50 -0500 Subject: [PATCH 114/140] Undelete ubuntu. I shouldn't code this tired. --- internal/p10k.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 776e3fb5..1811061a 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8633,6 +8633,7 @@ function _p9k_init_cacheable() { _p9k_set_os Linux LINUX_DEBIAN_ICON fi ;; + *ubuntu*) _p9k_set_os Linux LINUX_UBUNTU_ICON;; *elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;; *fedora*) _p9k_set_os Linux LINUX_FEDORA_ICON;; *coreos*) _p9k_set_os Linux LINUX_COREOS_ICON;; From b973805f019cb9a4ecb1ccdf8879d89eb2b1b111 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sun, 18 Feb 2024 17:18:59 +0100 Subject: [PATCH 115/140] cleanup and bump version (#2576) --- internal/p10k.zsh | 4 ++-- internal/wizard.zsh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 1811061a..d42501df 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8632,7 +8632,7 @@ function _p9k_init_cacheable() { else _p9k_set_os Linux LINUX_DEBIAN_ICON fi - ;; + ;; *ubuntu*) _p9k_set_os Linux LINUX_UBUNTU_ICON;; *elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON;; *fedora*) _p9k_set_os Linux LINUX_FEDORA_ICON;; @@ -9478,7 +9478,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.3 +typeset -g P9K_VERSION=1.20.4 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 3b854b3b..09459203 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1139,7 +1139,7 @@ function os_icon_name() { else echo LINUX_DEBIAN_ICON fi - ;; + ;; *raspbian*) echo LINUX_RASPBIAN_ICON;; *ubuntu*) echo LINUX_UBUNTU_ICON;; *elementary*) echo LINUX_ELEMENTARY_ICON;; From 0cc19ac2ede35fd8accff590fa71df580dc7e109 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 23 Feb 2024 06:03:55 +0100 Subject: [PATCH 116/140] use nf-md-redhat as the RHEL logo when on nerdfont-v3 (#2583) --- internal/icons.zsh | 2 +- internal/p10k.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index ec5b8721..d34b2c0e 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -539,7 +539,7 @@ function _p9k_init_icons() { LINUX_ARTIX_ICON '\UF31F'$s #  LINUX_UBUNTU_ICON '\uF31b'$s #  LINUX_KALI_ICON '\uF327'$s #  - LINUX_RHEL_ICON '\uF316'$s #  + LINUX_RHEL_ICON '\UF111B'$s # 󱄛 LINUX_AMZN_ICON '\uF270'$s #  LINUX_ENDEAVOUROS_ICON '\UF322'$s #  LINUX_ROCKY_ICON '\UF32B'$s #  diff --git a/internal/p10k.zsh b/internal/p10k.zsh index d42501df..64e08c47 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9478,7 +9478,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.4 +typeset -g P9K_VERSION=1.20.5 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From d39e4268355f7a10f7758982db2a59e485d2659a Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 12 Mar 2024 08:07:40 +0100 Subject: [PATCH 117/140] docs: mention sessions in the font instructions for MobaXterm (#2599) --- README.md | 4 +++- font.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 76b0a422..b05d2ab1 100644 --- a/README.md +++ b/README.md @@ -685,7 +685,9 @@ If you are using a different terminal, proceed with manual font installation. tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`. 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 → diff --git a/font.md b/font.md index c80df910..d025bde0 100644 --- a/font.md +++ b/font.md @@ -70,7 +70,9 @@ If you are using a different terminal, proceed with manual font installation. tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`. 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 → From 0fdca5b1e606cc9ab083d2f41262fa10adcbfb21 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 16 Mar 2024 13:40:56 +0100 Subject: [PATCH 118/140] always offer the flat heads option in the wizard (#2600) --- internal/wizard.zsh | 55 +++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 09459203..630051f4 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1289,54 +1289,51 @@ 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-* ]]; 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=$right_triangle + right_head=$left_triangle + options+='sharp heads' + ;; + 3) left_head=$fade_out right_head=$fade_in options+='blurred heads' ;; - 3) + 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' From 6836bfe2da51bf32472b67df062347cfc4b1952e Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 16 Mar 2024 16:03:55 +0100 Subject: [PATCH 119/140] fix heads in the wizard (#2605) fixed on the phone, hence the dumb diff --- internal/wizard.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 630051f4..1840962f 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1318,12 +1318,12 @@ function ask_heads() { right_head= options+='flat heads' ;; - 2) + 3) left_head=$right_triangle right_head=$left_triangle options+='sharp heads' ;; - 3) + 2) left_head=$fade_out right_head=$fade_in options+='blurred heads' From 07a971d310821fd50ef91281543ff8fa446bd76c Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 18 Mar 2024 13:25:39 +0100 Subject: [PATCH 120/140] remove `DISABLE_UPDATE_PROMPT=true` from instant prompt If this breaks your shell, it means you are using an old version of oh-my-zsh, which predates this commit: https://github.com/ohmyzsh/ohmyzsh/commit/fe0dd8226d6f58ea98f9f84b279e6c3859993fb9 You need to upgrade oh-my-zsh by running the following command: omz update --- internal/p10k.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 64e08c47..c443674f 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -6515,7 +6515,6 @@ _p9k_dump_instant_prompt() { } zshexit_functions=(_p9k_instant_prompt_cleanup $zshexit_functions) precmd_functions=(_p9k_instant_prompt_precmd_first $precmd_functions) - DISABLE_UPDATE_PROMPT=true } && unsetopt prompt_cr prompt_sp && typeset -gi __p9k_instant_prompt_sourced='$__p9k_instant_prompt_version' || typeset -gi __p9k_instant_prompt_sourced=${__p9k_instant_prompt_sourced:-0}' } always { From 93d074a82bcf5ac3dfe50b53b483381b8e330e01 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 18 Mar 2024 15:40:38 +0100 Subject: [PATCH 121/140] add p10k-deactivate-instant-prompt Function p10k-deactivate-instant-prompt is defined when and only when instant prompt is active. Invoking it erases and deactivates instant prompt. --- internal/p10k.zsh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c443674f..c0f1918c 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -6467,6 +6467,12 @@ _p9k_dump_instant_prompt() { exec {__p9k_fd_0}<&0 {__p9k_fd_1}>&1 {__p9k_fd_2}>&2 0<&$fd_null 1>$__p9k_instant_prompt_output exec 2>&1 {fd_null}>&- typeset -gi __p9k_instant_prompt_active=1 + function p10k-deactivate-instant-prompt() { + '$__p9k_intro_no_locale' + _p9k_clear_instant_prompt + builtin unset __p9k_instant_prompt_active + builtin unfunction p10k-deactivate-instant-prompt + } if (( _z4h_can_save_restore_screen == 1 )); then typeset -g _z4h_saved_screen -z4h-save-screen @@ -6479,6 +6485,7 @@ _p9k_dump_instant_prompt() { (( ZSH_SUBSHELL == 0 && ${+__p9k_instant_prompt_active} )) || return 0 '$__p9k_intro_no_locale' unset __p9k_instant_prompt_active + (( $+functions[p10k-deactivate-instant-prompt] )) && unfunction p10k-deactivate-instant-prompt exec 0<&$__p9k_fd_0 1>&$__p9k_fd_1 2>&$__p9k_fd_2 {__p9k_fd_0}>&- {__p9k_fd_1}>&- {__p9k_fd_2}>&- unset __p9k_fd_0 __p9k_fd_1 __p9k_fd_2 typeset -gi __p9k_instant_prompt_erased=1 @@ -6906,10 +6913,7 @@ function _p9k_on_expand() { (( _p9k__fully_initialized )) || _p9k_wrap_widgets fi - if (( $+__p9k_instant_prompt_active )); then - _p9k_clear_instant_prompt - unset __p9k_instant_prompt_active - fi + (( $+functions[p10k-deactivate-instant-prompt] )) && p10k-deactivate-instant-prompt if (( ! _p9k__expanded )); then _p9k__expanded=1 @@ -6981,8 +6985,7 @@ _p9k_precmd_impl() { _p9k_can_configure -q local -i ret=$? if (( ret == 2 && $+__p9k_instant_prompt_active )); then - _p9k_clear_instant_prompt - unset __p9k_instant_prompt_active + p10k-deactivate-instant-prompt _p9k_delete_instant_prompt zf_rm -f -- $__p9k_dump_file{,.zwc} 2>/dev/null () { @@ -9437,10 +9440,7 @@ function p10k() { return 1 ;; clear-instant-prompt) - if (( $+__p9k_instant_prompt_active )); then - _p9k_clear_instant_prompt - unset __p9k_instant_prompt_active - fi + (( $+functions[p10k-deactivate-instant-prompt] )) && p10k-deactivate-instant-prompt return 0 ;; *) @@ -9477,7 +9477,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.5 +typeset -g P9K_VERSION=1.20.6 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From a3f7dabcae10f30f9cac402a4c4265c70be16846 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 18 Mar 2024 15:46:27 +0100 Subject: [PATCH 122/140] cleanup --- internal/wizard.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 1840962f..f20a7af1 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1318,16 +1318,16 @@ function ask_heads() { right_head= options+='flat heads' ;; - 3) - left_head=$right_triangle - right_head=$left_triangle - options+='sharp heads' - ;; 2) left_head=$fade_out right_head=$fade_in options+='blurred heads' ;; + 3) + left_head=$right_triangle + right_head=$left_triangle + options+='sharp heads' + ;; 4) left_head=$down_triangle right_head=$up_triangle From 50794faba46cc695ec6dc168793db08a50ea811b Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 18 Mar 2024 16:21:07 +0100 Subject: [PATCH 123/140] Revert "add p10k-deactivate-instant-prompt" This reverts commit 93d074a82bcf5ac3dfe50b53b483381b8e330e01. --- internal/p10k.zsh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c0f1918c..c443674f 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -6467,12 +6467,6 @@ _p9k_dump_instant_prompt() { exec {__p9k_fd_0}<&0 {__p9k_fd_1}>&1 {__p9k_fd_2}>&2 0<&$fd_null 1>$__p9k_instant_prompt_output exec 2>&1 {fd_null}>&- typeset -gi __p9k_instant_prompt_active=1 - function p10k-deactivate-instant-prompt() { - '$__p9k_intro_no_locale' - _p9k_clear_instant_prompt - builtin unset __p9k_instant_prompt_active - builtin unfunction p10k-deactivate-instant-prompt - } if (( _z4h_can_save_restore_screen == 1 )); then typeset -g _z4h_saved_screen -z4h-save-screen @@ -6485,7 +6479,6 @@ _p9k_dump_instant_prompt() { (( ZSH_SUBSHELL == 0 && ${+__p9k_instant_prompt_active} )) || return 0 '$__p9k_intro_no_locale' unset __p9k_instant_prompt_active - (( $+functions[p10k-deactivate-instant-prompt] )) && unfunction p10k-deactivate-instant-prompt exec 0<&$__p9k_fd_0 1>&$__p9k_fd_1 2>&$__p9k_fd_2 {__p9k_fd_0}>&- {__p9k_fd_1}>&- {__p9k_fd_2}>&- unset __p9k_fd_0 __p9k_fd_1 __p9k_fd_2 typeset -gi __p9k_instant_prompt_erased=1 @@ -6913,7 +6906,10 @@ function _p9k_on_expand() { (( _p9k__fully_initialized )) || _p9k_wrap_widgets fi - (( $+functions[p10k-deactivate-instant-prompt] )) && p10k-deactivate-instant-prompt + if (( $+__p9k_instant_prompt_active )); then + _p9k_clear_instant_prompt + unset __p9k_instant_prompt_active + fi if (( ! _p9k__expanded )); then _p9k__expanded=1 @@ -6985,7 +6981,8 @@ _p9k_precmd_impl() { _p9k_can_configure -q local -i ret=$? if (( ret == 2 && $+__p9k_instant_prompt_active )); then - p10k-deactivate-instant-prompt + _p9k_clear_instant_prompt + unset __p9k_instant_prompt_active _p9k_delete_instant_prompt zf_rm -f -- $__p9k_dump_file{,.zwc} 2>/dev/null () { @@ -9440,7 +9437,10 @@ function p10k() { return 1 ;; clear-instant-prompt) - (( $+functions[p10k-deactivate-instant-prompt] )) && p10k-deactivate-instant-prompt + if (( $+__p9k_instant_prompt_active )); then + _p9k_clear_instant_prompt + unset __p9k_instant_prompt_active + fi return 0 ;; *) @@ -9477,7 +9477,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.6 +typeset -g P9K_VERSION=1.20.5 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 55c8f74c386b2cf54d3ca914cd451e22342e8d8a Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 18 Mar 2024 16:21:24 +0100 Subject: [PATCH 124/140] Revert "remove `DISABLE_UPDATE_PROMPT=true` from instant prompt" This reverts commit 07a971d310821fd50ef91281543ff8fa446bd76c. --- internal/p10k.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c443674f..64e08c47 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -6515,6 +6515,7 @@ _p9k_dump_instant_prompt() { } zshexit_functions=(_p9k_instant_prompt_cleanup $zshexit_functions) precmd_functions=(_p9k_instant_prompt_precmd_first $precmd_functions) + DISABLE_UPDATE_PROMPT=true } && unsetopt prompt_cr prompt_sp && typeset -gi __p9k_instant_prompt_sourced='$__p9k_instant_prompt_version' || typeset -gi __p9k_instant_prompt_sourced=${__p9k_instant_prompt_sourced:-0}' } always { From a7f13e420e8bc929dcd7f1dc719f7b632fd5356c Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 18 Mar 2024 16:21:57 +0100 Subject: [PATCH 125/140] bump version --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 64e08c47..48eab915 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9478,7 +9478,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.5 +typeset -g P9K_VERSION=1.20.7 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 45627c528b4e3d8949a1e5c72ee3fe7cac516d8d Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 18 Mar 2024 16:53:55 +0100 Subject: [PATCH 126/140] Squashed 'gitstatus/' changes from 215063d4..62177e89 62177e89 build: drop -Werror git-subtree-dir: gitstatus git-subtree-split: 62177e89b2b04baf242cd1526cc2661041dda0fb --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fede08af..adb20e9d 100644 --- a/Makefile +++ b/Makefile @@ -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 From da9b03777c4f2390c7e3f5c720ee4689336f811b Mon Sep 17 00:00:00 2001 From: Mohammad Al Zouabi Date: Tue, 19 Mar 2024 16:13:16 +0800 Subject: [PATCH 127/140] remove duplicate POWERLEVEL9K_DIR_SHOW_WRITABLE from p10k-lean-8colors.zsh (#2610) --- config/p10k-lean-8colors.zsh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 593c3239..d60b6c9d 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -277,10 +277,6 @@ # the full directory that was used in previous commands. typeset -g POWERLEVEL9K_DIR_HYPERLINK=false - # Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and - # POWERLEVEL9K_DIR_CLASSES below. - typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2 - # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON # and POWERLEVEL9K_DIR_CLASSES below. typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 From d6a0fed1d9b2ff8746d1535eb6c7e83bfe0df093 Mon Sep 17 00:00:00 2001 From: Hodei Navarro Date: Fri, 5 Apr 2024 19:59:32 +0200 Subject: [PATCH 128/140] Ease regex pattern when reading pyenv.cfg prompt value This commit provides support for virtualenv-like pyenv.cfg configuration files, where the `prompt` value is a plain text rather than a quoted string. Before the commit, `prompt = My custom prompt` would not match the regex, returning a fallback of the $VIRTUAL_ENV directory name. After the commit, both venv-like `prompt = 'My custom prompt'` and virtualenv-like `prompt = My custom prompt` are supported. Closes #2628 --- internal/p10k.zsh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 48eab915..2d05a727 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4260,18 +4260,23 @@ function _p9k_parse_virtualenv_cfg() { typeset -ga reply=(0) [[ -f $1 && -r $1 ]] || return - local cfg - cfg=$(<$1) || return + local line res="" + while IFS= read -r line; do + if [[ "$line" =~ '^prompt[[:space:]]*=[[:space:]]*(.*)' ]]; then + res="${match[1]}" + break + fi + done < "$1" + + # Return if res is empty, meaning no match was found + [[ -z "$res" ]] && return - local -a match mbegin mend - [[ $'\n'$cfg$'\n' == (#b)*$'\n'prompt[$' \t']#=[$' \t']#([^$' \t']#)[$' \t']#$'\n'* ]] || return - local res=$match[1] if [[ $res == (\"*\"|\'*\') ]]; then # The string is quoted in python style, which isn't the same as quoting in zsh. # For example, the literal 'foo"\'bar' denotes foo"'bar in python but in zsh # it is malformed. # - # We cheat a bit and impelement not exactly correct unquoting. It may produce + # We cheat a bit and implement not exactly correct unquoting. It may produce # different visual results but won't perform unintended expansions or bleed out # any escape sequences. # From aeff1153d405ebc9f60d4a8cb7afce5451c07358 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 5 Apr 2024 20:42:59 +0200 Subject: [PATCH 129/140] handle unquoted `prompt` when parsing pyenv.cfg --- internal/p10k.zsh | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 2d05a727..dbad3275 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4260,23 +4260,18 @@ function _p9k_parse_virtualenv_cfg() { typeset -ga reply=(0) [[ -f $1 && -r $1 ]] || return - local line res="" - while IFS= read -r line; do - if [[ "$line" =~ '^prompt[[:space:]]*=[[:space:]]*(.*)' ]]; then - res="${match[1]}" - break - fi - done < "$1" - - # Return if res is empty, meaning no match was found - [[ -z "$res" ]] && return + local cfg + cfg=$(<$1) || return + local -a match mbegin mend + [[ $'\n'$cfg$'\n' == (#b)*$'\n'prompt[$' \t']#=([^$'\n']#)$'\n'* ]] || return + local res=${${match[1]##[$' \t']#}%%[$' \t']#} if [[ $res == (\"*\"|\'*\') ]]; then # The string is quoted in python style, which isn't the same as quoting in zsh. # For example, the literal 'foo"\'bar' denotes foo"'bar in python but in zsh # it is malformed. # - # We cheat a bit and implement not exactly correct unquoting. It may produce + # We cheat a bit and impelement not exactly correct unquoting. It may produce # different visual results but won't perform unintended expansions or bleed out # any escape sequences. # @@ -9483,7 +9478,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.7 +typeset -g P9K_VERSION=1.20.8 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From bcef7cafdf3005a3d59335df618f89474ef4dd8b Mon Sep 17 00:00:00 2001 From: Alexander Blum Date: Sun, 7 Apr 2024 15:58:13 +0000 Subject: [PATCH 130/140] fixes taskwarrior init data for taskwarrior v3 (#2635) --- internal/p10k.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index dbad3275..6e25ad0c 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5234,7 +5234,10 @@ function _p9k_taskwarrior_check_data() { } function _p9k_taskwarrior_init_data() { - local -a stat files=($_p9k_taskwarrior_data_dir/{pending,completed}.data) + local -a stat files=( + $_p9k_taskwarrior_data_dir/{pending,completed}.data + $_p9k_taskwarrior_data_dir/taskchampion.sqlite3 + ) _p9k_taskwarrior_data_files=($^files(N)) _p9k_taskwarrior_data_non_files=(${files:|_p9k_taskwarrior_data_files}) if (( $#_p9k_taskwarrior_data_files )); then From 178fcda3487afb3bd540d784cf472c60ec0de94a Mon Sep 17 00:00:00 2001 From: Alejandro Armas <58491232+mycroftsnm@users.noreply.github.com> Date: Tue, 9 Apr 2024 03:12:31 -0300 Subject: [PATCH 131/140] Update README.md Fix Typo (#2637) Removes the extra ')' in the yazi segment meaning --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b05d2ab1..8b8c5861 100644 --- a/README.md +++ b/README.md @@ -358,7 +358,7 @@ You can enable as many segments as you like. It won't slow down your prompt or Z | `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 | +| `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) | From 808ba80ab005cdb66be19d2c22695c9bab9747f3 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 23 Apr 2024 08:11:19 +0200 Subject: [PATCH 132/140] fail more gracefully on timewarrior v3.0.1 (#2648) --- internal/p10k.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 6e25ad0c..344f8b35 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5264,7 +5264,9 @@ function _p9k_taskwarrior_init_data() { local -a ts ts=($(command task +PENDING -OVERDUE list rc.verbose=nothing rc.color=0 rc._forcecolor=0 \ rc.report.list.labels= rc.report.list.columns=due.epoch /dev/null)) || ts=() - if (( $#ts )); then + # The second condition is a workaround for a bug in timewarrior v3.0.1. + # https://github.com/romkatv/powerlevel10k/issues/2648. + if (( $#ts && ! ${#${(@)ts:#(|-)<->(|.<->)}} )); then _p9k_taskwarrior_next_due=${${(on)ts}[1]} (( _p9k_taskwarrior_next_due > EPOCHSECONDS )) || _p9k_taskwarrior_next_due=$((EPOCHSECONDS+60)) fi From 01e3f0b4baeb499c63909e3caeaff575c79d51ce Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 23 Apr 2024 08:11:49 +0200 Subject: [PATCH 133/140] bump version --- internal/p10k.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 344f8b35..c1e1d4e7 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5264,7 +5264,7 @@ function _p9k_taskwarrior_init_data() { local -a ts ts=($(command task +PENDING -OVERDUE list rc.verbose=nothing rc.color=0 rc._forcecolor=0 \ rc.report.list.labels= rc.report.list.columns=due.epoch /dev/null)) || ts=() - # The second condition is a workaround for a bug in timewarrior v3.0.1. + # The second condition is a workaround for a bug in taskwarrior v3.0.1. # https://github.com/romkatv/powerlevel10k/issues/2648. if (( $#ts && ! ${#${(@)ts:#(|-)<->(|.<->)}} )); then _p9k_taskwarrior_next_due=${${(on)ts}[1]} @@ -9483,7 +9483,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.8 +typeset -g P9K_VERSION=1.20.9 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From b28d68f44b42f25703673fac514d0777f0af9d8a Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 25 Apr 2024 12:13:02 +0200 Subject: [PATCH 134/140] allow ~/.timewarrior to be a symbolic link (#2603) --- internal/p10k.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c1e1d4e7..0ea81791 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5125,7 +5125,7 @@ function _p9k_timewarrior_clear() { function prompt_timewarrior() { local dir - [[ -n ${dir::=$TIMEWARRIORDB} || -n ${dir::=~/.timewarrior}(#qN/) ]] || + [[ -n ${dir::=$TIMEWARRIORDB} || -n ${dir::=~/.timewarrior}(#q-/N) ]] || dir=${XDG_DATA_HOME:-~/.local/share}/timewarrior dir+=/data local -a stat @@ -9483,7 +9483,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.9 +typeset -g P9K_VERSION=1.20.10 unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From 3395c828b27f2cf528b3cec6e48f97a986c5f086 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 6 May 2024 08:37:53 +0200 Subject: [PATCH 135/140] docs: mention that vscode terminal does not respect foreground colors chosen by the user by default --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 8b8c5861..ebdc521d 100644 --- a/README.md +++ b/README.md @@ -1342,6 +1342,12 @@ 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? @@ -1531,6 +1537,7 @@ 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) @@ -1874,6 +1881,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 From 16e58484262de745723ed114e09217094655eaaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 7 May 2024 12:39:44 +0300 Subject: [PATCH 136/140] Doc: Use shorter readme link (#2671) Since it links to readme on default branch (permalink), can just omit that all making links shorter. --- config/p10k-classic.zsh | 4 ++-- config/p10k-lean-8colors.zsh | 4 ++-- config/p10k-lean.zsh | 4 ++-- config/p10k-pure.zsh | 2 +- config/p10k-rainbow.zsh | 4 ++-- config/p10k-robbyrussell.zsh | 2 +- internal/p10k.zsh | 8 ++++---- internal/wizard.zsh | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index bc957abe..d7be6722 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1677,7 +1677,7 @@ # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # is to generate the prompt segment for display in instant prompt. See - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k @@ -1713,7 +1713,7 @@ # it incompatible with your zsh configuration files. # - quiet: Enable instant prompt and don't print warnings when detecting console output # during zsh initialization. Choose this if you've read and understood - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # - verbose: Enable instant prompt and print a warning when detecting console output during # zsh initialization. Choose this if you've never tried instant prompt, haven't # seen the warning, or if you are unsure what this all means. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index d60b6c9d..bf469df7 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -1652,7 +1652,7 @@ # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # is to generate the prompt segment for display in instant prompt. See - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k @@ -1688,7 +1688,7 @@ # it incompatible with your zsh configuration files. # - quiet: Enable instant prompt and don't print warnings when detecting console output # during zsh initialization. Choose this if you've read and understood - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # - verbose: Enable instant prompt and print a warning when detecting console output during # zsh initialization. Choose this if you've never tried instant prompt, haven't # seen the warning, or if you are unsure what this all means. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 8c724090..1595a377 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -1652,7 +1652,7 @@ # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # is to generate the prompt segment for display in instant prompt. See - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k @@ -1688,7 +1688,7 @@ # it incompatible with your zsh configuration files. # - quiet: Enable instant prompt and don't print warnings when detecting console output # during zsh initialization. Choose this if you've read and understood - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # - verbose: Enable instant prompt and print a warning when detecting console output during # zsh initialization. Choose this if you've never tried instant prompt, haven't # seen the warning, or if you are unsure what this all means. diff --git a/config/p10k-pure.zsh b/config/p10k-pure.zsh index 97c1a207..7a4d2441 100644 --- a/config/p10k-pure.zsh +++ b/config/p10k-pure.zsh @@ -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. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 65f07c96..355ee9bb 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1774,7 +1774,7 @@ # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # is to generate the prompt segment for display in instant prompt. See - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k @@ -1811,7 +1811,7 @@ # it incompatible with your zsh configuration files. # - quiet: Enable instant prompt and don't print warnings when detecting console output # during zsh initialization. Choose this if you've read and understood - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # - verbose: Enable instant prompt and print a warning when detecting console output during # zsh initialization. Choose this if you've never tried instant prompt, haven't # seen the warning, or if you are unsure what this all means. diff --git a/config/p10k-robbyrussell.zsh b/config/p10k-robbyrussell.zsh index a59e222b..6a204d29 100644 --- a/config/p10k-robbyrussell.zsh +++ b/config/p10k-robbyrussell.zsh @@ -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. diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 0ea81791..d2d261b2 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -6740,9 +6740,9 @@ function _p9k_clear_instant_prompt() { echo -E - "" echo -E - "${(%):-For details, see:}" if (( _p9k_term_has_href )); then - echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\e]8;;\a}" + echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k#instant-prompt\ahttps://github.com/romkatv/powerlevel10k#instant-prompt\e]8;;\a}" else - echo - "${(%):-https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt}" + echo - "${(%):-https://github.com/romkatv/powerlevel10k#instant-prompt}" fi echo -E - "" echo - "${(%):-%3F-- console output produced during zsh initialization follows --%f}" @@ -9007,9 +9007,9 @@ _p9k_init() { >&2 echo -E - "" >&2 echo -E - "${(%):- - %BRecommended%b: Change the way Powerlevel10k is loaded from %B$__p9k_zshrc_u%b.}" if (( _p9k_term_has_href )); then - >&2 echo - "${(%):- See \e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\e]8;;\a.}" + >&2 echo - "${(%):- See \e]8;;https://github.com/romkatv/powerlevel10k#installation\ahttps://github.com/romkatv/powerlevel10k#installation\e]8;;\a.}" else - >&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation.}" + >&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k#installation.}" fi if (( $+zsh_defer_options )); then >&2 echo -E - "" diff --git a/internal/wizard.zsh b/internal/wizard.zsh index f20a7af1..de416794 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1506,7 +1506,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)" From bde5ca4c2aa6e0c52dd7f15cf216dffdb1ec788c Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 21 May 2024 20:26:39 +0200 Subject: [PATCH 137/140] docs: the project is on life support --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index ebdc521d..70f68869 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ [![Gitter](https://badges.gitter.im/powerlevel10k/community.svg)]( 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). From df8ed163438c1989da4daeb4174bfcb30abb285e Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 28 Jun 2024 08:06:46 +0200 Subject: [PATCH 138/140] wizard: prefer POWERLEVEL9K_MODE=nerdfont-v3 over nerdfont-complete" The preference for nerdfont-complete was necessitated by a bug in Windows Terminal that has since been fixed. This reverts commit b474978b2e9435c10ca66f8281352ebc825264f4. wizard: prefer POWERLEVEL9K_MODE=nerdfont-complete over nerdfont-v3 See the reverted commit for details on the Windows Terminal bug. --- internal/wizard.zsh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index de416794..8d20675c 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -2142,16 +2142,16 @@ while true; do elif (( ! cap_diamond )); then POWERLEVEL9K_MODE=awesome-fontconfig else - ask_arrow '\uFC35' || continue + ask_arrow '\UF0737' || continue if (( cap_arrow )); then - POWERLEVEL9K_MODE=nerdfont-complete + ask_width || continue + fi + if (( cap_arrow )); then + POWERLEVEL9K_MODE=nerdfont-v3 else - ask_arrow '\UF0737' "Let's try another one." || continue + ask_arrow '\uFC35' "Let's try another one." || continue if (( cap_arrow )); then - ask_width || continue - fi - if (( cap_arrow )); then - POWERLEVEL9K_MODE=nerdfont-v3 + POWERLEVEL9K_MODE=nerdfont-complete else POWERLEVEL9K_MODE=awesome-fontconfig ask_python || continue From 4a2ef610ef893b47a539327195050adb50cbaf06 Mon Sep 17 00:00:00 2001 From: Eli Weiss Date: Sun, 30 Jun 2024 10:01:00 -0400 Subject: [PATCH 139/140] Add instructions on setting Conemu font Add instructions on setting font to MesloLGS NF in Conemu --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 70f68869..884cb21f 100644 --- a/README.md +++ b/README.md @@ -675,6 +675,7 @@ If you are using a different terminal, proceed with manual font installation. - **Windows Terminal** by Microsoft (the new thing): Open *Settings* (Ctrl+,), 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`. From 2b7da93df04acd04d84f5de827e5b14077839a4b Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 1 Jul 2024 08:34:13 +0200 Subject: [PATCH 140/140] docs: fixup for #2718 --- font.md | 1 + 1 file changed, 1 insertion(+) diff --git a/font.md b/font.md index d025bde0..7a7cb005 100644 --- a/font.md +++ b/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* (Ctrl+,), 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`.