Skip to content

Instantly share code, notes, and snippets.

@romkatv
Last active March 16, 2023 17:44
Show Gist options
  • Save romkatv/afdbb534051304ef0e2e85a46adb276f to your computer and use it in GitHub Desktop.
Save romkatv/afdbb534051304ef0e2e85a46adb276f to your computer and use it in GitHub Desktop.
monochrome-powerlevel10k.zsh

Here's how it looks with White on Black color scheme:

white-on-black

Tango Dark

tango-dark

Solarized Light

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
}
@romkatv
Copy link
Author

romkatv commented Mar 16, 2023

iTerm2 doesn't have builtin support for unicode block elements.

@romkatv
Copy link
Author

romkatv commented Mar 16, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment