Colors.
This commit is contained in:
parent
838c6d6c75
commit
a6cc6a2889
51
zsh/p10k.zsh
51
zsh/p10k.zsh
@ -39,9 +39,11 @@
|
|||||||
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
||||||
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
||||||
kubecontext # current kubernetes context (https://kubernetes.io/)
|
kubecontext # current kubernetes context (https://kubernetes.io/)
|
||||||
|
terraform # terraform workspace (https://www.terraform.io)
|
||||||
dir # current directory
|
dir # current directory
|
||||||
vcs # git status
|
vcs # git status
|
||||||
command_execution_time # duration of the last command
|
command_execution_time # duration of the last command
|
||||||
|
background_jobs # presence of background jobs
|
||||||
status # exit code of the last command
|
status # exit code of the last command
|
||||||
# =========================[ Line #2 ]=========================
|
# =========================[ Line #2 ]=========================
|
||||||
newline
|
newline
|
||||||
@ -54,7 +56,6 @@
|
|||||||
# last prompt line gets hidden if it would overlap with left prompt.
|
# last prompt line gets hidden if it would overlap with left prompt.
|
||||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
||||||
# =========================[ Line #1 ]=========================
|
# =========================[ Line #1 ]=========================
|
||||||
# background_jobs # presence of background jobs
|
|
||||||
# direnv # direnv status (https://direnv.net/)
|
# direnv # direnv status (https://direnv.net/)
|
||||||
# anaconda # conda environment (https://conda.io/)
|
# anaconda # conda environment (https://conda.io/)
|
||||||
# pyenv # python environment (https://github.com/pyenv/pyenv)
|
# pyenv # python environment (https://github.com/pyenv/pyenv)
|
||||||
@ -72,7 +73,6 @@
|
|||||||
# luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
|
# luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
|
||||||
# jenv # java version from jenv (https://github.com/jenv/jenv)
|
# jenv # java version from jenv (https://github.com/jenv/jenv)
|
||||||
# plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
|
# plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
|
||||||
# terraform # terraform workspace (https://www.terraform.io)
|
|
||||||
# aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
|
# aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
|
||||||
# azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
|
# azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
|
||||||
# gcloud # google cloud cli acccount and project (https://cloud.google.com/)
|
# gcloud # google cloud cli acccount and project (https://cloud.google.com/)
|
||||||
@ -231,7 +231,7 @@
|
|||||||
|
|
||||||
##################################[ dir: current directory ]##################################
|
##################################[ dir: current directory ]##################################
|
||||||
# Default current directory color.
|
# Default current directory color.
|
||||||
typeset -g POWERLEVEL9K_DIR_FOREGROUND=31
|
typeset -g POWERLEVEL9K_DIR_FOREGROUND=37
|
||||||
# If directory is too long, shorten some of its segments to the shortest possible unique
|
# 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.
|
# prefix. The shortened directory can be tab-completed to the original.
|
||||||
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
||||||
@ -241,9 +241,9 @@
|
|||||||
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
|
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
|
||||||
# Color of the anchor directory segments. Anchor segments are never shortened. The first
|
# Color of the anchor directory segments. Anchor segments are never shortened. The first
|
||||||
# segment is always an anchor.
|
# segment is always an anchor.
|
||||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39
|
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=37
|
||||||
# Display anchor directory segments in bold.
|
# Display anchor directory segments in bold.
|
||||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
|
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=false
|
||||||
# Don't shorten directories that contain any of these files. They are anchors.
|
# Don't shorten directories that contain any of these files. They are anchors.
|
||||||
local anchor_files=(
|
local anchor_files=(
|
||||||
.bzr
|
.bzr
|
||||||
@ -270,7 +270,7 @@
|
|||||||
# directory will be shortened only when prompt doesn't fit or when other parameters demand it
|
# 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).
|
# (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.
|
# If set to `0`, directory will always be shortened to its minimum length.
|
||||||
typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
|
typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=0
|
||||||
# When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
|
# When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
|
||||||
# many columns for typing commands.
|
# many columns for typing commands.
|
||||||
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
|
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
|
||||||
@ -330,7 +330,7 @@
|
|||||||
|
|
||||||
#####################################[ vcs: git status ]######################################
|
#####################################[ vcs: git status ]######################################
|
||||||
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
|
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
|
||||||
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
|
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 '
|
||||||
POWERLEVEL9K_VCS_BRANCH_ICON=${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}
|
POWERLEVEL9K_VCS_BRANCH_ICON=${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}
|
||||||
|
|
||||||
# Untracked files icon. It's really a question mark, your font isn't broken.
|
# Untracked files icon. It's really a question mark, your font isn't broken.
|
||||||
@ -338,6 +338,9 @@
|
|||||||
typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
|
typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
|
||||||
POWERLEVEL9K_VCS_UNTRACKED_ICON=${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}
|
POWERLEVEL9K_VCS_UNTRACKED_ICON=${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}
|
||||||
|
|
||||||
|
typeset -g POWERLEVEL9K_VCS_STASHED_ICON='≡'
|
||||||
|
POWERLEVEL9K_VCS_STASHED_ICON=${(g::)POWERLEVEL9K_VCS_STASHED_ICON}
|
||||||
|
|
||||||
# Formatter for Git status.
|
# Formatter for Git status.
|
||||||
#
|
#
|
||||||
# Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
|
# Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
|
||||||
@ -358,11 +361,13 @@
|
|||||||
|
|
||||||
if (( $1 )); then
|
if (( $1 )); then
|
||||||
# Styling for up-to-date Git status.
|
# Styling for up-to-date Git status.
|
||||||
local meta='%f' # default foreground
|
local meta='%f'
|
||||||
local clean='%76F' # green foreground
|
local clean='%f'
|
||||||
local modified='%178F' # yellow foreground
|
local staged='%2F'
|
||||||
local untracked='%39F' # blue foreground
|
local stashed='%3F'
|
||||||
local conflicted='%196F' # red foreground
|
local modified='%1F'
|
||||||
|
local untracked='%1F'
|
||||||
|
local conflicted='%196F'
|
||||||
else
|
else
|
||||||
# Styling for incomplete and stale Git status.
|
# Styling for incomplete and stale Git status.
|
||||||
local meta='%244F' # grey foreground
|
local meta='%244F' # grey foreground
|
||||||
@ -400,21 +405,21 @@
|
|||||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
(( 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 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 && !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}${staged}⇡${clean}"
|
||||||
# *42 if have stashes.
|
# *42 if have stashes.
|
||||||
(( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}"
|
(( VCS_STATUS_STASHES )) && res+=" ${clean}${VCS_STATUS_STASHES}${stashed}${POWERLEVEL9K_VCS_STASHED_ICON}${clean}"
|
||||||
# 'merge' if the repo is in an unusual state.
|
# 'merge' if the repo is in an unusual state.
|
||||||
[[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}"
|
[[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}${clean}"
|
||||||
# ~42 if have merge conflicts.
|
# ~42 if have merge conflicts.
|
||||||
(( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}"
|
(( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}${clean}"
|
||||||
# +42 if have staged changes.
|
# +42 if have staged changes.
|
||||||
(( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}"
|
(( VCS_STATUS_NUM_STAGED )) && res+=" ${clean}${VCS_STATUS_NUM_STAGED}${staged}M${clean}"
|
||||||
# !42 if have unstaged changes.
|
# !42 if have unstaged changes.
|
||||||
(( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}"
|
(( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${clean}${VCS_STATUS_NUM_UNSTAGED}${untracked}M${clean}"
|
||||||
# ?42 if have untracked files. It's really a question mark, your font isn't broken.
|
# ?42 if have untracked files. It's really a question mark, your font isn't broken.
|
||||||
# See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.
|
# 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.
|
# Remove the next line if you don't want to see untracked files at all.
|
||||||
(( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}"
|
(( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${VCS_STATUS_NUM_UNTRACKED}${untracked}${POWERLEVEL9K_VCS_UNTRACKED_ICON}${clean}"
|
||||||
|
|
||||||
typeset -g my_git_format=$res
|
typeset -g my_git_format=$res
|
||||||
}
|
}
|
||||||
@ -485,11 +490,11 @@
|
|||||||
|
|
||||||
###################[ command_execution_time: duration of the last command ]###################
|
###################[ command_execution_time: duration of the last command ]###################
|
||||||
# Show duration of the last command if takes longer than this many seconds.
|
# Show duration of the last command if takes longer than this many seconds.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=2
|
||||||
# Show this many fractional digits. Zero means round to seconds.
|
# Show this many fractional digits. Zero means round to seconds.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
||||||
# Execution time color.
|
# Execution time color.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=208
|
||||||
# Duration format: 1d 2h 3m 4s.
|
# Duration format: 1d 2h 3m 4s.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
|
||||||
# Custom icon.
|
# Custom icon.
|
||||||
@ -612,7 +617,7 @@
|
|||||||
|
|
||||||
###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
|
###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
|
||||||
# Python virtual environment color.
|
# Python virtual environment color.
|
||||||
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
|
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=15
|
||||||
# Don't show Python version next to the virtual environment name.
|
# Don't show Python version next to the virtual environment name.
|
||||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
||||||
# Separate environment name from Python version only with a space.
|
# Separate environment name from Python version only with a space.
|
||||||
@ -796,7 +801,7 @@
|
|||||||
# '*prod*' PROD # These values are examples that are unlikely
|
# '*prod*' PROD # These values are examples that are unlikely
|
||||||
# '*test*' TEST # to match your needs. Customize them as needed.
|
# '*test*' TEST # to match your needs. Customize them as needed.
|
||||||
'*' DEFAULT)
|
'*' DEFAULT)
|
||||||
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
|
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=38
|
||||||
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||||
|
|
||||||
# Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
|
# Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
|
||||||
|
Loading…
Reference in New Issue
Block a user