Skip to content

Instantly share code, notes, and snippets.

@pravinsingh
Last active March 16, 2023 02:08
Show Gist options
  • Save pravinsingh/2f777d786ae6cd07f6f46fc19990a402 to your computer and use it in GitHub Desktop.
Save pravinsingh/2f777d786ae6cd07f6f46fc19990a402 to your computer and use it in GitHub Desktop.
# The right end of left prompt.
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
# The left end of right prompt.
typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2'
# The left end of left prompt.
typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%F{#444444}\u2588%s%F{#888888}\u2588%s%F{#CCCCCC}\u2588%s'
# The right end of right prompt.
typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='%F{#CCCCCC}\u2588%s%F{#888888}\u2588%s%F{#444444}\u2588%s'

Powerlevel10k Prompt Color Gradients

There are many articles on the Internet explaining how to setup and customize zsh using Oh My Zsh and Powerlevel10k, but none of them explains how ot get a color gradient at the beginning/end of the prompt like this one:

image

or this one:

image

Use this code snippet at the appropriate place in your .p10k.zsh to get the gradients on the outside and arrow triangles on the inside of your prompts:

image

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