'builtin' 'local' '-a' 'p10k_config_opts' [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' () { emulate -L zsh setopt no_unset extended_glob unset -m 'POWERLEVEL9K_*' autoload -Uz is-at-least && is-at-least 5.1 || return zmodload zsh/langinfo if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8} fi typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( context dir vcs ) typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( background_jobs direnv virtualenv pyenv disk_usage ) typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER// }' typeset -g POWERLEVEL9K_MODE=nerdfont-complete typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─' typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─' typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─' typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%242F─╮' typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%242F─┤' typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%242F─╯' typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' fi typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT// }' typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION=' ' typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION=' ' typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION=' ' typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION=' ' typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= typeset -g POWERLEVEL9K_DIR_BACKGROUND=234 typeset -g POWERLEVEL9K_DIR_FOREGROUND=39 typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=false local anchor_files=( .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform CVS Cargo.toml composer.json go.mod package.json ) typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 typeset -g POWERLEVEL9K_DIR_HYPERLINK=false typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=true typeset -g POWERLEVEL9K_DIR_CLASSES=() typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=10 typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=235 typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=10 typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=235 typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=10 typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=235 typeset -g POWERLEVEL9K_VCS_CONFLICTED_FOREGROUND=9 typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=235 typeset -g POWERLEVEL9K_VCS_LOADING_FOREGROUND=15 typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=255 typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' POWERLEVEL9K_VCS_BRANCH_ICON=${(g::)POWERLEVEL9K_VCS_BRANCH_ICON} typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' POWERLEVEL9K_VCS_UNTRACKED_ICON=${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON} function my_git_formatter() { emulate -L zsh if [[ -n $P9K_CONTENT ]]; then typeset -g my_git_format=$P9K_CONTENT return fi local meta='' local clean='' local modified='' local untracked='' local conflicted='' local res local where if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then res+="${clean}${POWERLEVEL9K_VCS_BRANCH_ICON}" where=${(V)VCS_STATUS_LOCAL_BRANCH} elif [[ -n $VCS_STATUS_TAG ]]; then res+="${meta}#" where=${(V)VCS_STATUS_TAG} fi (( $#where > 32 )) && where[13,-13]="…" res+="${clean}${where//\%/%%}" [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" fi (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" typeset -g my_git_format=$res } functions -M my_git_formatter 2>/dev/null typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true typeset -g POWERLEVEL9K_STATUS_OK=true typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' typeset -g POWERLEVEL9K_STATUS_ERROR=true typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=95 typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=98 typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=true typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0 typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2 typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4 typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3 typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 typeset -g POWERLEVEL9K_LOAD_WHICH=5 typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1 typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0 typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=3 typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=0 typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3 typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0 typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n' typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= typeset -g POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION=false typeset -g POWERLEVEL9K_ANACONDA_{LEFT,RIGHT}_DELIMITER= typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( '*' DEFAULT) typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_FOREGROUND=4 typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_BACKGROUND=0 typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc' typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( '*' DEFAULT) typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7 typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5 typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi' typeset -g POWERLEVEL9K_AWS_CLASSES=( '*' DEFAULT) typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi' typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' typeset -g POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT//\%/%%}' typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi' typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( '*' DEFAULT) typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0 typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6 typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(wg|(.*tun))[0-9]*' typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1 typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2 typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3 typeset -g POWERLEVEL9K_BATTERY_STAGES=$'\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false function prompt_example() { p10k segment -i "POWERLEVEL9K_LINUX_ICON" -r -f blue -t " " } function instant_prompt_example() { prompt_example } typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true (( ! $+functions[p10k] )) || p10k reload } (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} 'builtin' 'unset' 'p10k_config_opts'