From 808ba80ab005cdb66be19d2c22695c9bab9747f3 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 23 Apr 2024 08:11:19 +0200 Subject: [PATCH 1/9] 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 2/9] 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 3/9] 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 4/9] 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 5/9] 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 6/9] 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 7/9] 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 8/9] 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 9/9] 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`.