| 1 | # Generated by Powerlevel10k configuration wizard on 2024-06-13 at 01:10 CST.
|
| 2 | # Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 26839.
|
| 3 | # Wizard options: nerdfont-v3 + powerline, large icons, unicode, lean, 24h time, 1 line,
|
| 4 | # compact, many icons, concise, transient_prompt, instant_prompt=verbose.
|
| 5 | # Type `p10k configure` to generate another config.
|
| 6 | #
|
| 7 | # Config for Powerlevel10k with 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%6)):#3}:+$'\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 -o extended_glob
|
| 23 |
|
| 24 | # Unset all configuration options. This allows you to apply configuration changes without
|
| 25 | # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.
|
| 26 | unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
|
| 27 |
|
| 28 | # Zsh >= 5.1 is required.
|
| 29 | [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
|
| 30 |
|
| 31 | # The list of segments shown on the left. Fill it with the most important segments.
|
| 32 | typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
| 33 | os_icon # os identifier
|
| 34 | dir # current directory
|
| 35 | vcs # git status
|
| 36 | prompt_char # prompt symbol
|
| 37 | )
|
| 38 |
|
| 39 | # The list of segments shown on the right. Fill it with less important segments.
|
| 40 | # Right prompt on the last prompt line (where you are typing your commands) gets
|
| 41 | # automatically hidden when the input line reaches it. Right prompt above the
|
| 42 | # last prompt line gets hidden if it would overlap with left prompt.
|
| 43 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
| 44 | status # exit code of the last command
|
| 45 | command_execution_time # duration of the last command
|
| 46 | background_jobs # presence of background jobs
|
| 47 | direnv # direnv status (https://direnv.net/)
|
| 48 | asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
| 49 | virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
| 50 | anaconda # conda environment (https://conda.io/)
|
| 51 | pyenv # python environment (https://github.com/pyenv/pyenv)
|
| 52 | goenv # go environment (https://github.com/syndbg/goenv)
|
| 53 | nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
|
| 54 | nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
|
| 55 | nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
|
| 56 | # node_version # node.js version
|
| 57 | # go_version # go version (https://golang.org)
|
| 58 | # rust_version # rustc version (https://www.rust-lang.org)
|
| 59 | # dotnet_version # .NET version (https://dotnet.microsoft.com)
|
| 60 | # php_version # php version (https://www.php.net/)
|
| 61 | # laravel_version # laravel php framework version (https://laravel.com/)
|
| 62 | # java_version # java version (https://www.java.com/)
|
| 63 | # package # name@version from package.json (https://docs.npmjs.com/files/package.json)
|
| 64 | rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
|
| 65 | rvm # ruby version from rvm (https://rvm.io)
|
| 66 | fvm # flutter version management (https://github.com/leoafarias/fvm)
|
| 67 | luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
|
| 68 | jenv # java version from jenv (https://github.com/jenv/jenv)
|
| 69 | plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
|
| 70 | perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
|
| 71 | phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
|
| 72 | scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
|
| 73 | haskell_stack # haskell version from stack (https://haskellstack.org/)
|
| 74 | kubecontext # current kubernetes context (https://kubernetes.io/)
|
| 75 | terraform # terraform workspace (https://www.terraform.io)
|
| 76 | # terraform_version # terraform version (https://www.terraform.io)
|
| 77 | aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
| 78 | aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
|
| 79 | azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
|
| 80 | gcloud # google cloud cli account and project (https://cloud.google.com/)
|
| 81 | google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
|
| 82 | toolbox # toolbox name (https://github.com/containers/toolbox)
|
| 83 | context # user@hostname
|
| 84 | nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
| 85 | ranger # ranger shell (https://github.com/ranger/ranger)
|
| 86 | nnn # nnn shell (https://github.com/jarun/nnn)
|
| 87 | lf # lf shell (https://github.com/gokcehan/lf)
|
| 88 | xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
| 89 | vim_shell # vim shell indicator (:sh)
|
| 90 | midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
| 91 | nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
| 92 | chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
| 93 | # vpn_ip # virtual private network indicator
|
| 94 | # load # CPU load
|
| 95 | # disk_usage # disk usage
|
| 96 | # ram # free RAM
|
| 97 | # swap # used swap
|
| 98 | todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
| 99 | timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
| 100 | taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
| 101 | per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
| 102 | # cpu_arch # CPU architecture
|
| 103 | time # current time
|
| 104 | # ip # ip address and bandwidth usage for a specified network interface
|
| 105 | # public_ip # public IP address
|
| 106 | # proxy # system-wide http/https/ftp proxy
|
| 107 | # battery # internal battery
|
| 108 | # wifi # wifi speed
|
| 109 | # example # example user-defined segment (see prompt_example function below)
|
| 110 | )
|
| 111 |
|
| 112 | # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
|
| 113 | typeset -g POWERLEVEL9K_MODE=nerdfont-v3
|
| 114 | # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid
|
| 115 | # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.
|
| 116 | typeset -g POWERLEVEL9K_ICON_PADDING=moderate
|
| 117 |
|
| 118 | # Basic style options that define the overall look of your prompt. You probably don't want to
|
| 119 | # change them.
|
| 120 | typeset -g POWERLEVEL9K_BACKGROUND= # transparent background
|
| 121 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace
|
| 122 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space
|
| 123 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol
|
| 124 |
|
| 125 | # When set to true, icons appear before content on both sides of the prompt. When set
|
| 126 | # to false, icons go after content. If empty or not set, icons go before content in the left
|
| 127 | # prompt and after content in the right prompt.
|
| 128 | #
|
| 129 | # You can also override it for a specific segment:
|
| 130 | #
|
| 131 | # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false
|
| 132 | #
|
| 133 | # Or for a specific segment in specific state:
|
| 134 | #
|
| 135 | # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false
|
| 136 | typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true
|
| 137 |
|
| 138 | # Add an empty line before each prompt.
|
| 139 | typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
|
| 140 |
|
| 141 | # Connect left prompt lines with these symbols.
|
| 142 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=
|
| 143 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=
|
| 144 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=
|
| 145 | # Connect right prompt lines with these symbols.
|
| 146 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=
|
| 147 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=
|
| 148 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX=
|
| 149 |
|
| 150 | # The left end of left prompt.
|
| 151 | typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
|
| 152 | # The right end of right prompt.
|
| 153 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=
|
| 154 |
|
| 155 | # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll
|
| 156 | # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and
|
| 157 | # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below.
|
| 158 | typeset -g POWERLEVEL9K_SHOW_RULER=false
|
| 159 | typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·'
|
| 160 | typeset -g POWERLEVEL9K_RULER_FOREGROUND=242
|
| 161 |
|
| 162 | # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─'
|
| 163 | # to make it easier to see the alignment between left and right prompt and to separate prompt
|
| 164 | # from command output. It serves the same purpose as ruler (see above) without increasing
|
| 165 | # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false
|
| 166 | # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact
|
| 167 | # prompt.
|
| 168 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '
|
| 169 | if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then
|
| 170 | # The color of the filler.
|
| 171 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242
|
| 172 | # Add a space between the end of left prompt and the filler.
|
| 173 | typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' '
|
| 174 | # Add a space between the filler and the start of right prompt.
|
| 175 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' '
|
| 176 | # Start filler from the edge of the screen if there are no left segments on the first line.
|
| 177 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
|
| 178 | # End filler on the edge of the screen if there are no right segments on the first line.
|
| 179 | typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'
|
| 180 | fi
|
| 181 |
|
| 182 | #################################[ os_icon: os identifier ]##################################
|
| 183 | # OS identifier color.
|
| 184 | typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=
|
| 185 | # Custom icon.
|
| 186 | # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
|
| 187 |
|
| 188 | ################################[ prompt_char: prompt symbol ]################################
|
| 189 | # Green prompt symbol if the last command succeeded.
|
| 190 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76
|
| 191 | # Red prompt symbol if the last command failed.
|
| 192 | typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196
|
| 193 | # Default prompt symbol.
|
| 194 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
|
| 195 | # Prompt symbol in command vi mode.
|
| 196 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
|
| 197 | # Prompt symbol in visual vi mode.
|
| 198 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'
|
| 199 | # Prompt symbol in overwrite vi mode.
|
| 200 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'
|
| 201 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
|
| 202 | # No line terminator if prompt_char is the last segment.
|
| 203 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
|
| 204 | # No line introducer if prompt_char is the first segment.
|
| 205 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
|
| 206 |
|
| 207 | ##################################[ dir: current directory ]##################################
|
| 208 | # Default current directory color.
|
| 209 | typeset -g POWERLEVEL9K_DIR_FOREGROUND=31
|
| 210 | # If directory is too long, shorten some of its segments to the shortest possible unique
|
| 211 | # prefix. The shortened directory can be tab-completed to the original.
|
| 212 | typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
| 213 | # Replace removed segment suffixes with this symbol.
|
| 214 | typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
|
| 215 | # Color of the shortened directory segments.
|
| 216 | typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
|
| 217 | # Color of the anchor directory segments. Anchor segments are never shortened. The first
|
| 218 | # segment is always an anchor.
|
| 219 | typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39
|
| 220 | # Display anchor directory segments in bold.
|
| 221 | typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
|
| 222 | # Don't shorten directories that contain any of these files. They are anchors.
|
| 223 | local anchor_files=(
|
| 224 | .bzr
|
| 225 | .citc
|
| 226 | .git
|
| 227 | .hg
|
| 228 | .node-version
|
| 229 | .python-version
|
| 230 | .go-version
|
| 231 | .ruby-version
|
| 232 | .lua-version
|
| 233 | .java-version
|
| 234 | .perl-version
|
| 235 | .php-version
|
| 236 | .tool-versions
|
| 237 | .shorten_folder_marker
|
| 238 | .svn
|
| 239 | .terraform
|
| 240 | CVS
|
| 241 | Cargo.toml
|
| 242 | composer.json
|
| 243 | go.mod
|
| 244 | package.json
|
| 245 | stack.yaml
|
| 246 | )
|
| 247 | typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})"
|
| 248 | # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains
|
| 249 | # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is
|
| 250 | # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)
|
| 251 | # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers
|
| 252 | # and other directories don't.
|
| 253 | #
|
| 254 | # Optionally, "first" and "last" can be followed by ":<offset>" where <offset> is an integer.
|
| 255 | # This moves the truncation point to the right (positive offset) or to the left (negative offset)
|
| 256 | # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0"
|
| 257 | # respectively.
|
| 258 | typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
|
| 259 | # Don't shorten this many last directory segments. They are anchors.
|
| 260 | typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
|
| 261 | # Shorten directory if it's longer than this even if there is space for it. The value can
|
| 262 | # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,
|
| 263 | # directory will be shortened only when prompt doesn't fit or when other parameters demand it
|
| 264 | # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).
|
| 265 | # If set to `0`, directory will always be shortened to its minimum length.
|
| 266 | typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
|
| 267 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
|
| 268 | # many columns for typing commands.
|
| 269 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
|
| 270 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least
|
| 271 | # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.
|
| 272 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
|
| 273 | # If set to true, embed a hyperlink into the directory. Useful for quickly
|
| 274 | # opening a directory in the file manager simply by clicking the link.
|
| 275 | # Can also be handy when the directory is shortened, as it allows you to see
|
| 276 | # the full directory that was used in previous commands.
|
| 277 | typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
|
| 278 |
|
| 279 | # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
|
| 280 | # and POWERLEVEL9K_DIR_CLASSES below.
|
| 281 | typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
|
| 282 |
|
| 283 | # The default icon shown next to non-writable and non-existent directories when
|
| 284 | # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.
|
| 285 | # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'
|
| 286 |
|
| 287 | # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different
|
| 288 | # directories. It must be an array with 3 * N elements. Each triplet consists of:
|
| 289 | #
|
| 290 | # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with
|
| 291 | # extended_glob option enabled.
|
| 292 | # 2. Directory class for the purpose of styling.
|
| 293 | # 3. An empty string.
|
| 294 | #
|
| 295 | # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.
|
| 296 | #
|
| 297 | # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories
|
| 298 | # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.
|
| 299 | #
|
| 300 | # For example, given these settings:
|
| 301 | #
|
| 302 | # typeset -g POWERLEVEL9K_DIR_CLASSES=(
|
| 303 | # '~/work(|/*)' WORK ''
|
| 304 | # '~(|/*)' HOME ''
|
| 305 | # '*' DEFAULT '')
|
| 306 | #
|
| 307 | # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one
|
| 308 | # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or
|
| 309 | # WORK_NON_EXISTENT.
|
| 310 | #
|
| 311 | # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an
|
| 312 | # option to define custom colors and icons for different directory classes.
|
| 313 | #
|
| 314 | # # Styling for WORK.
|
| 315 | # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 316 | # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31
|
| 317 | # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103
|
| 318 | # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39
|
| 319 | #
|
| 320 | # # Styling for WORK_NOT_WRITABLE.
|
| 321 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 322 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31
|
| 323 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103
|
| 324 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39
|
| 325 | #
|
| 326 | # # Styling for WORK_NON_EXISTENT.
|
| 327 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 328 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31
|
| 329 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103
|
| 330 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39
|
| 331 | #
|
| 332 | # If a styling parameter isn't explicitly defined for some class, it falls back to the classless
|
| 333 | # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls
|
| 334 | # back to POWERLEVEL9K_DIR_FOREGROUND.
|
| 335 | #
|
| 336 | # typeset -g POWERLEVEL9K_DIR_CLASSES=()
|
| 337 |
|
| 338 | # Custom prefix.
|
| 339 | # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '
|
| 340 |
|
| 341 | #####################################[ vcs: git status ]######################################
|
| 342 | # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
|
| 343 | typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 '
|
| 344 |
|
| 345 | # Untracked files icon. It's really a question mark, your font isn't broken.
|
| 346 | # Change the value of this parameter to show a different icon.
|
| 347 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
|
| 348 |
|
| 349 | # Formatter for Git status.
|
| 350 | #
|
| 351 | # Example output: master wip ⇣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='%f' # default 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 |
|
| 385 | if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
|
| 386 | local branch=${(V)VCS_STATUS_LOCAL_BRANCH}
|
| 387 | # If local branch name is at most 32 characters long, show it in full.
|
| 388 | # Otherwise show the first 12 … the last 12.
|
| 389 | # Tip: To always show local branch name in full without truncation, delete the next line.
|
| 390 | (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
|
| 391 | res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
|
| 392 | fi
|
| 393 |
|
| 394 | if [[ -n $VCS_STATUS_TAG
|
| 395 | # Show tag only if not on a branch.
|
| 396 | # Tip: To always show tag, delete the next line.
|
| 397 | && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
|
| 398 | ]]; then
|
| 399 | local tag=${(V)VCS_STATUS_TAG}
|
| 400 | # If tag name is at most 32 characters long, show it in full.
|
| 401 | # Otherwise show the first 12 … the last 12.
|
| 402 | # Tip: To always show tag name in full without truncation, delete the next line.
|
| 403 | (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
|
| 404 | res+="${meta}#${clean}${tag//\%/%%}"
|
| 405 | fi
|
| 406 |
|
| 407 | # Display the current Git commit if there is no branch and no tag.
|
| 408 | # Tip: To always display the current Git commit, delete the next line.
|
| 409 | [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
|
| 410 | res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
|
| 411 |
|
| 412 | # Show tracking branch name if it differs from local branch.
|
| 413 | if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
|
| 414 | res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
|
| 415 | fi
|
| 416 |
|
| 417 | # Display "wip" if the latest commit's summary contains "wip" or "WIP".
|
| 418 | if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then
|
| 419 | res+=" ${modified}wip"
|
| 420 | fi
|
| 421 |
|
| 422 | if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
|
| 423 | # ⇣42 if behind the remote.
|
| 424 | (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
| 425 | # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
| 426 | (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
| 427 | (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
| 428 | elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
|
| 429 | # Tip: Uncomment the next line to display '=' if up to date with the remote.
|
| 430 | # res+=" ${clean}="
|
| 431 | fi
|
| 432 |
|
| 433 | # ⇠42 if behind the push remote.
|
| 434 | (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
|
| 435 | (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
|
| 436 | # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.
|
| 437 | (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}"
|
| 438 | # *42 if have stashes.
|
| 439 | (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}"
|
| 440 | # 'merge' if the repo is in an unusual state.
|
| 441 | [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}"
|
| 442 | # ~42 if have merge conflicts.
|
| 443 | (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}"
|
| 444 | # +42 if have staged changes.
|
| 445 | (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}"
|
| 446 | # !42 if have unstaged changes.
|
| 447 | (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}"
|
| 448 | # ?42 if have untracked files. It's really a question mark, your font isn't broken.
|
| 449 | # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.
|
| 450 | # Remove the next line if you don't want to see untracked files at all.
|
| 451 | (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}"
|
| 452 | # "─" if the number of unstaged files is unknown. This can happen due to
|
| 453 | # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower
|
| 454 | # than the number of files in the Git index, or due to bash.showDirtyState being set to false
|
| 455 | # in the repository config. The number of staged and untracked files may also be unknown
|
| 456 | # in this case.
|
| 457 | (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─"
|
| 458 |
|
| 459 | typeset -g my_git_format=$res
|
| 460 | }
|
| 461 | functions -M my_git_formatter 2>/dev/null
|
| 462 |
|
| 463 | # Don't count the number of unstaged, untracked and conflicted files in Git repositories with
|
| 464 | # more than this many files in the index. Negative value means infinity.
|
| 465 | #
|
| 466 | # If you are working in Git repositories with tens of millions of files and seeing performance
|
| 467 | # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output
|
| 468 | # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's
|
| 469 | # config: `git config bash.showDirtyState false`.
|
| 470 | typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1
|
| 471 |
|
| 472 | # Don't show Git status in prompt for repositories whose workdir matches this pattern.
|
| 473 | # For example, if set to '~', the Git repository at $HOME/.git will be ignored.
|
| 474 | # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.
|
| 475 | typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
|
| 476 |
|
| 477 | # Disable the default Git status formatting.
|
| 478 | typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
|
| 479 | # Install our own Git status formatter.
|
| 480 | typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'
|
| 481 | typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'
|
| 482 | # Enable counters for staged, unstaged, etc.
|
| 483 | typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
|
| 484 |
|
| 485 | # Icon color.
|
| 486 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76
|
| 487 | typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244
|
| 488 | # Custom icon.
|
| 489 | # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 490 | # Custom prefix.
|
| 491 | # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon '
|
| 492 |
|
| 493 | # Show status of repositories of these types. You can add svn and/or hg if you are
|
| 494 | # using them. If you do, your prompt may become slow even when your current directory
|
| 495 | # isn't in an svn or hg repository.
|
| 496 | typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
|
| 497 |
|
| 498 | # These settings are used for repositories other than Git or when gitstatusd fails and
|
| 499 | # Powerlevel10k has to fall back to using vcs_info.
|
| 500 | typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76
|
| 501 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76
|
| 502 | typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178
|
| 503 |
|
| 504 | ##########################[ status: exit code of the last command ]###########################
|
| 505 | # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and
|
| 506 | # style them independently from the regular OK and ERROR state.
|
| 507 | typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
|
| 508 |
|
| 509 | # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as
|
| 510 | # it will signify success by turning green.
|
| 511 | typeset -g POWERLEVEL9K_STATUS_OK=false
|
| 512 | typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70
|
| 513 | typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
|
| 514 |
|
| 515 | # Status when some part of a pipe command fails but the overall exit status is zero. It may look
|
| 516 | # like this: 1|0.
|
| 517 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true
|
| 518 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70
|
| 519 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
|
| 520 |
|
| 521 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as
|
| 522 | # it will signify error by turning red.
|
| 523 | typeset -g POWERLEVEL9K_STATUS_ERROR=false
|
| 524 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160
|
| 525 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
|
| 526 |
|
| 527 | # Status when the last command was terminated by a signal.
|
| 528 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
|
| 529 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160
|
| 530 | # Use terse signal names: "INT" instead of "SIGINT(2)".
|
| 531 | typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
|
| 532 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
|
| 533 |
|
| 534 | # Status when some part of a pipe command fails and the overall exit status is also non-zero.
|
| 535 | # It may look like this: 1|0.
|
| 536 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
|
| 537 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160
|
| 538 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
|
| 539 |
|
| 540 | ###################[ command_execution_time: duration of the last command ]###################
|
| 541 | # Show duration of the last command if takes at least this many seconds.
|
| 542 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
|
| 543 | # Show this many fractional digits. Zero means round to seconds.
|
| 544 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
| 545 | # Execution time color.
|
| 546 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
|
| 547 | # Duration format: 1d 2h 3m 4s.
|
| 548 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
|
| 549 | # Custom icon.
|
| 550 | # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 551 | # Custom prefix.
|
| 552 | # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook '
|
| 553 |
|
| 554 | #######################[ background_jobs: presence of background jobs ]#######################
|
| 555 | # Don't show the number of background jobs.
|
| 556 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
|
| 557 | # Background jobs color.
|
| 558 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70
|
| 559 | # Custom icon.
|
| 560 | # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 561 |
|
| 562 | #######################[ direnv: direnv status (https://direnv.net/) ]########################
|
| 563 | # Direnv color.
|
| 564 | typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178
|
| 565 | # Custom icon.
|
| 566 | # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 567 |
|
| 568 | ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############
|
| 569 | # Default asdf color. Only used to display tools for which there is no color override (see below).
|
| 570 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND.
|
| 571 | typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66
|
| 572 |
|
| 573 | # There are four parameters that can be used to hide asdf tools. Each parameter describes
|
| 574 | # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at
|
| 575 | # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to
|
| 576 | # hide a tool, it gets shown.
|
| 577 | #
|
| 578 | # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and
|
| 579 | # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:
|
| 580 | #
|
| 581 | # asdf local python 3.8.1
|
| 582 | # asdf global python 3.8.1
|
| 583 | #
|
| 584 | # After running both commands the current python version is 3.8.1 and its source is "local" as
|
| 585 | # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,
|
| 586 | # it'll hide python version in this case because 3.8.1 is the same as the global version.
|
| 587 | # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't
|
| 588 | # contain "local".
|
| 589 |
|
| 590 | # Hide tool versions that don't come from one of these sources.
|
| 591 | #
|
| 592 | # Available sources:
|
| 593 | #
|
| 594 | # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable"
|
| 595 | # - local `asdf current` says "set by /some/not/home/directory/file"
|
| 596 | # - global `asdf current` says "set by /home/username/file"
|
| 597 | #
|
| 598 | # Note: If this parameter is set to (shell local global), it won't hide tools.
|
| 599 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.
|
| 600 | typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global)
|
| 601 |
|
| 602 | # If set to false, hide tool versions that are the same as global.
|
| 603 | #
|
| 604 | # Note: The name of this parameter doesn't reflect its meaning at all.
|
| 605 | # Note: If this parameter is set to true, it won't hide tools.
|
| 606 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.
|
| 607 | typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false
|
| 608 |
|
| 609 | # If set to false, hide tool versions that are equal to "system".
|
| 610 | #
|
| 611 | # Note: If this parameter is set to true, it won't hide tools.
|
| 612 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.
|
| 613 | typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true
|
| 614 |
|
| 615 | # If set to non-empty value, hide tools unless there is a file matching the specified file pattern
|
| 616 | # in the current directory, or its parent directory, or its grandparent directory, and so on.
|
| 617 | #
|
| 618 | # Note: If this parameter is set to empty value, it won't hide tools.
|
| 619 | # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.
|
| 620 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.
|
| 621 | #
|
| 622 | # Example: Hide nodejs version when there is no package.json and no *.js files in the current
|
| 623 | # directory, in `..`, in `../..` and so on.
|
| 624 | #
|
| 625 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'
|
| 626 | typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=
|
| 627 |
|
| 628 | # Ruby version from asdf.
|
| 629 | typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168
|
| 630 | # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 631 | # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 632 |
|
| 633 | # Python version from asdf.
|
| 634 | typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37
|
| 635 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 636 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 637 |
|
| 638 | # Go version from asdf.
|
| 639 | typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37
|
| 640 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 641 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 642 |
|
| 643 | # Node.js version from asdf.
|
| 644 | typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70
|
| 645 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 646 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 647 |
|
| 648 | # Rust version from asdf.
|
| 649 | typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37
|
| 650 | # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 651 | # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 652 |
|
| 653 | # .NET Core version from asdf.
|
| 654 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134
|
| 655 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 656 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 657 |
|
| 658 | # Flutter version from asdf.
|
| 659 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38
|
| 660 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 661 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 662 |
|
| 663 | # Lua version from asdf.
|
| 664 | typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32
|
| 665 | # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 666 | # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 667 |
|
| 668 | # Java version from asdf.
|
| 669 | typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32
|
| 670 | # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 671 | # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 672 |
|
| 673 | # Perl version from asdf.
|
| 674 | typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67
|
| 675 | # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 676 | # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 677 |
|
| 678 | # Erlang version from asdf.
|
| 679 | typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125
|
| 680 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 681 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 682 |
|
| 683 | # Elixir version from asdf.
|
| 684 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129
|
| 685 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 686 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 687 |
|
| 688 | # Postgres version from asdf.
|
| 689 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31
|
| 690 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 691 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 692 |
|
| 693 | # PHP version from asdf.
|
| 694 | typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99
|
| 695 | # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 696 | # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 697 |
|
| 698 | # Haskell version from asdf.
|
| 699 | typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172
|
| 700 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 701 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 702 |
|
| 703 | # Julia version from asdf.
|
| 704 | typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70
|
| 705 | # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 706 | # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar'
|
| 707 |
|
| 708 | ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########
|
| 709 | # NordVPN connection indicator color.
|
| 710 | typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39
|
| 711 | # Hide NordVPN connection indicator when not connected.
|
| 712 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=
|
| 713 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=
|
| 714 | # Custom icon.
|
| 715 | # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 716 |
|
| 717 | #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################
|
| 718 | # Ranger shell color.
|
| 719 | typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
|
| 720 | # Custom icon.
|
| 721 | # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 722 |
|
| 723 | ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
|
| 724 | # Nnn shell color.
|
| 725 | typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
|
| 726 | # Custom icon.
|
| 727 | # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 728 |
|
| 729 | ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
|
| 730 | # lf shell color.
|
| 731 | typeset -g POWERLEVEL9K_LF_FOREGROUND=72
|
| 732 | # Custom icon.
|
| 733 | # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 734 |
|
| 735 | ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
|
| 736 | # xplr shell color.
|
| 737 | typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
|
| 738 | # Custom icon.
|
| 739 | # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 740 |
|
| 741 | ###########################[ vim_shell: vim shell indicator (:sh) ]###########################
|
| 742 | # Vim shell indicator color.
|
| 743 | typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
|
| 744 | # Custom icon.
|
| 745 | # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 746 |
|
| 747 | ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
|
| 748 | # Midnight Commander shell color.
|
| 749 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178
|
| 750 | # Custom icon.
|
| 751 | # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 752 |
|
| 753 | #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##
|
| 754 | # Nix shell color.
|
| 755 | typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
|
| 756 |
|
| 757 | # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
|
| 758 | # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
|
| 759 |
|
| 760 | # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
|
| 761 | # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
|
| 762 |
|
| 763 | # Custom icon.
|
| 764 | # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 765 |
|
| 766 | ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
|
| 767 | # chezmoi shell color.
|
| 768 | typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33
|
| 769 | # Custom icon.
|
| 770 | # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 771 |
|
| 772 | ##################################[ disk_usage: disk usage ]##################################
|
| 773 | # Colors for different levels of disk usage.
|
| 774 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
|
| 775 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220
|
| 776 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160
|
| 777 | # Thresholds for different levels of disk usage (percentage points).
|
| 778 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
|
| 779 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
|
| 780 | # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.
|
| 781 | typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false
|
| 782 | # Custom icon.
|
| 783 | # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 784 |
|
| 785 | ######################################[ ram: free RAM ]#######################################
|
| 786 | # RAM color.
|
| 787 | typeset -g POWERLEVEL9K_RAM_FOREGROUND=66
|
| 788 | # Custom icon.
|
| 789 | # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 790 |
|
| 791 | #####################################[ swap: used swap ]######################################
|
| 792 | # Swap color.
|
| 793 | typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96
|
| 794 | # Custom icon.
|
| 795 | # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 796 |
|
| 797 | ######################################[ load: CPU load ]######################################
|
| 798 | # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.
|
| 799 | typeset -g POWERLEVEL9K_LOAD_WHICH=5
|
| 800 | # Load color when load is under 50%.
|
| 801 | typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66
|
| 802 | # Load color when load is between 50% and 70%.
|
| 803 | typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178
|
| 804 | # Load color when load is over 70%.
|
| 805 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166
|
| 806 | # Custom icon.
|
| 807 | # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 808 |
|
| 809 | ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################
|
| 810 | # Todo color.
|
| 811 | typeset -g POWERLEVEL9K_TODO_FOREGROUND=110
|
| 812 | # Hide todo when the total number of tasks is zero.
|
| 813 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true
|
| 814 | # Hide todo when the number of tasks after filtering is zero.
|
| 815 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false
|
| 816 |
|
| 817 | # Todo format. The following parameters are available within the expansion.
|
| 818 | #
|
| 819 | # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks.
|
| 820 | # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering.
|
| 821 | #
|
| 822 | # These variables correspond to the last line of the output of `todo.sh -p ls`:
|
| 823 | #
|
| 824 | # TODO: 24 of 42 tasks shown
|
| 825 | #
|
| 826 | # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.
|
| 827 | #
|
| 828 | # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'
|
| 829 |
|
| 830 | # Custom icon.
|
| 831 | # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 832 |
|
| 833 | ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############
|
| 834 | # Timewarrior color.
|
| 835 | typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110
|
| 836 | # If the tracked task is longer than 24 characters, truncate and append "…".
|
| 837 | # Tip: To always display tasks without truncation, delete the following parameter.
|
| 838 | # Tip: To hide task names and display just the icon when time tracking is enabled, set the
|
| 839 | # value of the following parameter to "".
|
| 840 | typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'
|
| 841 |
|
| 842 | # Custom icon.
|
| 843 | # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 844 |
|
| 845 | ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############
|
| 846 | # Taskwarrior color.
|
| 847 | typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74
|
| 848 |
|
| 849 | # Taskwarrior segment format. The following parameters are available within the expansion.
|
| 850 | #
|
| 851 | # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`.
|
| 852 | # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`.
|
| 853 | #
|
| 854 | # Zero values are represented as empty parameters.
|
| 855 | #
|
| 856 | # The default format:
|
| 857 | #
|
| 858 | # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT'
|
| 859 | #
|
| 860 | # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT'
|
| 861 |
|
| 862 | # Custom icon.
|
| 863 | # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 864 |
|
| 865 | ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
|
| 866 | # Color when using local/global history.
|
| 867 | typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
|
| 868 | typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
|
| 869 |
|
| 870 | # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
|
| 871 | # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
|
| 872 | # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
|
| 873 |
|
| 874 | # Custom icon.
|
| 875 | # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 876 | # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 877 |
|
| 878 | ################################[ cpu_arch: CPU architecture ]################################
|
| 879 | # CPU architecture color.
|
| 880 | typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
|
| 881 |
|
| 882 | # Hide the segment when on a specific CPU architecture.
|
| 883 | # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=
|
| 884 | # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=
|
| 885 |
|
| 886 | # Custom icon.
|
| 887 | # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 888 |
|
| 889 | ##################################[ context: user@hostname ]##################################
|
| 890 | # Context color when running with privileges.
|
| 891 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
|
| 892 | # Context color in SSH without privileges.
|
| 893 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180
|
| 894 | # Default context color (no privileges, no SSH).
|
| 895 | typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180
|
| 896 |
|
| 897 | # Context format when running with privileges: bold user@hostname.
|
| 898 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'
|
| 899 | # Context format when in SSH without privileges: user@hostname.
|
| 900 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
|
| 901 | # Default context format (no privileges, no SSH): user@hostname.
|
| 902 | typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
|
| 903 |
|
| 904 | # Don't show context unless running with privileges or in SSH.
|
| 905 | # Tip: Remove the next line to always show context.
|
| 906 | typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
|
| 907 |
|
| 908 | # Custom icon.
|
| 909 | # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 910 | # Custom prefix.
|
| 911 | # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith '
|
| 912 |
|
| 913 | ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
|
| 914 | # Python virtual environment color.
|
| 915 | typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
|
| 916 | # Don't show Python version next to the virtual environment name.
|
| 917 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
| 918 | # If set to "false", won't show virtualenv if pyenv is already shown.
|
| 919 | # If set to "if-different", won't show virtualenv if it's the same as pyenv.
|
| 920 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
|
| 921 | # Separate environment name from Python version only with a space.
|
| 922 | typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
|
| 923 | # Custom icon.
|
| 924 | # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 925 |
|
| 926 | #####################[ anaconda: conda environment (https://conda.io/) ]######################
|
| 927 | # Anaconda environment color.
|
| 928 | typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37
|
| 929 |
|
| 930 | # Anaconda segment format. The following parameters are available within the expansion.
|
| 931 | #
|
| 932 | # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment.
|
| 933 | # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment.
|
| 934 | # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below).
|
| 935 | # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version).
|
| 936 | #
|
| 937 | # CONDA_PROMPT_MODIFIER can be configured with the following command:
|
| 938 | #
|
| 939 | # conda config --set env_prompt '({default_env}) '
|
| 940 | #
|
| 941 | # The last argument is a Python format string that can use the following variables:
|
| 942 | #
|
| 943 | # - prefix The same as CONDA_PREFIX.
|
| 944 | # - default_env The same as CONDA_DEFAULT_ENV.
|
| 945 | # - name The last segment of CONDA_PREFIX.
|
| 946 | # - stacked_env Comma-separated list of names in the environment stack. The first element is
|
| 947 | # always the same as default_env.
|
| 948 | #
|
| 949 | # Note: '({default_env}) ' is the default value of env_prompt.
|
| 950 | #
|
| 951 | # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER
|
| 952 | # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former
|
| 953 | # is empty.
|
| 954 | typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}'
|
| 955 |
|
| 956 | # Custom icon.
|
| 957 | # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 958 |
|
| 959 | ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################
|
| 960 | # Pyenv color.
|
| 961 | typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37
|
| 962 | # Hide python version if it doesn't come from one of these sources.
|
| 963 | typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)
|
| 964 | # If set to false, hide python version if it's the same as global:
|
| 965 | # $(pyenv version-name) == $(pyenv global).
|
| 966 | typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
|
| 967 | # If set to false, hide python version if it's equal to "system".
|
| 968 | typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true
|
| 969 |
|
| 970 | # Pyenv segment format. The following parameters are available within the expansion.
|
| 971 | #
|
| 972 | # - P9K_CONTENT Current pyenv environment (pyenv version-name).
|
| 973 | # - P9K_PYENV_PYTHON_VERSION Current python version (python --version).
|
| 974 | #
|
| 975 | # The default format has the following logic:
|
| 976 | #
|
| 977 | # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
|
| 978 | # starts with "$P9K_PYENV_PYTHON_VERSION/".
|
| 979 | # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
|
| 980 | typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
|
| 981 |
|
| 982 | # Custom icon.
|
| 983 | # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 984 |
|
| 985 | ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
|
| 986 | # Goenv color.
|
| 987 | typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37
|
| 988 | # Hide go version if it doesn't come from one of these sources.
|
| 989 | typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)
|
| 990 | # If set to false, hide go version if it's the same as global:
|
| 991 | # $(goenv version-name) == $(goenv global).
|
| 992 | typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false
|
| 993 | # If set to false, hide go version if it's equal to "system".
|
| 994 | typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true
|
| 995 | # Custom icon.
|
| 996 | # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 997 |
|
| 998 | ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########
|
| 999 | # Nodenv color.
|
| 1000 | typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70
|
| 1001 | # Hide node version if it doesn't come from one of these sources.
|
| 1002 | typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)
|
| 1003 | # If set to false, hide node version if it's the same as global:
|
| 1004 | # $(nodenv version-name) == $(nodenv global).
|
| 1005 | typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false
|
| 1006 | # If set to false, hide node version if it's equal to "system".
|
| 1007 | typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true
|
| 1008 | # Custom icon.
|
| 1009 | # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1010 |
|
| 1011 | ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
|
| 1012 | # Nvm color.
|
| 1013 | typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
|
| 1014 | # If set to false, hide node version if it's the same as default:
|
| 1015 | # $(nvm version current) == $(nvm version default).
|
| 1016 | typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
|
| 1017 | # If set to false, hide node version if it's equal to "system".
|
| 1018 | typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
|
| 1019 | # Custom icon.
|
| 1020 | # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1021 |
|
| 1022 | ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############
|
| 1023 | # Nodeenv color.
|
| 1024 | typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70
|
| 1025 | # Don't show Node version next to the environment name.
|
| 1026 | typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false
|
| 1027 | # Separate environment name from Node version only with a space.
|
| 1028 | typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=
|
| 1029 | # Custom icon.
|
| 1030 | # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1031 |
|
| 1032 | ##############################[ node_version: node.js version ]###############################
|
| 1033 | # Node version color.
|
| 1034 | typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70
|
| 1035 | # Show node version only when in a directory tree containing package.json.
|
| 1036 | typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
|
| 1037 | # Custom icon.
|
| 1038 | # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1039 |
|
| 1040 | #######################[ go_version: go version (https://golang.org) ]########################
|
| 1041 | # Go version color.
|
| 1042 | typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37
|
| 1043 | # Show go version only when in a go project subdirectory.
|
| 1044 | typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
|
| 1045 | # Custom icon.
|
| 1046 | # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1047 |
|
| 1048 | #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################
|
| 1049 | # Rust version color.
|
| 1050 | typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37
|
| 1051 | # Show rust version only when in a rust project subdirectory.
|
| 1052 | typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
|
| 1053 | # Custom icon.
|
| 1054 | # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1055 |
|
| 1056 | ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################
|
| 1057 | # .NET version color.
|
| 1058 | typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134
|
| 1059 | # Show .NET version only when in a .NET project subdirectory.
|
| 1060 | typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true
|
| 1061 | # Custom icon.
|
| 1062 | # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1063 |
|
| 1064 | #####################[ php_version: php version (https://www.php.net/) ]######################
|
| 1065 | # PHP version color.
|
| 1066 | typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99
|
| 1067 | # Show PHP version only when in a PHP project subdirectory.
|
| 1068 | typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true
|
| 1069 | # Custom icon.
|
| 1070 | # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1071 |
|
| 1072 | ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########
|
| 1073 | # Laravel version color.
|
| 1074 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161
|
| 1075 | # Custom icon.
|
| 1076 | # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1077 |
|
| 1078 | ####################[ java_version: java version (https://www.java.com/) ]####################
|
| 1079 | # Java version color.
|
| 1080 | typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32
|
| 1081 | # Show java version only when in a java project subdirectory.
|
| 1082 | typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true
|
| 1083 | # Show brief version.
|
| 1084 | typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false
|
| 1085 | # Custom icon.
|
| 1086 | # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1087 |
|
| 1088 | ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####
|
| 1089 | # Package color.
|
| 1090 | typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117
|
| 1091 | # Package format. The following parameters are available within the expansion.
|
| 1092 | #
|
| 1093 | # - P9K_PACKAGE_NAME The value of `name` field in package.json.
|
| 1094 | # - P9K_PACKAGE_VERSION The value of `version` field in package.json.
|
| 1095 | #
|
| 1096 | # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}'
|
| 1097 | # Custom icon.
|
| 1098 | # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1099 |
|
| 1100 | #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############
|
| 1101 | # Rbenv color.
|
| 1102 | typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168
|
| 1103 | # Hide ruby version if it doesn't come from one of these sources.
|
| 1104 | typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)
|
| 1105 | # If set to false, hide ruby version if it's the same as global:
|
| 1106 | # $(rbenv version-name) == $(rbenv global).
|
| 1107 | typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false
|
| 1108 | # If set to false, hide ruby version if it's equal to "system".
|
| 1109 | typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true
|
| 1110 | # Custom icon.
|
| 1111 | # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1112 |
|
| 1113 | #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################
|
| 1114 | # Rvm color.
|
| 1115 | typeset -g POWERLEVEL9K_RVM_FOREGROUND=168
|
| 1116 | # Don't show @gemset at the end.
|
| 1117 | typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false
|
| 1118 | # Don't show ruby- at the front.
|
| 1119 | typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false
|
| 1120 | # Custom icon.
|
| 1121 | # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1122 |
|
| 1123 | ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############
|
| 1124 | # Fvm color.
|
| 1125 | typeset -g POWERLEVEL9K_FVM_FOREGROUND=38
|
| 1126 | # Custom icon.
|
| 1127 | # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1128 |
|
| 1129 | ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########
|
| 1130 | # Lua color.
|
| 1131 | typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32
|
| 1132 | # Hide lua version if it doesn't come from one of these sources.
|
| 1133 | typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)
|
| 1134 | # If set to false, hide lua version if it's the same as global:
|
| 1135 | # $(luaenv version-name) == $(luaenv global).
|
| 1136 | typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false
|
| 1137 | # If set to false, hide lua version if it's equal to "system".
|
| 1138 | typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true
|
| 1139 | # Custom icon.
|
| 1140 | # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1141 |
|
| 1142 | ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################
|
| 1143 | # Java color.
|
| 1144 | typeset -g POWERLEVEL9K_JENV_FOREGROUND=32
|
| 1145 | # Hide java version if it doesn't come from one of these sources.
|
| 1146 | typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)
|
| 1147 | # If set to false, hide java version if it's the same as global:
|
| 1148 | # $(jenv version-name) == $(jenv global).
|
| 1149 | typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false
|
| 1150 | # If set to false, hide java version if it's equal to "system".
|
| 1151 | typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true
|
| 1152 | # Custom icon.
|
| 1153 | # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1154 |
|
| 1155 | ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############
|
| 1156 | # Perl color.
|
| 1157 | typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67
|
| 1158 | # Hide perl version if it doesn't come from one of these sources.
|
| 1159 | typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)
|
| 1160 | # If set to false, hide perl version if it's the same as global:
|
| 1161 | # $(plenv version-name) == $(plenv global).
|
| 1162 | typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false
|
| 1163 | # If set to false, hide perl version if it's equal to "system".
|
| 1164 | typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true
|
| 1165 | # Custom icon.
|
| 1166 | # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1167 |
|
| 1168 | ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
|
| 1169 | # Perlbrew color.
|
| 1170 | typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
|
| 1171 | # Show perlbrew version only when in a perl project subdirectory.
|
| 1172 | typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
|
| 1173 | # Don't show "perl-" at the front.
|
| 1174 | typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
|
| 1175 | # Custom icon.
|
| 1176 | # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1177 |
|
| 1178 | ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
|
| 1179 | # PHP color.
|
| 1180 | typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
|
| 1181 | # Hide php version if it doesn't come from one of these sources.
|
| 1182 | typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)
|
| 1183 | # If set to false, hide php version if it's the same as global:
|
| 1184 | # $(phpenv version-name) == $(phpenv global).
|
| 1185 | typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false
|
| 1186 | # If set to false, hide php version if it's equal to "system".
|
| 1187 | typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true
|
| 1188 | # Custom icon.
|
| 1189 | # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1190 |
|
| 1191 | #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######
|
| 1192 | # Scala color.
|
| 1193 | typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160
|
| 1194 | # Hide scala version if it doesn't come from one of these sources.
|
| 1195 | typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)
|
| 1196 | # If set to false, hide scala version if it's the same as global:
|
| 1197 | # $(scalaenv version-name) == $(scalaenv global).
|
| 1198 | typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false
|
| 1199 | # If set to false, hide scala version if it's equal to "system".
|
| 1200 | typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true
|
| 1201 | # Custom icon.
|
| 1202 | # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1203 |
|
| 1204 | ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########
|
| 1205 | # Haskell color.
|
| 1206 | typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172
|
| 1207 | # Hide haskell version if it doesn't come from one of these sources.
|
| 1208 | #
|
| 1209 | # shell: version is set by STACK_YAML
|
| 1210 | # local: version is set by stack.yaml up the directory tree
|
| 1211 | # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml)
|
| 1212 | typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local)
|
| 1213 | # If set to false, hide haskell version if it's the same as in the implicit global project.
|
| 1214 | typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true
|
| 1215 | # Custom icon.
|
| 1216 | # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1217 |
|
| 1218 | #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
| 1219 | # Show kubecontext only when the command you are typing invokes one of these tools.
|
| 1220 | # Tip: Remove the next line to always show kubecontext.
|
| 1221 | typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
|
| 1222 |
|
| 1223 | # Kubernetes context classes for the purpose of using different colors, icons and expansions with
|
| 1224 | # different contexts.
|
| 1225 | #
|
| 1226 | # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element
|
| 1227 | # in each pair defines a pattern against which the current kubernetes context gets matched.
|
| 1228 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
| 1229 | # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,
|
| 1230 | # you'll see this value in your prompt. The second element of each pair in
|
| 1231 | # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The
|
| 1232 | # first match wins.
|
| 1233 | #
|
| 1234 | # For example, given these settings:
|
| 1235 | #
|
| 1236 | # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
|
| 1237 | # '*prod*' PROD
|
| 1238 | # '*test*' TEST
|
| 1239 | # '*' DEFAULT)
|
| 1240 | #
|
| 1241 | # If your current kubernetes context is "deathray-testing/default", its class is TEST
|
| 1242 | # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'.
|
| 1243 | #
|
| 1244 | # You can define different colors, icons and content expansions for different classes:
|
| 1245 | #
|
| 1246 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28
|
| 1247 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1248 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
| 1249 | typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
|
| 1250 | # '*prod*' PROD # These values are examples that are unlikely
|
| 1251 | # '*test*' TEST # to match your needs. Customize them as needed.
|
| 1252 | '*' DEFAULT)
|
| 1253 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
|
| 1254 | # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1255 |
|
| 1256 | # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
|
| 1257 | # segment. Parameter expansions are very flexible and fast, too. See reference:
|
| 1258 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
|
| 1259 | #
|
| 1260 | # Within the expansion the following parameters are always available:
|
| 1261 | #
|
| 1262 | # - P9K_CONTENT The content that would've been displayed if there was no content
|
| 1263 | # expansion defined.
|
| 1264 | # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the
|
| 1265 | # output of `kubectl config get-contexts`.
|
| 1266 | # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the
|
| 1267 | # output of `kubectl config get-contexts`.
|
| 1268 | # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE
|
| 1269 | # in the output of `kubectl config get-contexts`. If there is no
|
| 1270 | # namespace, the parameter is set to "default".
|
| 1271 | # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the
|
| 1272 | # output of `kubectl config get-contexts`.
|
| 1273 | #
|
| 1274 | # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),
|
| 1275 | # the following extra parameters are available:
|
| 1276 | #
|
| 1277 | # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks".
|
| 1278 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID.
|
| 1279 | # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone.
|
| 1280 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster.
|
| 1281 | #
|
| 1282 | # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,
|
| 1283 | # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01":
|
| 1284 | #
|
| 1285 | # - P9K_KUBECONTEXT_CLOUD_NAME=gke
|
| 1286 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account
|
| 1287 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a
|
| 1288 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
|
| 1289 | #
|
| 1290 | # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01":
|
| 1291 | #
|
| 1292 | # - P9K_KUBECONTEXT_CLOUD_NAME=eks
|
| 1293 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
|
| 1294 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
|
| 1295 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
|
| 1296 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
|
| 1297 | # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
|
| 1298 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
|
| 1299 | # Append the current context's namespace if it's not "default".
|
| 1300 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
|
| 1301 |
|
| 1302 | # Custom prefix.
|
| 1303 | # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '
|
| 1304 |
|
| 1305 | ################[ terraform: terraform workspace (https://www.terraform.io) ]#################
|
| 1306 | # Don't show terraform workspace if it's literally "default".
|
| 1307 | typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false
|
| 1308 | # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element
|
| 1309 | # in each pair defines a pattern against which the current terraform workspace gets matched.
|
| 1310 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
| 1311 | # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,
|
| 1312 | # you'll see this value in your prompt. The second element of each pair in
|
| 1313 | # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The
|
| 1314 | # first match wins.
|
| 1315 | #
|
| 1316 | # For example, given these settings:
|
| 1317 | #
|
| 1318 | # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
|
| 1319 | # '*prod*' PROD
|
| 1320 | # '*test*' TEST
|
| 1321 | # '*' OTHER)
|
| 1322 | #
|
| 1323 | # If your current terraform workspace is "project_test", its class is TEST because "project_test"
|
| 1324 | # doesn't match the pattern '*prod*' but does match '*test*'.
|
| 1325 | #
|
| 1326 | # You can define different colors, icons and content expansions for different classes:
|
| 1327 | #
|
| 1328 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28
|
| 1329 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1330 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
| 1331 | typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
|
| 1332 | # '*prod*' PROD # These values are examples that are unlikely
|
| 1333 | # '*test*' TEST # to match your needs. Customize them as needed.
|
| 1334 | '*' OTHER)
|
| 1335 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
|
| 1336 | # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1337 |
|
| 1338 | #############[ terraform_version: terraform version (https://www.terraform.io) ]##############
|
| 1339 | # Terraform version color.
|
| 1340 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38
|
| 1341 | # Custom icon.
|
| 1342 | # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1343 |
|
| 1344 | #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
|
| 1345 | # Show aws only when the command you are typing invokes one of these tools.
|
| 1346 | # Tip: Remove the next line to always show aws.
|
| 1347 | typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
|
| 1348 |
|
| 1349 | # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
|
| 1350 | # in each pair defines a pattern against which the current AWS profile gets matched.
|
| 1351 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
| 1352 | # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,
|
| 1353 | # you'll see this value in your prompt. The second element of each pair in
|
| 1354 | # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The
|
| 1355 | # first match wins.
|
| 1356 | #
|
| 1357 | # For example, given these settings:
|
| 1358 | #
|
| 1359 | # typeset -g POWERLEVEL9K_AWS_CLASSES=(
|
| 1360 | # '*prod*' PROD
|
| 1361 | # '*test*' TEST
|
| 1362 | # '*' DEFAULT)
|
| 1363 | #
|
| 1364 | # If your current AWS profile is "company_test", its class is TEST
|
| 1365 | # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'.
|
| 1366 | #
|
| 1367 | # You can define different colors, icons and content expansions for different classes:
|
| 1368 | #
|
| 1369 | # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28
|
| 1370 | # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1371 | # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
| 1372 | typeset -g POWERLEVEL9K_AWS_CLASSES=(
|
| 1373 | # '*prod*' PROD # These values are examples that are unlikely
|
| 1374 | # '*test*' TEST # to match your needs. Customize them as needed.
|
| 1375 | '*' DEFAULT)
|
| 1376 | typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
|
| 1377 | # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1378 |
|
| 1379 | # AWS segment format. The following parameters are available within the expansion.
|
| 1380 | #
|
| 1381 | # - P9K_AWS_PROFILE The name of the current AWS profile.
|
| 1382 | # - P9K_AWS_REGION The region associated with the current AWS profile.
|
| 1383 | typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}'
|
| 1384 |
|
| 1385 | #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
|
| 1386 | # AWS Elastic Beanstalk environment color.
|
| 1387 | typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70
|
| 1388 | # Custom icon.
|
| 1389 | # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1390 |
|
| 1391 | ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
|
| 1392 | # Show azure only when the command you are typing invokes one of these tools.
|
| 1393 | # Tip: Remove the next line to always show azure.
|
| 1394 | typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
|
| 1395 |
|
| 1396 | # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
|
| 1397 | # in each pair defines a pattern against which the current azure account name gets matched.
|
| 1398 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
| 1399 | # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
|
| 1400 | # you'll see this value in your prompt. The second element of each pair in
|
| 1401 | # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
|
| 1402 | # first match wins.
|
| 1403 | #
|
| 1404 | # For example, given these settings:
|
| 1405 | #
|
| 1406 | # typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
| 1407 | # '*prod*' PROD
|
| 1408 | # '*test*' TEST
|
| 1409 | # '*' OTHER)
|
| 1410 | #
|
| 1411 | # If your current azure account is "company_test", its class is TEST because "company_test"
|
| 1412 | # doesn't match the pattern '*prod*' but does match '*test*'.
|
| 1413 | #
|
| 1414 | # You can define different colors, icons and content expansions for different classes:
|
| 1415 | #
|
| 1416 | # typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28
|
| 1417 | # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1418 | # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
| 1419 | typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
| 1420 | # '*prod*' PROD # These values are examples that are unlikely
|
| 1421 | # '*test*' TEST # to match your needs. Customize them as needed.
|
| 1422 | '*' OTHER)
|
| 1423 |
|
| 1424 | # Azure account name color.
|
| 1425 | typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
|
| 1426 | # Custom icon.
|
| 1427 | # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1428 |
|
| 1429 | ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
|
| 1430 | # Show gcloud only when the command you are typing invokes one of these tools.
|
| 1431 | # Tip: Remove the next line to always show gcloud.
|
| 1432 | typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
|
| 1433 | # Google cloud color.
|
| 1434 | typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
|
| 1435 |
|
| 1436 | # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or
|
| 1437 | # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative
|
| 1438 | # enough. You can use the following parameters in the expansions. Each of them corresponds to the
|
| 1439 | # output of `gcloud` tool.
|
| 1440 | #
|
| 1441 | # Parameter | Source
|
| 1442 | # -------------------------|--------------------------------------------------------------------
|
| 1443 | # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)'
|
| 1444 | # P9K_GCLOUD_ACCOUNT | gcloud config get-value account
|
| 1445 | # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project
|
| 1446 | # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'
|
| 1447 | #
|
| 1448 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.
|
| 1449 | #
|
| 1450 | # Obtaining project name requires sending a request to Google servers. This can take a long time
|
| 1451 | # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud
|
| 1452 | # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets
|
| 1453 | # set and gcloud prompt segment transitions to state COMPLETE.
|
| 1454 | #
|
| 1455 | # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL
|
| 1456 | # and COMPLETE. You can also hide gcloud in state PARTIAL by setting
|
| 1457 | # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and
|
| 1458 | # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty.
|
| 1459 | typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}'
|
| 1460 | typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}'
|
| 1461 |
|
| 1462 | # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name
|
| 1463 | # this often. Negative value disables periodic polling. In this mode project name is retrieved
|
| 1464 | # only when the current configuration, account or project id changes.
|
| 1465 | typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60
|
| 1466 |
|
| 1467 | # Custom icon.
|
| 1468 | # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1469 |
|
| 1470 | #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
|
| 1471 | # Show google_app_cred only when the command you are typing invokes one of these tools.
|
| 1472 | # Tip: Remove the next line to always show google_app_cred.
|
| 1473 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
|
| 1474 |
|
| 1475 | # Google application credentials classes for the purpose of using different colors, icons and
|
| 1476 | # expansions with different credentials.
|
| 1477 | #
|
| 1478 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first
|
| 1479 | # element in each pair defines a pattern against which the current kubernetes context gets
|
| 1480 | # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion
|
| 1481 | # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION
|
| 1482 | # parameters, you'll see this value in your prompt. The second element of each pair in
|
| 1483 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.
|
| 1484 | # The first match wins.
|
| 1485 | #
|
| 1486 | # For example, given these settings:
|
| 1487 | #
|
| 1488 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
|
| 1489 | # '*:*prod*:*' PROD
|
| 1490 | # '*:*test*:*' TEST
|
| 1491 | # '*' DEFAULT)
|
| 1492 | #
|
| 1493 | # If your current Google application credentials is "service_account deathray-testing [email protected]",
|
| 1494 | # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.
|
| 1495 | #
|
| 1496 | # You can define different colors, icons and content expansions for different classes:
|
| 1497 | #
|
| 1498 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28
|
| 1499 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1500 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'
|
| 1501 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
|
| 1502 | # '*:*prod*:*' PROD # These values are examples that are unlikely
|
| 1503 | # '*:*test*:*' TEST # to match your needs. Customize them as needed.
|
| 1504 | '*' DEFAULT)
|
| 1505 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32
|
| 1506 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1507 |
|
| 1508 | # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by
|
| 1509 | # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:
|
| 1510 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
|
| 1511 | #
|
| 1512 | # You can use the following parameters in the expansion. Each of them corresponds to one of the
|
| 1513 | # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.
|
| 1514 | #
|
| 1515 | # Parameter | JSON key file field
|
| 1516 | # ---------------------------------+---------------
|
| 1517 | # P9K_GOOGLE_APP_CRED_TYPE | type
|
| 1518 | # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id
|
| 1519 | # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email
|
| 1520 | #
|
| 1521 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
|
| 1522 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
|
| 1523 |
|
| 1524 | ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
|
| 1525 | # Toolbox color.
|
| 1526 | typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178
|
| 1527 | # Don't display the name of the toolbox if it matches fedora-toolbox-*.
|
| 1528 | typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
|
| 1529 | # Custom icon.
|
| 1530 | # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1531 | # Custom prefix.
|
| 1532 | # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin '
|
| 1533 |
|
| 1534 | ###############################[ public_ip: public IP address ]###############################
|
| 1535 | # Public IP color.
|
| 1536 | typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
|
| 1537 | # Custom icon.
|
| 1538 | # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1539 |
|
| 1540 | ########################[ vpn_ip: virtual private network indicator ]#########################
|
| 1541 | # VPN IP color.
|
| 1542 | typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81
|
| 1543 | # When on VPN, show just an icon without the IP address.
|
| 1544 | # Tip: To display the private IP address when on VPN, remove the next line.
|
| 1545 | typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
|
| 1546 | # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
|
| 1547 | # to see the name of the interface.
|
| 1548 | typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'
|
| 1549 | # If set to true, show one segment per matching network interface. If set to false, show only
|
| 1550 | # one segment corresponding to the first matching network interface.
|
| 1551 | # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
|
| 1552 | typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false
|
| 1553 | # Custom icon.
|
| 1554 | # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1555 |
|
| 1556 | ###########[ ip: ip address and bandwidth usage for a specified network interface ]###########
|
| 1557 | # IP color.
|
| 1558 | typeset -g POWERLEVEL9K_IP_FOREGROUND=38
|
| 1559 | # The following parameters are accessible within the expansion:
|
| 1560 | #
|
| 1561 | # Parameter | Meaning
|
| 1562 | # ----------------------+-------------------------------------------
|
| 1563 | # P9K_IP_IP | IP address
|
| 1564 | # P9K_IP_INTERFACE | network interface
|
| 1565 | # P9K_IP_RX_BYTES | total number of bytes received
|
| 1566 | # P9K_IP_TX_BYTES | total number of bytes sent
|
| 1567 | # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt
|
| 1568 | # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt
|
| 1569 | # P9K_IP_RX_RATE | receive rate (since last prompt)
|
| 1570 | # P9K_IP_TX_RATE | send rate (since last prompt)
|
| 1571 | typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}'
|
| 1572 | # Show information for the first network interface whose name matches this regular expression.
|
| 1573 | # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
|
| 1574 | typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
|
| 1575 | # Custom icon.
|
| 1576 | # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1577 |
|
| 1578 | #########################[ proxy: system-wide http/https/ftp proxy ]##########################
|
| 1579 | # Proxy color.
|
| 1580 | typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68
|
| 1581 | # Custom icon.
|
| 1582 | # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1583 |
|
| 1584 | ################################[ battery: internal battery ]#################################
|
| 1585 | # Show battery in red when it's below this level and not connected to power supply.
|
| 1586 | typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
|
| 1587 | typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
|
| 1588 | # Show battery in green when it's charging or fully charged.
|
| 1589 | typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70
|
| 1590 | # Show battery in yellow when it's discharging.
|
| 1591 | typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
|
| 1592 | # Battery pictograms going from low to high level of charge.
|
| 1593 | typeset -g POWERLEVEL9K_BATTERY_STAGES='\UF008E\UF007A\UF007B\UF007C\UF007D\UF007E\UF007F\UF0080\UF0081\UF0082\UF0079'
|
| 1594 | # Don't show the remaining time to charge/discharge.
|
| 1595 | typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
| 1596 |
|
| 1597 | #####################################[ wifi: wifi speed ]#####################################
|
| 1598 | # WiFi color.
|
| 1599 | typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68
|
| 1600 | # Custom icon.
|
| 1601 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1602 |
|
| 1603 | # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).
|
| 1604 | #
|
| 1605 | # # Wifi colors and icons for different signal strength levels (low to high).
|
| 1606 | # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values
|
| 1607 | # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values
|
| 1608 | #
|
| 1609 | # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'
|
| 1610 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'
|
| 1611 | #
|
| 1612 | # The following parameters are accessible within the expansions:
|
| 1613 | #
|
| 1614 | # Parameter | Meaning
|
| 1615 | # ----------------------+---------------
|
| 1616 | # P9K_WIFI_SSID | service set identifier, a.k.a. network name
|
| 1617 | # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown
|
| 1618 | # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second
|
| 1619 | # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0
|
| 1620 | # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
|
| 1621 | # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
|
| 1622 |
|
| 1623 | ####################################[ time: current time ]####################################
|
| 1624 | # Current time color.
|
| 1625 | typeset -g POWERLEVEL9K_TIME_FOREGROUND=66
|
| 1626 | # Format for the current time: 09:51:02. See `man 3 strftime`.
|
| 1627 | typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
|
| 1628 | # If set to true, time will update when you hit enter. This way prompts for the past
|
| 1629 | # commands will contain the start times of their commands as opposed to the default
|
| 1630 | # behavior where they contain the end times of their preceding commands.
|
| 1631 | typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
|
| 1632 | # Custom icon.
|
| 1633 | # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1634 | # Custom prefix.
|
| 1635 | # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat '
|
| 1636 |
|
| 1637 | # Example of a user-defined prompt segment. Function prompt_example will be called on every
|
| 1638 | # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
|
| 1639 | # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.
|
| 1640 | #
|
| 1641 | # Type `p10k help segment` for documentation and a more sophisticated example.
|
| 1642 | function prompt_example() {
|
| 1643 | p10k segment -f 208 -i '⭐' -t 'hello, %n'
|
| 1644 | }
|
| 1645 |
|
| 1646 | # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
|
| 1647 | # is to generate the prompt segment for display in instant prompt. See
|
| 1648 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
| 1649 | #
|
| 1650 | # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
|
| 1651 | # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
|
| 1652 | # will replay these calls without actually calling instant_prompt_*. It is imperative that
|
| 1653 | # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this
|
| 1654 | # rule is not observed, the content of instant prompt will be incorrect.
|
| 1655 | #
|
| 1656 | # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If
|
| 1657 | # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.
|
| 1658 | function instant_prompt_example() {
|
| 1659 | # Since prompt_example always makes the same `p10k segment` calls, we can call it from
|
| 1660 | # instant_prompt_example. This will give us the same `example` prompt segment in the instant
|
| 1661 | # and regular prompts.
|
| 1662 | prompt_example
|
| 1663 | }
|
| 1664 |
|
| 1665 | # User-defined prompt segments can be customized the same way as built-in segments.
|
| 1666 | # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208
|
| 1667 | # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
| 1668 |
|
| 1669 | # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
|
| 1670 | # when accepting a command line. Supported values:
|
| 1671 | #
|
| 1672 | # - off: Don't change prompt when accepting a command line.
|
| 1673 | # - always: Trim down prompt when accepting a command line.
|
| 1674 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command
|
| 1675 | # typed after changing current working directory.
|
| 1676 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
|
| 1677 |
|
| 1678 | # Instant prompt mode.
|
| 1679 | #
|
| 1680 | # - off: Disable instant prompt. Choose this if you've tried instant prompt and found
|
| 1681 | # it incompatible with your zsh configuration files.
|
| 1682 | # - quiet: Enable instant prompt and don't print warnings when detecting console output
|
| 1683 | # during zsh initialization. Choose this if you've read and understood
|
| 1684 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
| 1685 | # - verbose: Enable instant prompt and print a warning when detecting console output during
|
| 1686 | # zsh initialization. Choose this if you've never tried instant prompt, haven't
|
| 1687 | # seen the warning, or if you are unsure what this all means.
|
| 1688 | typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
| 1689 |
|
| 1690 | # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
|
| 1691 | # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
|
| 1692 | # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
|
| 1693 | # really need it.
|
| 1694 | typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
| 1695 |
|
| 1696 | # If p10k is already loaded, reload configuration.
|
| 1697 | # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
| 1698 | (( ! $+functions[p10k] )) || p10k reload
|
| 1699 | }
|
| 1700 |
|
| 1701 | # Tell `p10k configure` which file it should overwrite.
|
| 1702 | typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
|
| 1703 |
|
| 1704 | (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
|
| 1705 | 'builtin' 'unset' 'p10k_config_opts'
|
| 1706 |
|