diff --git a/p10k-config.zsh b/p10k-config.zsh index d3c06c6..1b202b9 100644 --- a/p10k-config.zsh +++ b/p10k-config.zsh @@ -1,9 +1,3 @@ -# Generated by Powerlevel10k configuration wizard on 2025-07-30 at 16:35 CST. -# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 49619. -# Wizard options: nerdfont-v3 + powerline, small icons, rainbow, ascii, 2 lines, -# disconnected, sparse, fluent, instant_prompt=verbose. -# Type `p10k configure` to generate another config. -# # Config for Powerlevel10k with powerline prompt style with colorful background. # Type `p10k configure` to generate your own config based on it. # @@ -36,7 +30,7 @@ vcs # git status # =========================[ Line #2 ]========================= newline # \n - prompt_char # prompt symbol + # prompt_char # prompt symbol ) # The list of segments shown on the right. Fill it with less important segments. @@ -118,7 +112,7 @@ ) # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. - typeset -g POWERLEVEL9K_MODE=ascii + typeset -g POWERLEVEL9K_MODE=nerdfont-complete # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. typeset -g POWERLEVEL9K_ICON_PADDING=none @@ -141,16 +135,16 @@ # Connect left prompt lines with these symbols. You'll probably want to use the same color # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─' + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─' + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─' # Connect right prompt lines with these symbols. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%242F─╮' + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%242F─┤' + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%242F─╯' # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or - # '-'. The last two make it easier to see the alignment between left and right prompt and to + # '─'. The last two make it easier to see the alignment between left and right prompt and to # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false # for more compact prompt if using this option. typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' @@ -167,24 +161,24 @@ fi # Separator between same-color segments on the left. - typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='|' + typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' # Separator between same-color segments on the right. - typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='|' + typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' # Separator between different-color segments on the left. - typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='' + typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' # Separator between different-color segments on the right. - typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='' + typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' # To remove a separator between two segments, add "_joined" to the second segment name. # For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined) # The right end of left prompt. - typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' # The left end of right prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' # The left end of left prompt. - typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= # The right end of right prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= # Left prompt terminator for lines without any segments. typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= @@ -203,13 +197,13 @@ # Red prompt symbol if the last command failed. typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 # Default prompt symbol. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='>' + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' # Prompt symbol in command vi mode. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='<' + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' # Prompt symbol in visual vi mode. typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' # Prompt symbol in overwrite vi mode. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='^' + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true # No line terminator if prompt_char is the last segment. typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= @@ -353,7 +347,7 @@ # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls # back to POWERLEVEL9K_DIR_FOREGROUND. # - typeset -g POWERLEVEL9K_DIR_CLASSES=() + # typeset -g POWERLEVEL9K_DIR_CLASSES=() # Custom prefix. # typeset -g POWERLEVEL9K_DIR_PREFIX='in ' @@ -375,7 +369,7 @@ # Formatter for Git status. # - # Example output: master wip <42>42 *42 merge ~42 +42 !42 ?42. + # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. # # You can edit the function to customize how Git status looks. # @@ -403,9 +397,9 @@ if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then local branch=${(V)VCS_STATUS_LOCAL_BRANCH} # If local branch name is at most 32 characters long, show it in full. - # Otherwise show the first 12 .. the last 12. + # Otherwise show the first 12 … the last 12. # Tip: To always show local branch name in full without truncation, delete the next line. - (( $#branch > 32 )) && branch[13,-13]=".." # <-- this line + (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" fi @@ -416,9 +410,9 @@ ]]; then local tag=${(V)VCS_STATUS_TAG} # If tag name is at most 32 characters long, show it in full. - # Otherwise show the first 12 .. the last 12. + # Otherwise show the first 12 … the last 12. # Tip: To always show tag name in full without truncation, delete the next line. - (( $#tag > 32 )) && tag[13,-13]=".." # <-- this line + (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line res+="${meta}#${clean}${tag//\%/%%}" fi @@ -438,21 +432,21 @@ fi if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then - # <42 if behind the remote. - (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}<${VCS_STATUS_COMMITS_BEHIND}" - # >42 if ahead of the remote; no leading space if also behind the remote: <42>42. + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " - (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}>${VCS_STATUS_COMMITS_AHEAD}" + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then # Tip: Uncomment the next line to display '=' if up to date with the remote. # res+=" ${clean}=" fi - # <-42 if behind the push remote. - (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}<-${VCS_STATUS_PUSH_COMMITS_BEHIND}" + # ⇠42 if behind the push remote. + (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " - # ->42 if ahead of the push remote; no leading space if also behind: <-42->42. - (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}->${VCS_STATUS_PUSH_COMMITS_AHEAD}" + # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. + (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" # *42 if have stashes. (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" # 'merge' if the repo is in an unusual state. @@ -467,12 +461,12 @@ # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. # Remove the next line if you don't want to see untracked files at all. (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" - # "-" if the number of unstaged files is unknown. This can happen due to + # "─" if the number of unstaged files is unknown. This can happen due to # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower # than the number of files in the Git index, or due to bash.showDirtyState being set to false # in the repository config. The number of staged and untracked files may also be unknown # in this case. - (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}-" + (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" typeset -g my_git_format=$res } @@ -500,9 +494,9 @@ typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 # Custom icon. - typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= + # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom prefix. - typeset -g POWERLEVEL9K_VCS_PREFIX='on ' + # typeset -g POWERLEVEL9K_VCS_PREFIX='on ' # Show status of repositories of these types. You can add svn and/or hg if you are # using them. If you do, your prompt may become slow even when your current directory @@ -516,22 +510,22 @@ # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as # it will signify success by turning green. - typeset -g POWERLEVEL9K_STATUS_OK=false - typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='ok' + typeset -g POWERLEVEL9K_STATUS_OK=true + typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2 typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 # Status when some part of a pipe command fails but the overall exit status is zero. It may look # like this: 1|0. typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='ok' + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2 typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as # it will signify error by turning red. - typeset -g POWERLEVEL9K_STATUS_ERROR=false - typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='err' + typeset -g POWERLEVEL9K_STATUS_ERROR=true + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3 typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1 @@ -539,14 +533,14 @@ typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true # Use terse signal names: "INT" instead of "SIGINT(2)". typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION= + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3 typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1 # Status when some part of a pipe command fails and the overall exit status is also non-zero. # It may look like this: 1|0. typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='err' + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3 typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1 @@ -561,9 +555,9 @@ # Duration format: 1d 2h 3m 4s. typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' # Custom icon. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom prefix. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took ' + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took ' #######################[ background_jobs: presence of background jobs ]####################### # Background jobs color. @@ -912,11 +906,11 @@ typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255 typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8 - # If the tracked task is longer than 24 characters, truncate and append "..". + # If the tracked task is longer than 24 characters, truncate and append "…". # Tip: To always display tasks without truncation, delete the following parameter. # Tip: To hide task names and display just the icon when time tracking is enabled, set the # value of the following parameter to "". - typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+..}' + typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' # Custom icon. # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' @@ -994,7 +988,7 @@ # Custom icon. # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom prefix. - typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with ' + # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with ' ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### # Python virtual environment color. @@ -1209,7 +1203,7 @@ # - P9K_PACKAGE_NAME The value of `name` field in package.json. # - P9K_PACKAGE_VERSION The value of `version` field in package.json. # - # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' + # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${(V)P9K_PACKAGE_NAME//\%/%%}@${(V)P9K_PACKAGE_VERSION//\%/%%}' # Custom icon. # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' @@ -1370,9 +1364,6 @@ # Custom icon. # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - ################[ terraform_version: It shows active terraform version (https://www.terraform.io) ]################# - typeset -g POWERLEVEL9K_TERRAFORM_VERSION_SHOW_ON_COMMAND='terraform|tf' - #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# # Show kubecontext only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show kubecontext. @@ -1460,12 +1451,12 @@ POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' # Custom prefix. - typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at ' + # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at ' #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# # Show aws only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show aws. - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current AWS profile gets matched. @@ -1514,7 +1505,7 @@ ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## # Show azure only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show azure. - typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current azure account name gets matched. @@ -1596,7 +1587,7 @@ #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# # Show google_app_cred only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show google_app_cred. - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|tofu|pulumi|terragrunt' # Google application credentials classes for the purpose of using different colors, icons and # expansions with different credentials. @@ -1657,7 +1648,7 @@ # Custom icon. # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom prefix. - typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='in ' + # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='in ' ###############################[ public_ip: public IP address ]############################### # Public IP color. @@ -1699,7 +1690,7 @@ # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt # P9K_IP_RX_RATE | receive rate (since last prompt) # P9K_IP_TX_RATE | send rate (since last prompt) - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+<$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+>$P9K_IP_TX_RATE }$P9K_IP_IP' + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP' # Show information for the first network interface whose name matches this regular expression. # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' @@ -1722,7 +1713,7 @@ # Show battery in yellow when it's discharging. typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3 # Battery pictograms going from low to high level of charge. - typeset -g POWERLEVEL9K_BATTERY_STAGES=('battery') + typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█') # Don't show the remaining time to charge/discharge. typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0 @@ -1765,9 +1756,9 @@ # behavior where they contain the end times of their preceding commands. typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false # Custom icon. - typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= + # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom prefix. - typeset -g POWERLEVEL9K_TIME_PREFIX='at ' + # typeset -g POWERLEVEL9K_TIME_PREFIX='at ' # Example of a user-defined prompt segment. Function prompt_example will be called on every # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or @@ -1776,7 +1767,7 @@ # # Type `p10k help segment` for documentation and a more sophisticated example. function prompt_example() { - p10k segment -b 1 -f 3 -i '*' -t 'hello, %n' + p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n' } # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job @@ -1830,6 +1821,114 @@ # really need it. typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # =========================[ Canvas: Rainbow overrides ]========================= + # Applied from design/p10k-rainbow/rainbow.html (sha256 b94aaf3e...0b400). + # Base segment layout: root@host left, no outer frame hooks. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs newline prompt_char) + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time background_jobs disk_usage newline) + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='' + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='' + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='' + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='' + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='' + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='' + typeset -g POWERLEVEL9K_STATUS_OK=false + typeset -g POWERLEVEL9K_STATUS_OK_PIPE=false + # Canvas shows a bare ✘ on failure rather than the verbose exit-code form. + typeset -g POWERLEVEL9K_STATUS_VERBOSE=false + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=244 + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=131 + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_RIGHT_WHITESPACE=' ' + + typeset -g POWERLEVEL9K_DIR_BACKGROUND=67 + typeset -g POWERLEVEL9K_DIR_{FOREGROUND,ANCHOR_FOREGROUND,SHORTENED_FOREGROUND}=233 + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 + # Canvas has no folder emoji in the dir segment; keep the segment text-only (lock only when unwritable). + typeset -g POWERLEVEL9K_DIR_CLASSES=('~' HOME '' '~/*' HOME_SUBFOLDER '' '*' DEFAULT '') + typeset -g POWERLEVEL9K_LOCK_ICON='🔒' + typeset -g POWERLEVEL9K_VCS_{CLEAN,UNTRACKED}_BACKGROUND=72 + typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=179 + typeset -g POWERLEVEL9K_VCS_CONFLICTED_STATE=true + typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=230 + # Canvas branch shows only the branch name and its state suffix, no VCS icon. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='' + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=true + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS=true + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=153 + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=235 + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⚙' + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_ICON_BEFORE_CONTENT=false + typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=true + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=179 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=174 + typeset -g POWERLEVEL9K_DISK_USAGE_{WARNING,CRITICAL}_FOREGROUND=235 + typeset -g POWERLEVEL9K_DISK_USAGE_{WARNING,CRITICAL}_VISUAL_IDENTIFIER_EXPANSION='' + typeset -g POWERLEVEL9K_DISK_USAGE_{WARNING,CRITICAL}_CONTENT_EXPANSION='disk ${P9K_CONTENT}' + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=179 + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=236 + # Canvas shows the bare duration, no clock icon. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='' + typeset -g POWERLEVEL9K_STATUS_{ERROR,ERROR_SIGNAL,ERROR_PIPE}_BACKGROUND=174 + typeset -g POWERLEVEL9K_STATUS_{ERROR,ERROR_SIGNAL,ERROR_PIPE}_FOREGROUND=235 + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=236 + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=252 + typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=250 + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=235 + + # 巡检扩展 + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + "${(@)POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[1,-2]}" load ram newline + ) + typeset -g POWERLEVEL9K_LOAD_WHICH=5 + typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=252 + typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=179 + typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=174 + typeset -g POWERLEVEL9K_LOAD_{NORMAL,WARNING,CRITICAL}_FOREGROUND=235 + typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='' + typeset -g POWERLEVEL9K_LOAD_CONTENT_EXPANSION='load ${P9K_CONTENT}' + typeset -g POWERLEVEL9K_RAM_BACKGROUND=109 + typeset -g POWERLEVEL9K_RAM_FOREGROUND=235 + typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='' + typeset -g POWERLEVEL9K_RAM_CONTENT_EXPANSION='ram ${P9K_CONTENT}' + + # 集群与云扩展 + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + "${(@)POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[1,-2]}" kubecontext aws newline + ) + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm' + typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=('*prod*' PROD '*' DEFAULT) + typeset -g POWERLEVEL9K_KUBECONTEXT_PROD_BACKGROUND=174 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=109 + typeset -g POWERLEVEL9K_KUBECONTEXT_{PROD,DEFAULT}_FOREGROUND=235 + typeset -g POWERLEVEL9K_KUBECONTEXT_{PROD,DEFAULT}_VISUAL_IDENTIFIER_EXPANSION='' + typeset -g POWERLEVEL9K_KUBECONTEXT_{PROD,DEFAULT}_CONTENT_EXPANSION='k8s ${P9K_KUBECONTEXT_NAME//\%/%%}/${P9K_KUBECONTEXT_NAMESPACE//\%/%%}' + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|terraform|tofu' + typeset -g POWERLEVEL9K_AWS_CLASSES=('*' DEFAULT) + typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=179 + typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=235 + typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='' + typeset -g POWERLEVEL9K_AWS_DEFAULT_CONTENT_EXPANSION='aws ${P9K_CONTENT}' + + # 项目开发扩展 + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + "${(@)POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[1,-2]}" virtualenv node_version newline + ) + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER='' + typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=72 + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=235 + typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='' + typeset -g POWERLEVEL9K_VIRTUALENV_CONTENT_EXPANSION='venv ${P9K_CONTENT}' + typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true + typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=153 + typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=235 + typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='' + typeset -g POWERLEVEL9K_NODE_VERSION_CONTENT_EXPANSION='node ${P9K_CONTENT}' + # If p10k is already loaded, reload configuration. # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. (( ! $+functions[p10k] )) || p10k reload