dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

p10k-dark.zsh (62976B)


      1 # Generated by Powerlevel10k configuration wizard on 2020-02-01 at 15:43 CET.
      2 # Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 15097.
      3 # Wizard options: nerdfont-complete + powerline, small icons, classic, darkest, time,
      4 # angled separators, blurred heads, flat tails, 1 line, compact, few icons, concise,
      5 # instant_prompt=quiet.
      6 # Type `p10k configure` to generate another config.
      7 #
      8 # Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate
      9 # your own config based on it.
     10 #
     11 # Tip: Looking for a nice color? Here's a one-liner to print colormap.
     12 #
     13 #   for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%8)):#7}:+$'\n'}; done
     14 
     15 # Temporarily change options.
     16 'builtin' 'local' '-a' 'p10k_config_opts'
     17 [[ ! -o 'aliases'         ]] || p10k_config_opts+=('aliases')
     18 [[ ! -o 'sh_glob'         ]] || p10k_config_opts+=('sh_glob')
     19 [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')
     20 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
     21 
     22 () {
     23   emulate -L zsh
     24   setopt no_unset extended_glob
     25 
     26   # Unset all configuration options. This allows you to apply configiguration changes without
     27   # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.
     28   unset -m 'POWERLEVEL9K_*'
     29 
     30   autoload -Uz is-at-least && is-at-least 5.1 || return
     31 
     32   zmodload zsh/langinfo
     33   if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then
     34     local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8}
     35   fi
     36 
     37   # The list of segments shown on the left. Fill it with the most important segments.
     38   typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
     39     # os_icon               # os identifier
     40     dir                     # current directory
     41     vcs                     # git status
     42     nest_level
     43     status                  # exit code of the last command
     44     # prompt_char           # prompt symbol
     45   )
     46 
     47   # The list of segments shown on the right. Fill it with less important segments.
     48   # Right prompt on the last prompt line (where you are typing your commands) gets
     49   # automatically hidden when the input line reaches it. Right prompt above the
     50   # last prompt line gets hidden if it would overlap with left prompt.
     51   typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
     52     bitwarden_session_status # how much longer until Bitwarden locks
     53     command_execution_time  # duration of the last command
     54     background_jobs         # presence of background jobs
     55     # direnv                  # direnv status (https://direnv.net/)
     56     virtualenv              # python virtual environment (https://docs.python.org/3/library/venv.html)
     57     # anaconda                # conda environment (https://conda.io/)
     58     # pyenv                   # python environment (https://github.com/pyenv/pyenv)
     59     # goenv                   # go environment (https://github.com/syndbg/goenv)
     60     # nodenv                  # node.js version from nodenv (https://github.com/nodenv/nodenv)
     61     # nvm                     # node.js version from nvm (https://github.com/nvm-sh/nvm)
     62     # nodeenv                 # node.js environment (https://github.com/ekalinin/nodeenv)
     63     # node_version          # node.js version
     64     # go_version            # go version (https://golang.org)
     65     # rust_version          # rustc version (https://www.rust-lang.org)
     66     # dotnet_version        # .NET version (https://dotnet.microsoft.com)
     67     rbenv                   # ruby version from rbenv (https://github.com/rbenv/rbenv)
     68     # rvm                     # ruby version from rvm (https://rvm.io)
     69     # fvm                     # flutter version management (https://github.com/leoafarias/fvm)
     70     # luaenv                  # lua version from luaenv (https://github.com/cehoffman/luaenv)
     71     # jenv                    # java version from jenv (https://github.com/jenv/jenv)
     72     # plenv                   # perl version from plenv (https://github.com/tokuhirom/plenv)
     73     # kubecontext             # current kubernetes context (https://kubernetes.io/)
     74     # terraform               # terraform workspace (https://www.terraform.io)
     75     # aws                     # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
     76     # aws_eb_env              # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
     77     # azure                   # azure account name (https://docs.microsoft.com/en-us/cli/azure)
     78     # gcloud                  # google cloud cli account and project (https://cloud.google.com/)
     79     # google_app_cred         # google application credentials (https://cloud.google.com/docs/authentication/production)
     80     context                 # user@hostname
     81     # nordvpn                 # nordvpn connection status, linux only (https://nordvpn.com/)
     82     # ranger                  # ranger shell (https://github.com/ranger/ranger)
     83     # nnn                     # nnn shell (https://github.com/jarun/nnn)
     84     vim_shell               # vim shell indicator (:sh)
     85     # midnight_commander      # midnight commander shell (https://midnight-commander.org/)
     86     # nix_shell               # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
     87     # vi_mode                 # vi mode (you don't need this if you've enabled prompt_char)
     88     # vpn_ip                # virtual private network indicator
     89     # load                  # CPU load
     90     # disk_usage            # disk usage
     91     # ram                   # free RAM
     92     # swap                  # used swap
     93     # todo                    # todo items (https://github.com/todotxt/todo.txt-cli)
     94     # timewarrior             # timewarrior tracking status (https://timewarrior.net/)
     95     time                    # current time
     96     # public_ip             # public IP address
     97     # proxy                 # system-wide http/https/ftp proxy
     98     # battery               # internal battery
     99     # example               # example user-defined segment (see prompt_example function below)
    100   )
    101 
    102   # To enable default icons for all segments, don't define POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION
    103   # or set it to '${P9K_VISUAL_IDENTIFIER}'.
    104   #
    105   # To remove trailing space from all default icons, set POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION
    106   # to '${P9K_VISUAL_IDENTIFIER% }'.
    107   #
    108   # To enable default icons for one segment (e.g., dir), set
    109   # POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'.
    110   #
    111   # To assign a specific icon to one segment (e.g., dir), set
    112   # POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='⭐'.
    113   #
    114   # To assign a specific icon to a segment in a given state (e.g., dir in state NOT_WRITABLE),
    115   # set POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'.
    116   #
    117   # Note: You can use $'\u2B50' instead of '⭐'. It's especially convenient when specifying
    118   # icons that your text editor cannot render. Don't forget to put $ and use single quotes when
    119   # defining icons via Unicode codepoints.
    120   #
    121   # Note: Many default icons cannot be displayed with system fonts. You'll need to install a
    122   # capable font to use them. See POWERLEVEL9K_MODE below.
    123   typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER// }'
    124 
    125   # This option makes a difference only when default icons are enabled for all or some prompt
    126   # segments (see POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION above). LOCK_ICON can be printed as
    127   # $'\uE0A2', $'\uE138' or $'\uF023' depending on POWERLEVEL9K_MODE. The correct value of this
    128   # parameter depends on the provider of the font your terminal is using.
    129   #
    130   #   Font Provider                    | POWERLEVEL9K_MODE
    131   #   ---------------------------------+-------------------
    132   #   Powerline                        | powerline
    133   #   Font Awesome                     | awesome-fontconfig
    134   #   Adobe Source Code Pro            | awesome-fontconfig
    135   #   Source Code Pro                  | awesome-fontconfig
    136   #   Awesome-Terminal Fonts (regular) | awesome-fontconfig
    137   #   Awesome-Terminal Fonts (patched) | awesome-patched
    138   #   Nerd Fonts                       | nerdfont-complete
    139   #   Other                            | compatible
    140   #
    141   # If this looks overwhelming, either stick with a preinstalled system font and set
    142   # POWERLEVEL9K_MODE=compatible, or install the recommended Powerlevel10k font from
    143   # https://github.com/romkatv/powerlevel10k/#recommended-meslo-nerd-font-patched-for-powerlevel10k
    144   # and set POWERLEVEL9K_MODE=nerdfont-complete.
    145   typeset -g POWERLEVEL9K_MODE=nerdfont-complete
    146 
    147   # When set to true, icons appear before content on both sides of the prompt. When set
    148   # to false, icons go after content. If empty or not set, icons go before content in the left
    149   # prompt and after content in the right prompt.
    150   #
    151   # You can also override it for a specific segment:
    152   #
    153   #   POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false
    154   #
    155   # Or for a specific segment in specific state:
    156   #
    157   #   POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false
    158   typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=
    159 
    160   # Add an empty line before each prompt.
    161   typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
    162 
    163   # Connect left prompt lines with these symbols. You'll probably want to use the same color
    164   # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below.
    165   typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%238F╭─'
    166   typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%238F├─'
    167   typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%238F╰─'
    168   # Connect right prompt lines with these symbols.
    169   typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%238F─╮'
    170   typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%238F─┤'
    171   typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%238F─╯'
    172 
    173   # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or
    174   # '─'. The last two make it easier to see the alignment between left and right prompt and to
    175   # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
    176   # for more compact prompt if using using this option.
    177   typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '
    178   typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=
    179   if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then
    180     # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE
    181     # ornaments defined above.
    182     typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=238
    183     # Start filler from the edge of the screen if there are no left segments on the first line.
    184     typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
    185     # End filler on the edge of the screen if there are no right segments on the first line.
    186     typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'
    187   fi
    188 
    189   # Default background color.
    190   typeset -g POWERLEVEL9K_BACKGROUND=234
    191 
    192   # Separator between same-color segments on the left.
    193   typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%242F\uE0B1'
    194   # Separator between same-color segments on the right.
    195   typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='%242F\uE0B3'
    196   # Separator between different-color segments on the left.
    197   typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
    198   # Separator between different-color segments on the right.
    199   typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
    200   # The right end of left prompt.
    201   typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='▓▒░'
    202   # The left end of right prompt.
    203   typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='░▒▓'
    204   # The left end of left prompt.
    205   typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=''
    206   # The right end of right prompt.
    207   typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
    208   # Left prompt terminator for lines without any segments.
    209   typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=
    210 
    211   #################################[ os_icon: os identifier ]##################################
    212   # OS identifier color.
    213   typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255
    214   # Make the icon bold.
    215   typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT// }'
    216 
    217   ################################[ prompt_char: prompt symbol ]################################
    218   # Transparent background.
    219   typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND=
    220   # Green prompt symbol if the last command succeeded.
    221   typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76
    222   # Red prompt symbol if the last command failed.
    223   typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196
    224   # Default prompt symbol.
    225   typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
    226   # Prompt symbol in command vi mode.
    227   typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
    228   # Prompt symbol in visual vi mode.
    229   typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='Ⅴ'
    230   # Prompt symbol in overwrite vi mode.
    231   typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'
    232   typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
    233   # No line terminator if prompt_char is the last segment.
    234   typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=
    235   # No line introducer if prompt_char is the first segment.
    236   typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
    237   # No surrounding whitespace.
    238   typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE=
    239 
    240   ##################################[ dir: current directory ]##################################
    241   # Default current directory color.
    242   typeset -g POWERLEVEL9K_DIR_FOREGROUND=31
    243   # If directory is too long, shorten some of its segments to the shortest possible unique
    244   # prefix. The shortened directory can be tab-completed to the original.
    245   typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
    246   # Replace removed segment suffixes with this symbol.
    247   typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
    248   # Color of the shortened directory segments.
    249   typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
    250   # Color of the anchor directory segments. Anchor segments are never shortened. The first
    251   # segment is always an anchor.
    252   typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39
    253   # Display anchor directory segments in bold.
    254   typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
    255   # Don't shorten directories that contain any of these files. They are anchors.
    256   local anchor_files=(
    257     .bzr
    258     .citc
    259     .git
    260     .hg
    261     .node-version
    262     .python-version
    263     .ruby-version
    264     .shorten_folder_marker
    265     .svn
    266     .terraform
    267     CVS
    268     Cargo.toml
    269     composer.json
    270     go.mod
    271     package.json
    272   )
    273   typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})"
    274   # Don't shorten this many last directory segments. They are anchors.
    275   typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
    276   # Shorten directory if it's longer than this even if there is space for it. The value can
    277   # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,
    278   # directory will be shortened only when prompt doesn't fit or when other parameters demand it
    279   # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).
    280   # If set to `0`, directory will always be shortened to its minimum length.
    281   typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
    282   # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
    283   # many columns for typing commands.
    284   typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
    285   # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least
    286   # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.
    287   typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
    288   # If set to true, embed a hyperlink into the directory. Useful for quickly
    289   # opening a directory in the file manager simply by clicking the link.
    290   # Can also be handy when the directory is shortened, as it allows you to see
    291   # the full directory that was used in previous commands.
    292   typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
    293 
    294   # Enable special styling for non-writable directories.
    295   typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=true
    296   # Show this icon when the current directory is not writable. POWERLEVEL9K_DIR_SHOW_WRITABLE
    297   # above must be set to true for this parameter to have effect.
    298   # typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
    299 
    300   # Custom prefix.
    301   # typeset -g POWERLEVEL9K_DIR_PREFIX='%244Fin '
    302 
    303   # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons for different directories.
    304   # It must be an array with 3 * N elements. Each triplet consists of:
    305   #
    306   #   1. A pattern against which the current directory is matched. Matching is done with
    307   #      extended_glob option enabled.
    308   #   2. Directory class for the purpose of styling.
    309   #   3. Icon.
    310   #
    311   # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. If there
    312   # are no matches, the directory will have no icon.
    313   #
    314   # Example:
    315   #
    316   #   typeset -g POWERLEVEL9K_DIR_CLASSES=(
    317   #       '~/work(|/*)'  WORK     '(╯°□°)╯︵ ┻━┻'
    318   #       '~(|/*)'       HOME     '⌂'
    319   #       '*'            DEFAULT  '')
    320   #
    321   # With these settings, the current directory in the prompt may look like this:
    322   #
    323   #   (╯°□°)╯︵ ┻━┻ ~/work/projects/important/urgent
    324   #
    325   # Or like this:
    326   #
    327   #   ⌂ ~/best/powerlevel10k
    328   #
    329   # You can also set different colors for directories of different classes. Remember to override
    330   # FOREGROUND, SHORTENED_FOREGROUND and ANCHOR_FOREGROUND for every directory class that you wish
    331   # to have its own color.
    332   #
    333   #   typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31
    334   #   typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103
    335   #   typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39
    336   #
    337   typeset -g POWERLEVEL9K_DIR_CLASSES=()
    338 
    339   #####################################[ vcs: git status ]######################################
    340   # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
    341   typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
    342   POWERLEVEL9K_VCS_BRANCH_ICON=${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}
    343 
    344   # Untracked files icon. It's really a question mark, your font isn't broken.
    345   # Change the value of this parameter to show a different icon.
    346   typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
    347   POWERLEVEL9K_VCS_UNTRACKED_ICON=${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}
    348 
    349   # Formatter for Git status.
    350   #
    351   # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
    352   #
    353   # You can edit the function to customize how Git status looks.
    354   #
    355   # VCS_STATUS_* parameters are set by gitstatus plugin. See reference:
    356   # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.
    357   function my_git_formatter() {
    358     emulate -L zsh
    359 
    360     if [[ -n $P9K_CONTENT ]]; then
    361       # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from
    362       # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.
    363       typeset -g my_git_format=$P9K_CONTENT
    364       return
    365     fi
    366 
    367     if (( $1 )); then
    368       # Styling for up-to-date Git status.
    369       local       meta='%244F'  # grey foreground
    370       local      clean='%76F'   # green foreground
    371       local   modified='%178F'  # yellow foreground
    372       local  untracked='%39F'   # blue foreground
    373       local conflicted='%196F'  # red foreground
    374     else
    375       # Styling for incomplete and stale Git status.
    376       local       meta='%244F'  # grey foreground
    377       local      clean='%244F'  # grey foreground
    378       local   modified='%244F'  # grey foreground
    379       local  untracked='%244F'  # grey foreground
    380       local conflicted='%244F'  # grey foreground
    381     fi
    382 
    383     local res
    384     local where  # branch or tag
    385     if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
    386       res+="${clean}${POWERLEVEL9K_VCS_BRANCH_ICON}"
    387       where=${(V)VCS_STATUS_LOCAL_BRANCH}
    388     elif [[ -n $VCS_STATUS_TAG ]]; then
    389       res+="${meta}#"
    390       where=${(V)VCS_STATUS_TAG}
    391     fi
    392 
    393     # If local branch name or tag is at most 32 characters long, show it in full.
    394     # Otherwise show the first 12 … the last 12.
    395     (( $#where > 32 )) && where[13,-13]="…"
    396     res+="${clean}${where//\%/%%}"  # escape %
    397 
    398     # Display the current Git commit if there is no branch or tag.
    399     # Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line.
    400     [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
    401 
    402     # Show tracking branch name if it differs from local branch.
    403     if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
    404       res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"  # escape %
    405     fi
    406 
    407     # ⇣42 if behind the remote.
    408     (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
    409     # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
    410     (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
    411     (( VCS_STATUS_COMMITS_AHEAD  )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
    412     # *42 if have stashes.
    413     (( VCS_STATUS_STASHES        )) && res+=" ${clean}*${VCS_STATUS_STASHES}"
    414     # 'merge' if the repo is in an unusual state.
    415     [[ -n $VCS_STATUS_ACTION     ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}"
    416     # ~42 if have merge conflicts.
    417     (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}"
    418     # +42 if have staged changes.
    419     (( VCS_STATUS_NUM_STAGED     )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}"
    420     # !42 if have unstaged changes.
    421     (( VCS_STATUS_NUM_UNSTAGED   )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}"
    422     # ?42 if have untracked files. It's really a question mark, your font isn't broken.
    423     # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.
    424     # Remove the next line if you don't want to see untracked files at all.
    425     (( VCS_STATUS_NUM_UNTRACKED  )) && res+=" ${untracked}${POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}"
    426 
    427     typeset -g my_git_format=$res
    428   }
    429   functions -M my_git_formatter 2>/dev/null
    430 
    431   # Disable the default Git status formatting.
    432   typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
    433   # Install our own Git status formatter.
    434   typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'
    435   typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'
    436   # Enable counters for staged, unstaged, etc.
    437   typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
    438 
    439   # Icon color.
    440   typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76
    441   typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244
    442   # Custom icon.
    443   typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION=
    444   # Custom prefix.
    445   # typeset -g POWERLEVEL9K_VCS_PREFIX='%244Fon '
    446 
    447   # Show status of repositories of these types. You can add svn and/or hg if you are
    448   # using them. If you do, your prompt may become slow even when your current directory
    449   # isn't in an svn or hg reposotiry.
    450   typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
    451 
    452   # These settings are used for respositories other than Git or when gitstatusd fails and
    453   # Powerlevel10k has to fall back to using vcs_info.
    454   typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76
    455   typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76
    456   typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178
    457 
    458   ##########################[ status: exit code of the last command ]###########################
    459   # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and
    460   # style them independently from the regular OK and ERROR state.
    461   typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
    462 
    463   # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as
    464   # it will signify success by turning green.
    465   typeset -g POWERLEVEL9K_STATUS_OK=false
    466   typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70
    467   typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
    468 
    469   # Status when some part of a pipe command fails but the overall exit status is zero. It may look
    470   # like this: 1|0.
    471   typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true
    472   typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70
    473   typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
    474 
    475   # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as
    476   # it will signify error by turning red.
    477   typeset -g POWERLEVEL9K_STATUS_ERROR=true
    478   typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160
    479   typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
    480 
    481   # Status when the last command was terminated by a signal.
    482   typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
    483   typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160
    484   # Use terse signal names: "INT" instead of "SIGINT(2)".
    485   typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
    486   typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
    487 
    488   # Status when some part of a pipe command fails and the overall exit status is also non-zero.
    489   # It may look like this: 1|0.
    490   typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
    491   typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160
    492   typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
    493 
    494   ###################[ command_execution_time: duration of the last command ]###################
    495   # Show duration of the last command if takes longer than this many seconds.
    496   typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
    497   # Show this many fractional digits. Zero means round to seconds.
    498   typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
    499   # Execution time color.
    500   typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=248
    501   # Duration format: 1d 2h 3m 4s.
    502   typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
    503   # Custom icon.
    504   typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION=
    505   # Custom prefix.
    506   # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%244Ftook '
    507 
    508   #######################[ background_jobs: presence of background jobs ]#######################
    509   # Don't show the number of background jobs.
    510   typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
    511   # Background jobs color.
    512   typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=37
    513   # Custom icon.
    514   # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'
    515 
    516   #######################[ direnv: direnv status (https://direnv.net/) ]########################
    517   # Direnv color.
    518   typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178
    519   # Custom icon.
    520   # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    521 
    522   ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########
    523   # NordVPN connection indicator color.
    524   typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39
    525   # Hide NordVPN connection indicator when not connected.
    526   typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=
    527   typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=
    528   # Custom icon.
    529   # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'
    530 
    531   #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################
    532   # Ranger shell color.
    533   typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
    534   # Custom icon.
    535   # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
    536 
    537   ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
    538   # Nnn shell color.
    539   typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
    540   # Custom icon.
    541   # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
    542 
    543   ###########################[ vim_shell: vim shell indicator (:sh) ]###########################
    544   # Vim shell indicator color.
    545   typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
    546   # Custom icon.
    547   # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
    548 
    549   ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
    550   # Midnight Commander shell color.
    551   typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178
    552   # Custom icon.
    553   # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'
    554 
    555   #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##
    556   # Nix shell color.
    557   typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
    558 
    559   # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
    560   # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
    561 
    562   # Custom icon.
    563   # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
    564 
    565   ##################################[ disk_usgae: disk usage ]##################################
    566   # Colors for different levels of disk usage.
    567   typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
    568   typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220
    569   typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160
    570   # Thresholds for different levels of disk usage (percentage points).
    571   typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
    572   typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
    573   # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.
    574   typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false
    575   # Custom icon.
    576   # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
    577 
    578   ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]###########
    579   # Text and color for normal (a.k.a. command) vi mode.
    580   typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL
    581   typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=106
    582   # Text and color for visual vi mode.
    583   typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL
    584   typeset -g POWERLEVEL9K_VI_MODE_VISUAL_FOREGROUND=68
    585   # Text and color for overtype (a.k.a. overwrite and replace) vi mode.
    586   typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE
    587   typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_FOREGROUND=172
    588   # Text and color for insert vi mode.
    589   typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
    590   typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66
    591 
    592   # Custom icon.
    593   # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
    594 
    595   ######################################[ ram: free RAM ]#######################################
    596   # RAM color.
    597   typeset -g POWERLEVEL9K_RAM_FOREGROUND=66
    598   # Custom icon.
    599   # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'
    600 
    601   #####################################[ swap: used swap ]######################################
    602   # Swap color.
    603   typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96
    604   # Custom icon.
    605   # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'
    606 
    607   ######################################[ load: CPU load ]######################################
    608   # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.
    609   typeset -g POWERLEVEL9K_LOAD_WHICH=5
    610   # Load color when load is under 50%.
    611   typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66
    612   # Load color when load is between 50% and 70%.
    613   typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178
    614   # Load color when load is over 70%.
    615   typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166
    616   # Custom icon.
    617   # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'
    618 
    619   ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################
    620   # Todo color.
    621   typeset -g POWERLEVEL9K_TODO_FOREGROUND=110
    622   # Hide todo when the total number of tasks is zero.
    623   typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true
    624   # Hide todo when the number of tasks after filtering is zero.
    625   typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false
    626 
    627   # Todo format. The following parameters are available within the expansion.
    628   #
    629   # - P9K_TODO_TOTAL_TASK_COUNT     The total number of tasks.
    630   # - P9K_TODO_FILTERED_TASK_COUNT  The number of tasks after filtering.
    631   #
    632   # These variables correspond to the last line of the output of `todo.sh -p ls`:
    633   #
    634   #   TODO: 24 of 42 tasks shown
    635   #
    636   # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.
    637   #
    638   # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'
    639 
    640   # Custom icon.
    641   # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'
    642 
    643   ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############
    644   # Timewarrior color.
    645   typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110
    646   # If the tracked task is longer than 24 characters, truncate and append "…".
    647   # Tip: To always display tasks without truncation, delete the following parameter.
    648   # Tip: To hide task names and display just the icon when time tracking is enabled, set the
    649   # value of the following parameter to "".
    650   typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'
    651 
    652   # Custom icon.
    653   # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
    654 
    655   ##################################[ context: user@hostname ]##################################
    656   # Context color when running with privileges.
    657   typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
    658   # Context color in SSH without privileges.
    659   typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180
    660   # Default context color (no privileges, no SSH).
    661   typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180
    662 
    663   # Context format when running with privileges: bold user@hostname.
    664   typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'
    665   # Context format when in SSH without privileges: user@hostname.
    666   typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
    667   # Default context format (no privileges, no SSH): user@hostname.
    668   typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
    669 
    670   # Don't show context unless running with privileges or in SSH.
    671   # Tip: Remove the next line to always show context.
    672   typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
    673 
    674   # Custom icon.
    675   # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
    676   # Custom prefix.
    677   # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%244Fwith '
    678 
    679   ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
    680   # Python virtual environment color.
    681   typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
    682   # Don't show Python version next to the virtual environment name.
    683   typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
    684   # Separate environment name from Python version only with a space.
    685   typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
    686   # Custom icon.
    687   # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    688 
    689   #####################[ anaconda: conda environment (https://conda.io/) ]######################
    690   # Anaconda environment color.
    691   typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37
    692   # Don't show Python version next to the anaconda environment name.
    693   typeset -g POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION=false
    694   # Separate environment name from Python version only with a space.
    695   typeset -g POWERLEVEL9K_ANACONDA_{LEFT,RIGHT}_DELIMITER=
    696   # Custom icon.
    697   # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'
    698 
    699   ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################
    700   # Pyenv color.
    701   typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37
    702   # Hide python version if it doesn't come from one of these sources.
    703   typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)
    704   # If set to false, hide python version if it's the same as global:
    705   # $(pyenv version-name) == $(pyenv global).
    706   typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
    707   # Custom icon.
    708   # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    709 
    710   ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
    711   # Goenv color.
    712   typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37
    713   # Hide go version if it doesn't come from one of these sources.
    714   typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)
    715   # If set to false, hide go version if it's the same as global:
    716   # $(goenv version-name) == $(goenv global).
    717   typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false
    718   # Custom icon.
    719   # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    720 
    721   ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########
    722   # Nodenv color.
    723   typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70
    724   # Don't show node version if it's the same as global: $(nodenv version-name) == $(nodenv global).
    725   typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false
    726   # Custom icon.
    727   # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    728 
    729   ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
    730   # Nvm color.
    731   typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
    732   # Custom icon.
    733   # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
    734 
    735   ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############
    736   # Nodeenv color.
    737   typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70
    738   # Don't show Node version next to the environment name.
    739   typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false
    740   # Separate environment name from Node version only with a space.
    741   typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=
    742   # Custom icon.
    743   # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    744 
    745   ##############################[ node_version: node.js version ]###############################
    746   # Node version color.
    747   typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70
    748   # Show node version only when in a directory tree containing package.json.
    749   typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
    750   # Custom icon.
    751   # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
    752 
    753   #######################[ go_version: go version (https://golang.org) ]########################
    754   # Go version color.
    755   typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37
    756   # Show go version only when in a go project subdirectory.
    757   typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
    758   # Custom icon.
    759   # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
    760 
    761   #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################
    762   # Rust version color.
    763   typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37
    764   # Show rust version only when in a rust project subdirectory.
    765   typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
    766   # Custom icon.
    767   # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
    768 
    769   ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################
    770   # .NET version color.
    771   typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134
    772   # Show .NET version only when in a .NET project subdirectory.
    773   typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true
    774   # Custom icon.
    775   # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
    776 
    777   #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############
    778   # Rbenv color.
    779   typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168
    780   # Hide ruby version if it doesn't come from one of these sources.
    781   typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)
    782   # If set to false, hide ruby version if it's the same as global:
    783   # $(rbenv version-name) == $(rbenv global).
    784   typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false
    785   # Custom icon.
    786   # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    787 
    788   #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################
    789   # Rvm color.
    790   typeset -g POWERLEVEL9K_RVM_FOREGROUND=168
    791   # Don't show @gemset at the end.
    792   typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false
    793   # Don't show ruby- at the front.
    794   typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false
    795   # Custom icon.
    796   # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
    797 
    798   ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############
    799   # Fvm color.
    800   typeset -g POWERLEVEL9K_FVM_FOREGROUND=38
    801   # Custom icon.
    802   # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
    803 
    804   ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########
    805   # Lua color.
    806   typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32
    807   # Hide lua version if it doesn't come from one of these sources.
    808   typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)
    809   # If set to false, hide lua version if it's the same as global:
    810   # $(luaenv version-name) == $(luaenv global).
    811   typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false
    812   # Custom icon.
    813   # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    814 
    815   ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################
    816   # Java color.
    817   typeset -g POWERLEVEL9K_JENV_FOREGROUND=32
    818   # Hide java version if it doesn't come from one of these sources.
    819   typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)
    820   # If set to false, hide java version if it's the same as global:
    821   # $(jenv version-name) == $(jenv global).
    822   typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false
    823   # Custom icon.
    824   # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    825 
    826   ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############
    827   # Perl color.
    828   typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67
    829   # Hide perl version if it doesn't come from one of these sources.
    830   typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)
    831   # If set to false, hide perl version if it's the same as global:
    832   # $(plenv version-name) == $(plenv global).
    833   typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false
    834   # Custom icon.
    835   # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    836 
    837   ################[ terraform: terraform workspace (https://www.terraform.io) ]#################
    838   # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element
    839   # in each pair defines a pattern against which the current terraform workspace gets matched.
    840   # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
    841   # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,
    842   # you'll see this value in your prompt. The second element of each pair in
    843   # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The
    844   # first match wins.
    845   #
    846   # For example, given these settings:
    847   #
    848   #   typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
    849   #     '*prod*'  PROD
    850   #     '*test*'  TEST
    851   #     '*'       DEFAULT)
    852   #
    853   # If your current terraform workspace is "project_test", its class is TEST because "project_test"
    854   # doesn't match the pattern '*prod*' but does match '*test*'.
    855   #
    856   # You can define different colors, icons and content expansions for different classes:
    857   #
    858   #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28
    859   #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
    860   #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
    861   typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
    862       # '*prod*'  PROD    # These values are examples that are unlikely
    863       # '*test*'  TEST    # to match your needs. Customize them as needed.
    864       '*'       DEFAULT)
    865   typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_FOREGROUND=38
    866   # typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
    867 
    868   #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
    869   # Show kubecontext only when the the command you are typing invokes one of these tools.
    870   # Tip: Remove the next line to always show kubecontext.
    871   typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc'
    872 
    873   # Kubernetes context classes for the purpose of using different colors, icons and expansions with
    874   # different contexts.
    875   #
    876   # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element
    877   # in each pair defines a pattern against which the current kubernetes context gets matched.
    878   # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
    879   # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,
    880   # you'll see this value in your prompt. The second element of each pair in
    881   # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The
    882   # first match wins.
    883   #
    884   # For example, given these settings:
    885   #
    886   #   typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
    887   #     '*prod*'  PROD
    888   #     '*test*'  TEST
    889   #     '*'       DEFAULT)
    890   #
    891   # If your current kubernetes context is "deathray-testing/default", its class is TEST
    892   # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'.
    893   #
    894   # You can define different colors, icons and content expansions for different classes:
    895   #
    896   #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28
    897   #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
    898   #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
    899   typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
    900       # '*prod*'  PROD    # These values are examples that are unlikely
    901       # '*test*'  TEST    # to match your needs. Customize them as needed.
    902       '*'       DEFAULT)
    903   typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
    904   # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
    905 
    906   # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
    907   # segment. Parameter expansions are very flexible and fast, too. See reference:
    908   # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
    909   #
    910   # Within the expansion the following parameters are always available:
    911   #
    912   # - P9K_CONTENT                The content that would've been displayed if there was no content
    913   #                              expansion defined.
    914   # - P9K_KUBECONTEXT_NAME       The current context's name. Corresponds to column NAME in the
    915   #                              output of `kubectl config get-contexts`.
    916   # - P9K_KUBECONTEXT_CLUSTER    The current context's cluster. Corresponds to column CLUSTER in the
    917   #                              output of `kubectl config get-contexts`.
    918   # - P9K_KUBECONTEXT_NAMESPACE  The current context's namespace. Corresponds to column NAMESPACE
    919   #                              in the output of `kubectl config get-contexts`. If there is no
    920   #                              namespace, the parameter is set to "default".
    921   # - P9K_KUBECONTEXT_USER       The current context's user. Corresponds to column AUTHINFO in the
    922   #                              output of `kubectl config get-contexts`.
    923   #
    924   # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),
    925   # the following extra parameters are available:
    926   #
    927   # - P9K_KUBECONTEXT_CLOUD_NAME     Either "gke" or "eks".
    928   # - P9K_KUBECONTEXT_CLOUD_ACCOUNT  Account/project ID.
    929   # - P9K_KUBECONTEXT_CLOUD_ZONE     Availability zone.
    930   # - P9K_KUBECONTEXT_CLOUD_CLUSTER  Cluster.
    931   #
    932   # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,
    933   # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01":
    934   #
    935   #   - P9K_KUBECONTEXT_CLOUD_NAME=gke
    936   #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account
    937   #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a
    938   #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
    939   #
    940   # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01":
    941   #
    942   #   - P9K_KUBECONTEXT_CLOUD_NAME=eks
    943   #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
    944   #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
    945   #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
    946   typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
    947   # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
    948   POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
    949   # Append the current context's namespace if it's not "default".
    950   POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
    951 
    952   # Custom prefix.
    953   # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%244Fat '
    954 
    955   #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
    956   # Show aws only when the the command you are typing invokes one of these tools.
    957   # Tip: Remove the next line to always show aws.
    958   typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi'
    959 
    960   # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
    961   # in each pair defines a pattern against which the current AWS profile gets matched.
    962   # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
    963   # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,
    964   # you'll see this value in your prompt. The second element of each pair in
    965   # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The
    966   # first match wins.
    967   #
    968   # For example, given these settings:
    969   #
    970   #   typeset -g POWERLEVEL9K_AWS_CLASSES=(
    971   #     '*prod*'  PROD
    972   #     '*test*'  TEST
    973   #     '*'       DEFAULT)
    974   #
    975   # If your current AWS profile is "company_test", its class is TEST
    976   # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'.
    977   #
    978   # You can define different colors, icons and content expansions for different classes:
    979   #
    980   #   typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28
    981   #   typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
    982   #   typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
    983   typeset -g POWERLEVEL9K_AWS_CLASSES=(
    984       # '*prod*'  PROD    # These values are examples that are unlikely
    985       # '*test*'  TEST    # to match your needs. Customize them as needed.
    986       '*'       DEFAULT)
    987   typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
    988   # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
    989 
    990   #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
    991   # AWS Elastic Beanstalk environment color.
    992   typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70
    993   # Custom icon.
    994   # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
    995 
    996   ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
    997   # Show azure only when the the command you are typing invokes one of these tools.
    998   # Tip: Remove the next line to always show azure.
    999   typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi'
   1000   # Azure account name color.
   1001   typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
   1002   # Custom icon.
   1003   # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
   1004 
   1005   ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
   1006   # Show gcloud only when the the command you are typing invokes one of these tools.
   1007   # Tip: Remove the next line to always show gcloud.
   1008   typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'
   1009    # Google cloud color.
   1010   typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
   1011 
   1012   # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION if the default
   1013   # is too verbose or not informative enough.
   1014   #
   1015   #   P9K_GCLOUD_ACCOUNT: the output of `gcloud config get-value account`
   1016   #   P9K_GCLOUD_PROJECT: the output of `gcloud config get-value project`
   1017   #   ${VARIABLE//\%/%%}: ${VARIABLE} with all occurences of '%' replaced with '%%'.
   1018   #
   1019   typeset -g POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT//\%/%%}'
   1020 
   1021   # Custom icon.
   1022   # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
   1023 
   1024   #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
   1025   # Show google_app_cred only when the the command you are typing invokes one of these tools.
   1026   # Tip: Remove the next line to always show google_app_cred.
   1027   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi'
   1028 
   1029   # Google application credentials classes for the purpose of using different colors, icons and
   1030   # expansions with different credentials.
   1031   #
   1032   # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first
   1033   # element in each pair defines a pattern against which the current kubernetes context gets
   1034   # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion
   1035   # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION
   1036   # parameters, you'll see this value in your prompt. The second element of each pair in
   1037   # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.
   1038   # The first match wins.
   1039   #
   1040   # For example, given these settings:
   1041   #
   1042   #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
   1043   #     '*:*prod*:*'  PROD
   1044   #     '*:*test*:*'  TEST
   1045   #     '*'           DEFAULT)
   1046   #
   1047   # If your current Google application credentials is "service_account deathray-testing x@y.com",
   1048   # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.
   1049   #
   1050   # You can define different colors, icons and content expansions for different classes:
   1051   #
   1052   #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28
   1053   #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
   1054   #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'
   1055   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
   1056       # '*:*prod*:*'  PROD    # These values are examples that are unlikely
   1057       # '*:*test*:*'  TEST    # to match your needs. Customize them as needed.
   1058       '*'             DEFAULT)
   1059   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32
   1060   # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
   1061 
   1062   # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by
   1063   # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:
   1064   # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
   1065   #
   1066   # You can use the following parameters in the expansion. Each of them corresponds to one of the
   1067   # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.
   1068   #
   1069   #   Parameter                        | JSON key file field
   1070   #   ---------------------------------+---------------
   1071   #   P9K_GOOGLE_APP_CRED_TYPE         | type
   1072   #   P9K_GOOGLE_APP_CRED_PROJECT_ID   | project_id
   1073   #   P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email
   1074   #
   1075   # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurences of '%' replaced by '%%'.
   1076   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
   1077 
   1078   ###############################[ public_ip: public IP address ]###############################
   1079   # Public IP color.
   1080   typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
   1081   # Custom icon.
   1082   # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
   1083 
   1084   ########################[ vpn_ip: virtual private network indicator ]#########################
   1085   # VPN IP color.
   1086   typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81
   1087   # When on VPN, show just an icon without the IP address.
   1088   # Tip: To display the private IP address when on VPN, remove the next line.
   1089   typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
   1090   # Regular expression for the VPN network interface. Run ifconfig while on VPN to see the
   1091   # name of the interface.
   1092   typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(wg|(.*tun))[0-9]*'
   1093   # Custom icon.
   1094   # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
   1095 
   1096   #########################[ proxy: system-wide http/https/ftp proxy ]##########################
   1097   # Proxy color.
   1098   typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68
   1099   # Custom icon.
   1100   # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'
   1101 
   1102   ################################[ battery: internal battery ]#################################
   1103   # Show battery in red when it's below this level and not connected to power supply.
   1104   typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
   1105   typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
   1106   # Show battery in green when it's charging or fully charged.
   1107   typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70
   1108   # Show battery in yellow when it's discharging.
   1109   typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
   1110   # Battery pictograms going from low to high level of charge.
   1111   typeset -g POWERLEVEL9K_BATTERY_STAGES=$'\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'
   1112   # Don't show the remaining time to charge/discharge.
   1113   typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
   1114 
   1115   ####################################[ time: current time ]####################################
   1116   # Current time color.
   1117   typeset -g POWERLEVEL9K_TIME_FOREGROUND=66
   1118   # Format for the current time: 09:51:02. See `man 3 strftime`.
   1119   typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
   1120   # If set to true, time will update when you hit enter. This way prompts for the past
   1121   # commands will contain the start times of their commands as opposed to the default
   1122   # behavior where they contain the end times of their preceding commands.
   1123   typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
   1124   # Custom icon.
   1125   typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION=
   1126   # Custom prefix.
   1127   # typeset -g POWERLEVEL9K_TIME_PREFIX='%244Fat '
   1128 
   1129   # Example of a user-defined prompt segment. Function prompt_example will be called on every
   1130   # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
   1131   # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.
   1132   #
   1133   # Type `p10k help segment` for documentation and a more sophisticated example.
   1134   function prompt_example() {
   1135     p10k segment -f 208 -i '⭐' -t 'hello, %n'
   1136   }
   1137 
   1138   function hms {
   1139     local T=$1
   1140     local D=$((T/60/60/24))
   1141     local H=$((T/60/60%24))
   1142     local M=$((T/60%60))
   1143     local S=$((T%60))
   1144     (( $D > 0 )) && printf '%d:' $D
   1145     (( $H > 0 )) && printf '%d:' $H
   1146     (( $M > 0 )) && printf '%d' $M
   1147     (( $D > 0 || $H > 0 || $M > 0 )) && printf ':'
   1148     printf '%02d' $S
   1149   }
   1150   function prompt_bitwarden_session_status() {
   1151     if rbw unlocked >/dev/null 2>&1; then
   1152       p10k segment -f 2 -t "[🔓]"
   1153     fi
   1154   }
   1155 
   1156   # shell nest level
   1157   function prompt_nest_level() {
   1158     # _my_lvl := $TMUX == "" ? $SHLVL : $((SHLVL-1))
   1159     # local lvl='${${_my_lvl::=${${TMUX:+$((SHLVL-1))}:-$SHLVL}}+}'
   1160     # p10k segment -f 4 -e -t $lvl'%B${(l:$_my_lvl::$_my_lvl:)}%(1j.%j.)'
   1161     # These ^ are cool functions but overkill for me
   1162     local lvl="";
   1163     [ -n "$TMUX" ] && {
   1164       [ -n "$VIMRUNTIME" -a $SHLVL -gt 3 ] && lvl="(L$(($SHLVL-2)))"
   1165       [ -z "$VIMRUNTIME" -a $SHLVL -gt 2 ] && lvl="(L$(($SHLVL-1)))"
   1166     }
   1167     [ -z "$TMUX" ]  && {
   1168       [ -n "$VIMRUNTIME" -a $SHLVL -gt 2 ] && lvl="(L$(($SHLVL-1)))"
   1169       [ -z "$VIMRUNTIME" -a $SHLVL -gt 1 ] && lvl="(L$SHLVL)"
   1170     }
   1171     p10k segment -f 4 -t "$lvl"
   1172   }
   1173 
   1174   # shell nest level instant placeholder
   1175   function instant_prompt_nest_level() {
   1176     prompt_nest_level
   1177   }
   1178 
   1179   # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
   1180   # is to generate the prompt segment for display in instant prompt. See
   1181   # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
   1182   #
   1183   # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
   1184   # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
   1185   # will replay these calls without actually calling instant_prompt_*. It is imperative that
   1186   # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this
   1187   # rule is not observed, the content of instant prompt will be incorrect.
   1188   #
   1189   # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If
   1190   # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.
   1191   function instant_prompt_example() {
   1192     # Since prompt_example always makes the same `p10k segment` calls, we can call it from
   1193     # instant_prompt_example. This will give us the same `example` prompt segment in the instant
   1194     # and regular prompts.
   1195     prompt_example
   1196   }
   1197 
   1198   # User-defined prompt segments can be customized the same way as built-in segments.
   1199   # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208
   1200   # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
   1201 
   1202   # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
   1203   # when accepting a command line. Supported values:
   1204   #
   1205   #   - off:      Don't change prompt when accepting a command line.
   1206   #   - always:   Trim down prompt when accepting a command line.
   1207   #   - same-dir: Trim down prompt when accepting a command line unless this is the first command
   1208   #               typed after changing current working directory.
   1209   typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off
   1210 
   1211   # Instant prompt mode.
   1212   #
   1213   #   - off:     Disable instant prompt. Choose this if you've tried instant prompt and found
   1214   #              it incompatible with your zsh configuration files.
   1215   #   - quiet:   Enable instant prompt and don't print warnings when detecting console output
   1216   #              during zsh initialization. Choose this if you've read and understood
   1217   #              https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
   1218   #   - verbose: Enable instant prompt and print a warning when detecting console output during
   1219   #              zsh initialization. Choose this if you've never tried instant prompt, haven't
   1220   #              seen the warning, or if you are unsure what this all means.
   1221   typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
   1222 
   1223   # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
   1224   # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
   1225   # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
   1226   # really need it.
   1227   typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
   1228 
   1229   # If p10k is already loaded, reload configuration.
   1230   # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
   1231   (( ! $+functions[p10k] )) || p10k reload
   1232 }
   1233 
   1234 (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
   1235 'builtin' 'unset' 'p10k_config_opts'