Here's how it looks with White on Black color scheme:
Tango Dark
Solarized Light
# Run `p10k configure` and select "Classic" style. | |
# Then run this script to convert`~/.p10k.zsh` to "Monochrome" style. | |
() { | |
emulate -L zsh | |
local extra=( | |
'typeset -g POWERLEVEL9K_BACKGROUND=' | |
'typeset -g POWERLEVEL9K_FOREGROUND=' | |
'typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL="%f$POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL%S"' | |
'typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL="%s%f$POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL"' | |
'typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL="%f$POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL%S"' | |
'typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL="%s%f$POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL"' | |
) | |
command sed -E -i.bak \ | |
-e '/(BACKGROUND|FOREGROUND|VISUAL_IDENTIFIER_COLOR)=/d' \ | |
-e 's/%[[:digit:]]*F//g' \ | |
-e "s/^\\}\$/${(j:; :)extra} }/" \ | |
~/.p10k.zsh | |
} |
@pravinsingh Alternatively, you can use a terminal with a builtin support for unicode block elements and choose Blurred heads and tails in the configuration wizard. That's how the screenshots above and on the powerlevel10k homepage were produced.
@romkatv On my terminal (iTerm on Mac), the blurred heads from the config wizard look like this:
but the code I have can still create this in my Terminal:
I have spent a lot of time trying to get the heads like in your screenshots and I finally got it right after a lot of hit-and-trial (based on your this gist, so thank you).
iTerm2 doesn't have builtin support for unicode block elements.
Also relevant: romkatv/powerlevel10k#537 (comment)
If anyone is wondering how to get these color gradients at the beginning/end of the prompt, I created a gist that you can use in your
.p10k.zsh