dotfiles

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

p10k-light.zsh (69453B)


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