feat(minion): switch to zsh #10

merged
opened by a.starrysky.fyi targeting main from private/minion/push-rkknsxzmlnsk

I've installed zsh, including

  • zsh4humans
  • powerlevel10k

This is because

  • I'm interested installing atuin, and we've had some problems using it with bash
  • I'm interested in adding jujutsu information to my prompt, and zsh will let me do this much more easily than bash

This isn't an ingredient of its own yet because it doesn't integrate nicely with, say, catppuccin (or really anything that isn't itself) but it's a start...

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