2021-01-28 00:59:49 +01:00
|
|
|
|
'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 -o extended_glob
|
|
|
|
|
|
|
|
|
|
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
|
|
|
|
|
autoload -Uz is-at-least && is-at-least 5.1 || return
|
|
|
|
|
|
|
|
|
|
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
|
|
|
|
# =========================[ Line #1 ]=========================
|
|
|
|
|
virtualenv
|
|
|
|
|
# aws
|
|
|
|
|
# terraform
|
|
|
|
|
kubecontext
|
|
|
|
|
vcs
|
|
|
|
|
background_jobs
|
2021-01-28 14:01:09 +01:00
|
|
|
|
command_execution_time
|
2021-01-28 00:59:49 +01:00
|
|
|
|
status
|
|
|
|
|
newline
|
|
|
|
|
# =========================[ Line #2 ]=========================
|
|
|
|
|
context
|
|
|
|
|
dir
|
|
|
|
|
prompt_char
|
|
|
|
|
)
|
|
|
|
|
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
|
|
|
|
|
|
|
|
|
|
typeset -g POWERLEVEL9K_MODE=nerdfont-complete
|
|
|
|
|
typeset -g POWERLEVEL9K_ICON_PADDING=none
|
|
|
|
|
typeset -g POWERLEVEL9K_BACKGROUND= # transparent background
|
|
|
|
|
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace
|
|
|
|
|
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space
|
|
|
|
|
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol
|
|
|
|
|
typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true
|
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
|
|
|
|
|
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=
|
|
|
|
|
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=
|
|
|
|
|
typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=
|
|
|
|
|
typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
|
|
|
|
|
typeset -g POWERLEVEL9K_SHOW_RULER=false
|
2021-01-28 14:01:09 +01:00
|
|
|
|
typeset -g POWERLEVEL9K_RULER_CHAR='─'
|
2021-01-28 00:59:49 +01:00
|
|
|
|
typeset -g POWERLEVEL9K_RULER_FOREGROUND=240
|
|
|
|
|
|
|
|
|
|
################################[ prompt_char: prompt symbol ]################################
|
|
|
|
|
# Green prompt symbol if the last command succeeded.
|
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76
|
|
|
|
|
# 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='❯'
|
|
|
|
|
# Prompt symbol in command vi mode.
|
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION=' ❯'
|
|
|
|
|
# Prompt symbol in command vi mode.
|
|
|
|
|
# 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_OVERWRITE_STATE=true
|
|
|
|
|
# No line terminator if prompt_char is the last segment.
|
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
|
|
|
|
|
# No line introducer if prompt_char is the first segment.
|
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
|
|
|
|
|
|
|
|
|
|
##################################[ dir: current directory ]##################################
|
|
|
|
|
# Default current directory color.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_FOREGROUND=37
|
|
|
|
|
# If directory is too long, shorten some of its segments to the shortest possible unique
|
|
|
|
|
# prefix. The shortened directory can be tab-completed to the original.
|
|
|
|
|
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
|
|
|
|
# Replace removed segment suffixes with this symbol.
|
|
|
|
|
typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
|
|
|
|
|
# Color of the shortened directory segments.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
|
|
|
|
|
# Color of the anchor directory segments. Anchor segments are never shortened. The first
|
|
|
|
|
# segment is always an anchor.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=37
|
|
|
|
|
# Display anchor directory segments in bold.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=false
|
|
|
|
|
# Don't shorten directories that contain any of these files. They are anchors.
|
|
|
|
|
local anchor_files=(
|
|
|
|
|
.git
|
|
|
|
|
)
|
|
|
|
|
typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})"
|
|
|
|
|
# If set to "first" ("last"), remove everything before the first (last) subdirectory that contains
|
|
|
|
|
# files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is
|
|
|
|
|
# /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)
|
|
|
|
|
# or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers
|
|
|
|
|
# and other directories don't.
|
|
|
|
|
#
|
|
|
|
|
# Optionally, "first" and "last" can be followed by ":<offset>" where <offset> is an integer.
|
|
|
|
|
# This moves the truncation point to the right (positive offset) or to the left (negative offset)
|
|
|
|
|
# relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0"
|
|
|
|
|
# respectively.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
|
|
|
|
|
# Don't shorten this many last directory segments. They are anchors.
|
|
|
|
|
typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
|
|
|
|
|
# Shorten directory if it's longer than this even if there is space for it. The value can
|
|
|
|
|
# be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,
|
|
|
|
|
# directory will be shortened only when prompt doesn't fit or when other parameters demand it
|
|
|
|
|
# (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).
|
|
|
|
|
# If set to `0`, directory will always be shortened to its minimum length.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
|
|
|
|
|
# When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
|
|
|
|
|
# many columns for typing commands.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
|
|
|
|
|
# When `dir` segment is on the last prompt line, try to shorten it enough to leave at least
|
|
|
|
|
# COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
|
|
|
|
|
# If set to true, embed a hyperlink into the directory. Useful for quickly
|
|
|
|
|
# opening a directory in the file manager simply by clicking the link.
|
|
|
|
|
# Can also be handy when the directory is shortened, as it allows you to see
|
|
|
|
|
# the full directory that was used in previous commands.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
|
|
|
|
|
|
|
|
|
|
# Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and
|
|
|
|
|
# POWERLEVEL9K_DIR_CLASSES below.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2
|
|
|
|
|
|
|
|
|
|
# The default icon shown next to non-writable directories when POWERLEVEL9K_DIR_SHOW_WRITABLE is
|
|
|
|
|
# set to v2.
|
|
|
|
|
# typeset -g POWERLEVEL9K_LOCK_ICON='⭐'
|
|
|
|
|
|
|
|
|
|
# POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different
|
|
|
|
|
# directories. It must be an array with 3 * N elements. Each triplet consists of:
|
|
|
|
|
#
|
|
|
|
|
# 1. A pattern against which the current directory is matched. Matching is done with
|
|
|
|
|
# extended_glob option enabled.
|
|
|
|
|
# 2. Directory class for the purpose of styling.
|
|
|
|
|
# 3. An empty string.
|
|
|
|
|
#
|
|
|
|
|
# Triplets are tried in order. The first triplet whose pattern matches $PWD wins. If there
|
|
|
|
|
#
|
|
|
|
|
# If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v2 and the current directory is not writable,
|
|
|
|
|
# its class gets suffix _NOT_WRITABLE.
|
|
|
|
|
#
|
|
|
|
|
# For example, given these settings:
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_CLASSES=(
|
|
|
|
|
# '~/work(|/*)' WORK ''
|
|
|
|
|
# '~(|/*)' HOME ''
|
|
|
|
|
# '*' DEFAULT '')
|
|
|
|
|
#
|
|
|
|
|
# Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with class
|
|
|
|
|
# WORK or WORK_NOT_WRITABLE.
|
|
|
|
|
#
|
|
|
|
|
# Simply assigning classes to directories doesn't have any visible effects. It merely gives you an
|
|
|
|
|
# option to define custom colors and icons for different directory classes.
|
|
|
|
|
#
|
|
|
|
|
# # Styling for WORK.
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39
|
|
|
|
|
#
|
|
|
|
|
# # Styling for WORK_NOT_WRITABLE.
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39
|
|
|
|
|
#
|
|
|
|
|
# If a styling parameter isn't explicitly defined for some class, it falls back to the classless
|
|
|
|
|
# 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=()
|
|
|
|
|
|
|
|
|
|
# Custom prefix.
|
|
|
|
|
#typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '
|
|
|
|
|
|
|
|
|
|
#####################################[ vcs: git status ]######################################
|
2021-01-28 14:01:09 +01:00
|
|
|
|
# Grey Git prompt. This makes stale prompts indistinguishable from up-to-date ones.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_FOREGROUND=246
|
|
|
|
|
|
|
|
|
|
# Disable async loading indicator to make directories that aren't Git repositories
|
|
|
|
|
# indistinguishable from large Git repositories without known state.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_LOADING_TEXT=
|
|
|
|
|
|
|
|
|
|
# Don't wait for Git status even for a millisecond, so that prompt always updates
|
|
|
|
|
# asynchronously when Git state changes.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0
|
|
|
|
|
|
|
|
|
|
# Cyan ahead/behind arrows.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan
|
|
|
|
|
# Don't show remote branch, current tag or stashes.
|
2021-01-28 14:05:31 +01:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind git-stash)
|
2021-01-28 14:01:09 +01:00
|
|
|
|
# Don't show the branch icon.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=''
|
|
|
|
|
# When in detached HEAD state, show @commit where branch normally goes.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@'
|
|
|
|
|
# Don't show staged, unstaged, untracked indicators.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON=
|
|
|
|
|
# Show '*' when there are staged, unstaged or untracked files.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*'
|
|
|
|
|
# Show '⇣' if local branch is behind remote.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣'
|
|
|
|
|
# Show '⇡' if local branch is ahead of remote.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡'
|
|
|
|
|
# Don't show the number of commits next to the ahead/behind arrows.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1
|
|
|
|
|
# Remove space between '⇣' and '⇡' and all trailing spaces.
|
2021-01-28 14:07:31 +01:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }'
|
2021-01-28 14:01:09 +01:00
|
|
|
|
# Other icons
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_STASH_ICON='≡'
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_GIT_ICON='\uF126'
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_GIT_GITHUB_ICON='\uF126'
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_GIT_GITLAB_ICON='\uF126'
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_GIT_BITBUCKET_ICON='\uF126'
|
2021-01-28 00:59:49 +01:00
|
|
|
|
|
|
|
|
|
##########################[ status: exit code of the last command ]###########################
|
|
|
|
|
# Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and
|
|
|
|
|
# style them independently from the regular OK and ERROR state.
|
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
|
|
|
|
|
|
|
|
|
|
# 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_FOREGROUND=70
|
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
|
|
|
|
|
|
|
|
|
|
# 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_FOREGROUND=70
|
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
|
|
|
|
|
|
|
|
|
|
# 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_FOREGROUND=160
|
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
|
|
|
|
|
|
|
|
|
|
# Status when the last command was terminated by a signal.
|
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
|
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160
|
|
|
|
|
# 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='✘'
|
|
|
|
|
|
|
|
|
|
# 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_FOREGROUND=160
|
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
|
|
|
|
|
|
|
|
|
|
###################[ command_execution_time: duration of the last command ]###################
|
|
|
|
|
# Show duration of the last command if takes at least this many seconds.
|
|
|
|
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=2
|
|
|
|
|
# Show this many fractional digits. Zero means round to seconds.
|
|
|
|
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
|
|
|
|
# Execution time color.
|
|
|
|
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=220
|
|
|
|
|
# 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=''
|
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook '
|
|
|
|
|
|
|
|
|
|
#######################[ background_jobs: presence of background jobs ]#######################
|
|
|
|
|
# Don't show the number of background jobs.
|
|
|
|
|
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
|
|
|
|
|
# Background jobs color.
|
|
|
|
|
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70
|
|
|
|
|
# Custom icon.
|
|
|
|
|
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⇶'
|
|
|
|
|
|
|
|
|
|
##################################[ context: user@hostname ]##################################
|
|
|
|
|
# Context color when running with privileges.
|
2021-01-28 01:03:48 +01:00
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1
|
2021-01-28 00:59:49 +01:00
|
|
|
|
# Context color in SSH without privileges.
|
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=
|
|
|
|
|
# Default context color (no privileges, no SSH).
|
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=
|
|
|
|
|
|
|
|
|
|
# Context format when running with privileges: bold user@hostname.
|
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'
|
|
|
|
|
# Context format when in SSH without privileges: user@hostname.
|
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
|
|
|
|
|
# Default context format (no privileges, no SSH): user@hostname.
|
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
|
|
|
|
|
|
|
|
|
|
# Don't show context unless running with privileges or in SSH.
|
|
|
|
|
# Tip: Remove the next line to always show context.
|
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
|
|
|
|
|
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith '
|
|
|
|
|
|
|
|
|
|
###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
|
|
|
|
|
# Python virtual environment color.
|
|
|
|
|
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=15
|
|
|
|
|
# Don't show Python version next to the virtual environment name.
|
|
|
|
|
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
|
|
|
|
# If set to "false", won't show virtualenv if pyenv is already shown.
|
|
|
|
|
# If set to "if-different", won't show virtualenv if it's the same as pyenv.
|
|
|
|
|
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
|
|
|
|
|
# Separate environment name from Python version only with a space.
|
|
|
|
|
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
|
|
|
|
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
|
|
|
|
# Show kubecontext only when the the command you are typing invokes one of these tools.
|
|
|
|
|
# Tip: Remove the next line to always show kubecontext.
|
|
|
|
|
#typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile'
|
|
|
|
|
|
|
|
|
|
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
|
|
|
|
|
# different contexts.
|
|
|
|
|
#
|
|
|
|
|
# POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element
|
|
|
|
|
# in each pair defines a pattern against which the current kubernetes context gets matched.
|
|
|
|
|
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
|
|
|
|
# that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,
|
|
|
|
|
# you'll see this value in your prompt. The second element of each pair in
|
|
|
|
|
# POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The
|
|
|
|
|
# first match wins.
|
|
|
|
|
#
|
|
|
|
|
# For example, given these settings:
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
|
|
|
|
|
# '*prod*' PROD
|
|
|
|
|
# '*test*' TEST
|
|
|
|
|
# '*' DEFAULT)
|
|
|
|
|
#
|
|
|
|
|
# If your current kubernetes context is "deathray-testing/default", its class is TEST
|
|
|
|
|
# because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'.
|
|
|
|
|
#
|
|
|
|
|
# You can define different colors, icons and content expansions for different classes:
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28
|
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
|
|
|
|
typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
|
|
|
|
|
# '*prod*' PROD # These values are examples that are unlikely
|
|
|
|
|
# '*test*' TEST # to match your needs. Customize them as needed.
|
|
|
|
|
'*' DEFAULT)
|
|
|
|
|
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=38
|
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
|
|
|
|
# Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
|
|
|
|
|
# segment. Parameter expansions are very flexible and fast, too. See reference:
|
|
|
|
|
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
|
|
|
|
|
#
|
|
|
|
|
# Within the expansion the following parameters are always available:
|
|
|
|
|
#
|
|
|
|
|
# - P9K_CONTENT The content that would've been displayed if there was no content
|
|
|
|
|
# expansion defined.
|
|
|
|
|
# - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the
|
|
|
|
|
# output of `kubectl config get-contexts`.
|
|
|
|
|
# - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the
|
|
|
|
|
# output of `kubectl config get-contexts`.
|
|
|
|
|
# - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE
|
|
|
|
|
# in the output of `kubectl config get-contexts`. If there is no
|
|
|
|
|
# namespace, the parameter is set to "default".
|
|
|
|
|
# - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the
|
|
|
|
|
# output of `kubectl config get-contexts`.
|
|
|
|
|
#
|
|
|
|
|
# If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),
|
|
|
|
|
# the following extra parameters are available:
|
|
|
|
|
#
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks".
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID.
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone.
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster.
|
|
|
|
|
#
|
|
|
|
|
# P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,
|
|
|
|
|
# if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01":
|
|
|
|
|
#
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_NAME=gke
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
|
|
|
|
|
#
|
|
|
|
|
# If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01":
|
|
|
|
|
#
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_NAME=eks
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
|
|
|
|
|
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
|
|
|
|
|
# Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
|
|
|
|
|
POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
|
|
|
|
|
# Append the current context's namespace if it's not "default".
|
|
|
|
|
POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
|
|
|
|
|
|
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '
|
|
|
|
|
|
|
|
|
|
################[ terraform: terraform workspace (https://www.terraform.io) ]#################
|
|
|
|
|
# Don't show terraform workspace if it's literally "default".
|
|
|
|
|
typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false
|
|
|
|
|
# POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element
|
|
|
|
|
# in each pair defines a pattern against which the current terraform workspace gets matched.
|
|
|
|
|
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
|
|
|
|
# that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,
|
|
|
|
|
# you'll see this value in your prompt. The second element of each pair in
|
|
|
|
|
# POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The
|
|
|
|
|
# first match wins.
|
|
|
|
|
#
|
|
|
|
|
# For example, given these settings:
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
|
|
|
|
|
# '*prod*' PROD
|
|
|
|
|
# '*test*' TEST
|
|
|
|
|
# '*' DEFAULT)
|
|
|
|
|
#
|
|
|
|
|
# If your current terraform workspace is "project_test", its class is TEST because "project_test"
|
|
|
|
|
# doesn't match the pattern '*prod*' but does match '*test*'.
|
|
|
|
|
#
|
|
|
|
|
# You can define different colors, icons and content expansions for different classes:
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28
|
|
|
|
|
# typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
|
|
|
|
typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
|
|
|
|
|
# '*prod*' PROD # These values are examples that are unlikely
|
|
|
|
|
# '*test*' TEST # to match your needs. Customize them as needed.
|
|
|
|
|
'*' DEFAULT)
|
|
|
|
|
typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_FOREGROUND=38
|
|
|
|
|
# typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
|
|
|
|
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
|
|
|
|
|
# Show aws only when the 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|terraform|aws-mfa'
|
|
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
|
|
|
|
# that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,
|
|
|
|
|
# you'll see this value in your prompt. The second element of each pair in
|
|
|
|
|
# POWERLEVEL9K_AWS_CLASSES defines the context class. Patterns are tried in order. The
|
|
|
|
|
# first match wins.
|
|
|
|
|
#
|
|
|
|
|
# For example, given these settings:
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_AWS_CLASSES=(
|
|
|
|
|
# '*prod*' PROD
|
|
|
|
|
# '*test*' TEST
|
|
|
|
|
# '*' DEFAULT)
|
|
|
|
|
#
|
|
|
|
|
# If your current AWS profile is "company_test", its class is TEST
|
|
|
|
|
# because "company_test" doesn't match the pattern '*prod*' but does match '*test*'.
|
|
|
|
|
#
|
|
|
|
|
# You can define different colors, icons and content expansions for different classes:
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28
|
|
|
|
|
# typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
|
|
|
|
typeset -g POWERLEVEL9K_AWS_CLASSES=(
|
|
|
|
|
# '*prod*' PROD # These values are examples that are unlikely
|
|
|
|
|
# '*test*' TEST # to match your needs. Customize them as needed.
|
|
|
|
|
'*' DEFAULT)
|
|
|
|
|
typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
|
|
|
|
|
# typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
|
|
|
|
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off
|
|
|
|
|
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
|
|
|
|
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
|
|
|
|
(( ! $+functions[p10k] )) || p10k reload
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
|
|
|
|
|
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
|
|
|
|
|
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING='VI MODE'
|
|
|
|
|
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=15
|
|
|
|
|
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=1
|
|
|
|
|
|
|
|
|
|
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
|
|
|
|
|
'builtin' 'unset' 'p10k_config_opts'
|