2019-09-09 12:19:51 +00:00
|
|
|
|
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
|
2019-08-05 18:23:30 +00:00
|
|
|
|
# your own config based on it.
|
2019-07-20 14:56:34 +00:00
|
|
|
|
#
|
|
|
|
|
# Tip: Looking for a nice color? Here's a one-liner to print colormap.
|
2019-07-17 10:22:29 +00:00
|
|
|
|
#
|
2020-03-07 08:13:55 +00:00
|
|
|
|
# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done
|
2019-07-17 10:22:29 +00:00
|
|
|
|
|
2019-09-20 09:22:14 +00:00
|
|
|
|
# Temporarily change options.
|
2019-09-20 12:20:01 +00:00
|
|
|
|
'builtin' 'local' '-a' 'p10k_config_opts'
|
2019-09-20 09:22:14 +00:00
|
|
|
|
[[ ! -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'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
|
|
|
|
() {
|
2020-02-27 13:38:29 +00:00
|
|
|
|
emulate -L zsh -o extended_glob
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2020-03-10 09:09:49 +00:00
|
|
|
|
# Unset all configuration options. This allows you to apply configuration changes without
|
2019-07-28 07:48:38 +00:00
|
|
|
|
# restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.
|
2020-06-03 16:30:40 +00:00
|
|
|
|
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
|
2019-07-28 07:48:38 +00:00
|
|
|
|
|
2020-03-13 09:34:50 +00:00
|
|
|
|
# Zsh >= 5.1 is required.
|
2022-10-02 16:34:25 +00:00
|
|
|
|
[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
|
2019-11-29 10:26:28 +00:00
|
|
|
|
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# The list of segments shown on the left. Fill it with the most important segments.
|
2019-07-17 10:22:29 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
2020-01-15 16:44:46 +00:00
|
|
|
|
# =========================[ Line #1 ]=========================
|
|
|
|
|
# os_icon # os identifier
|
|
|
|
|
dir # current directory
|
|
|
|
|
vcs # git status
|
|
|
|
|
# =========================[ Line #2 ]=========================
|
2020-02-02 05:49:17 +00:00
|
|
|
|
newline # \n
|
2020-01-15 16:44:46 +00:00
|
|
|
|
prompt_char # prompt symbol
|
2019-07-12 13:47:13 +00:00
|
|
|
|
)
|
|
|
|
|
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# The list of segments shown on the right. Fill it with less important segments.
|
|
|
|
|
# Right prompt on the last prompt line (where you are typing your commands) gets
|
|
|
|
|
# automatically hidden when the input line reaches it. Right prompt above the
|
|
|
|
|
# last prompt line gets hidden if it would overlap with left prompt.
|
2019-07-17 10:22:29 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
2020-01-15 16:44:46 +00:00
|
|
|
|
# =========================[ Line #1 ]=========================
|
|
|
|
|
status # exit code of the last command
|
|
|
|
|
command_execution_time # duration of the last command
|
|
|
|
|
background_jobs # presence of background jobs
|
|
|
|
|
direnv # direnv status (https://direnv.net/)
|
2020-02-06 15:49:30 +00:00
|
|
|
|
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
|
|
|
|
anaconda # conda environment (https://conda.io/)
|
|
|
|
|
pyenv # python environment (https://github.com/pyenv/pyenv)
|
|
|
|
|
goenv # go environment (https://github.com/syndbg/goenv)
|
|
|
|
|
nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
|
|
|
|
|
nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
|
|
|
|
|
nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
|
|
|
|
|
# node_version # node.js version
|
|
|
|
|
# go_version # go version (https://golang.org)
|
|
|
|
|
# rust_version # rustc version (https://www.rust-lang.org)
|
|
|
|
|
# dotnet_version # .NET version (https://dotnet.microsoft.com)
|
2020-02-15 12:47:11 +00:00
|
|
|
|
# php_version # php version (https://www.php.net/)
|
2020-02-15 13:49:18 +00:00
|
|
|
|
# laravel_version # laravel php framework version (https://laravel.com/)
|
2020-02-28 10:28:43 +00:00
|
|
|
|
# java_version # java version (https://www.java.com/)
|
2020-03-09 16:38:52 +00:00
|
|
|
|
# package # name@version from package.json (https://docs.npmjs.com/files/package.json)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
|
|
|
|
|
rvm # ruby version from rvm (https://rvm.io)
|
|
|
|
|
fvm # flutter version management (https://github.com/leoafarias/fvm)
|
|
|
|
|
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
|
|
|
|
|
jenv # java version from jenv (https://github.com/jenv/jenv)
|
|
|
|
|
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
|
2022-02-27 02:27:19 +00:00
|
|
|
|
perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
|
2020-02-15 12:38:44 +00:00
|
|
|
|
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
|
2020-09-03 08:53:19 +00:00
|
|
|
|
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
|
2020-02-29 11:10:58 +00:00
|
|
|
|
haskell_stack # haskell version from stack (https://haskellstack.org/)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
kubecontext # current kubernetes context (https://kubernetes.io/)
|
|
|
|
|
terraform # terraform workspace (https://www.terraform.io)
|
2021-07-17 08:27:01 +00:00
|
|
|
|
# terraform_version # terraform version (https://www.terraform.io)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
|
|
|
|
aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
|
|
|
|
|
azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
|
2020-01-31 14:18:39 +00:00
|
|
|
|
gcloud # google cloud cli account and project (https://cloud.google.com/)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
|
2021-09-10 11:21:31 +00:00
|
|
|
|
toolbox # toolbox name (https://github.com/containers/toolbox)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
context # user@hostname
|
|
|
|
|
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
|
|
|
|
ranger # ranger shell (https://github.com/ranger/ranger)
|
2024-02-12 09:26:42 +00:00
|
|
|
|
yazi # yazi shell (https://github.com/sxyazi/yazi)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
nnn # nnn shell (https://github.com/jarun/nnn)
|
2022-12-16 14:25:25 +00:00
|
|
|
|
lf # lf shell (https://github.com/gokcehan/lf)
|
2021-05-15 11:37:58 +00:00
|
|
|
|
xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
vim_shell # vim shell indicator (:sh)
|
|
|
|
|
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
2020-01-30 07:25:24 +00:00
|
|
|
|
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
2023-06-11 07:07:41 +00:00
|
|
|
|
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
# vpn_ip # virtual private network indicator
|
2020-01-25 16:57:02 +00:00
|
|
|
|
# load # CPU load
|
2020-01-18 16:09:15 +00:00
|
|
|
|
# disk_usage # disk usage
|
2020-01-15 16:44:46 +00:00
|
|
|
|
# ram # free RAM
|
2020-01-25 16:57:02 +00:00
|
|
|
|
# swap # used swap
|
2020-01-15 16:44:46 +00:00
|
|
|
|
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
2020-01-26 18:29:06 +00:00
|
|
|
|
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
2020-02-20 15:24:36 +00:00
|
|
|
|
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
2023-07-25 11:25:19 +00:00
|
|
|
|
per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
2022-10-09 09:54:02 +00:00
|
|
|
|
# cpu_arch # CPU architecture
|
2020-01-15 16:44:46 +00:00
|
|
|
|
# time # current time
|
|
|
|
|
# =========================[ Line #2 ]=========================
|
|
|
|
|
newline
|
2020-02-05 16:26:28 +00:00
|
|
|
|
# ip # ip address and bandwidth usage for a specified network interface
|
2020-01-15 16:44:46 +00:00
|
|
|
|
# public_ip # public IP address
|
|
|
|
|
# proxy # system-wide http/https/ftp proxy
|
|
|
|
|
# battery # internal battery
|
2020-02-03 10:47:55 +00:00
|
|
|
|
# wifi # wifi speed
|
2020-01-15 16:44:46 +00:00
|
|
|
|
# example # example user-defined segment (see prompt_example function below)
|
2019-07-12 13:47:13 +00:00
|
|
|
|
)
|
|
|
|
|
|
2020-03-13 09:34:50 +00:00
|
|
|
|
# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
|
|
|
|
|
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
|
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
# Basic style options that define the overall look of your prompt. You probably don't want to
|
|
|
|
|
# change them.
|
2019-07-17 10:22:29 +00:00
|
|
|
|
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
|
|
|
|
|
|
2019-07-21 17:44:20 +00:00
|
|
|
|
# When set to true, icons appear before content on both sides of the prompt. When set
|
2019-07-27 13:09:41 +00:00
|
|
|
|
# to false, icons go after content. If empty or not set, icons go before content in the left
|
|
|
|
|
# prompt and after content in the right prompt.
|
2019-07-21 17:44:20 +00:00
|
|
|
|
#
|
|
|
|
|
# You can also override it for a specific segment:
|
|
|
|
|
#
|
|
|
|
|
# POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false
|
|
|
|
|
#
|
2019-07-27 13:09:41 +00:00
|
|
|
|
# Or for a specific segment in specific state:
|
2019-07-21 17:44:20 +00:00
|
|
|
|
#
|
|
|
|
|
# POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false
|
|
|
|
|
typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true
|
|
|
|
|
|
2019-07-28 16:52:45 +00:00
|
|
|
|
# Add an empty line before each prompt.
|
2019-07-12 22:02:24 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-11-07 13:17:33 +00:00
|
|
|
|
# Connect left prompt lines with these symbols.
|
|
|
|
|
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=
|
|
|
|
|
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=
|
|
|
|
|
typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=
|
|
|
|
|
# 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=
|
|
|
|
|
|
|
|
|
|
# The left end of left prompt.
|
|
|
|
|
typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
|
|
|
|
|
# The right end of right prompt.
|
|
|
|
|
typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=
|
|
|
|
|
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll
|
2019-07-21 08:48:57 +00:00
|
|
|
|
# probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and
|
|
|
|
|
# POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below.
|
2019-07-12 22:02:24 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_SHOW_RULER=false
|
2019-07-21 08:48:57 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·'
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_RULER_FOREGROUND=240
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-07-21 08:48:57 +00:00
|
|
|
|
# Filler between left and right prompt on the first prompt line. You can set it to '·' or '─'
|
|
|
|
|
# to make it easier to see the alignment between left and right prompt and to separate prompt
|
|
|
|
|
# from command output. It serves the same purpose as ruler (see above) without increasing
|
|
|
|
|
# the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false
|
|
|
|
|
# if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact
|
|
|
|
|
# prompt.
|
|
|
|
|
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '
|
|
|
|
|
if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then
|
|
|
|
|
# The color of the filler.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=240
|
2019-07-21 08:48:57 +00:00
|
|
|
|
# Add a space between the end of left prompt and the filler.
|
|
|
|
|
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' '
|
|
|
|
|
# Add a space between the filler and the start of right prompt.
|
|
|
|
|
typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' '
|
|
|
|
|
# Start filler from the edge of the screen if there are no left segments on the first line.
|
|
|
|
|
typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
|
|
|
|
|
# End filler on the edge of the screen if there are no right segments on the first line.
|
|
|
|
|
typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'
|
|
|
|
|
fi
|
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#################################[ os_icon: os identifier ]##################################
|
2019-07-20 15:35:30 +00:00
|
|
|
|
# OS identifier color.
|
2019-08-07 10:44:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=
|
2020-12-18 07:40:26 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
|
2019-07-20 15:35:30 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
################################[ prompt_char: prompt symbol ]################################
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Green prompt symbol if the last command succeeded.
|
2019-11-12 07:05:33 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Red prompt symbol if the last command failed.
|
2019-11-12 07:05:33 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Default prompt symbol.
|
2019-07-17 10:22:29 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Prompt symbol in command vi mode.
|
2019-07-17 10:22:29 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Prompt symbol in visual vi mode.
|
2020-05-23 12:20:37 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'
|
2019-09-18 11:38:31 +00:00
|
|
|
|
# Prompt symbol in overwrite vi mode.
|
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'
|
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
|
2020-01-20 16:45:23 +00:00
|
|
|
|
# No line terminator if prompt_char is the last segment.
|
2019-07-21 08:48:57 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
|
2020-01-20 16:45:23 +00:00
|
|
|
|
# No line introducer if prompt_char is the first segment.
|
|
|
|
|
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
##################################[ dir: current directory ]##################################
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Default current directory color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_DIR_FOREGROUND=31
|
2019-07-18 14:30:00 +00:00
|
|
|
|
# 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.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
|
2019-07-18 15:06:20 +00:00
|
|
|
|
# Color of the anchor directory segments. Anchor segments are never shortened. The first
|
2019-07-18 14:30:00 +00:00
|
|
|
|
# segment is always an anchor.
|
2019-07-18 15:06:20 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39
|
|
|
|
|
# Display anchor directory segments in bold.
|
2019-07-18 14:30:00 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
|
2019-08-28 13:41:59 +00:00
|
|
|
|
# Don't shorten directories that contain any of these files. They are anchors.
|
|
|
|
|
local anchor_files=(
|
|
|
|
|
.bzr
|
|
|
|
|
.citc
|
|
|
|
|
.git
|
|
|
|
|
.hg
|
|
|
|
|
.node-version
|
|
|
|
|
.python-version
|
2020-02-06 15:49:30 +00:00
|
|
|
|
.go-version
|
2019-08-28 13:41:59 +00:00
|
|
|
|
.ruby-version
|
2020-02-06 15:49:30 +00:00
|
|
|
|
.lua-version
|
|
|
|
|
.java-version
|
|
|
|
|
.perl-version
|
2020-02-15 12:38:44 +00:00
|
|
|
|
.php-version
|
2023-08-27 13:42:57 +00:00
|
|
|
|
.tool-versions
|
2024-10-25 08:26:44 +00:00
|
|
|
|
.mise.toml
|
2019-08-28 13:41:59 +00:00
|
|
|
|
.shorten_folder_marker
|
|
|
|
|
.svn
|
|
|
|
|
.terraform
|
|
|
|
|
CVS
|
|
|
|
|
Cargo.toml
|
|
|
|
|
composer.json
|
|
|
|
|
go.mod
|
|
|
|
|
package.json
|
2020-02-29 11:16:28 +00:00
|
|
|
|
stack.yaml
|
2019-08-28 13:41:59 +00:00
|
|
|
|
)
|
|
|
|
|
typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})"
|
2020-04-28 19:14:06 +00:00
|
|
|
|
# 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.
|
2020-07-18 08:43:49 +00:00
|
|
|
|
#
|
|
|
|
|
# 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.
|
2020-02-06 16:18:40 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
|
2019-07-18 14:30:00 +00:00
|
|
|
|
# Don't shorten this many last directory segments. They are anchors.
|
|
|
|
|
typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
|
2019-07-19 11:29:54 +00:00
|
|
|
|
# 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,
|
2019-10-08 07:20:15 +00:00
|
|
|
|
# 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).
|
2019-11-30 16:51:58 +00:00
|
|
|
|
# If set to `0`, directory will always be shortened to its minimum length.
|
2019-07-19 08:09:47 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
|
2019-08-29 10:25:55 +00:00
|
|
|
|
# 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
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# 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
|
|
|
|
|
|
2020-12-14 07:01:00 +00:00
|
|
|
|
# Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
|
|
|
|
|
# and POWERLEVEL9K_DIR_CLASSES below.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
|
2019-07-25 17:02:50 +00:00
|
|
|
|
|
2020-12-14 07:01:00 +00:00
|
|
|
|
# The default icon shown next to non-writable and non-existent directories when
|
|
|
|
|
# POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_LOCK_ICON='⭐'
|
2019-07-29 13:37:58 +00:00
|
|
|
|
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# 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:
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# 1. A pattern against which the current directory ($PWD) is matched. Matching is done with
|
2019-07-25 17:02:50 +00:00
|
|
|
|
# extended_glob option enabled.
|
|
|
|
|
# 2. Directory class for the purpose of styling.
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# 3. An empty string.
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# Triplets are tried in order. The first triplet whose pattern matches $PWD wins.
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#
|
2020-12-14 07:01:00 +00:00
|
|
|
|
# If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories
|
|
|
|
|
# acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# For example, given these settings:
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_CLASSES=(
|
|
|
|
|
# '~/work(|/*)' WORK ''
|
|
|
|
|
# '~(|/*)' HOME ''
|
|
|
|
|
# '*' DEFAULT '')
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#
|
2020-12-14 07:01:00 +00:00
|
|
|
|
# Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one
|
|
|
|
|
# of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or
|
|
|
|
|
# WORK_NON_EXISTENT.
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#
|
2020-09-02 07:24:58 +00:00
|
|
|
|
# Simply assigning classes to directories doesn't have any visible effects. It merely gives you an
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# option to define custom colors and icons for different directory classes.
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# # Styling for WORK.
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-08-19 11:54:42 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103
|
2019-07-25 17:02:50 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39
|
|
|
|
|
#
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# # 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
|
|
|
|
|
#
|
2020-12-14 07:01:00 +00:00
|
|
|
|
# # Styling for WORK_NON_EXISTENT.
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39
|
|
|
|
|
#
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# 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.
|
|
|
|
|
#
|
2019-07-25 17:02:50 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_CLASSES=()
|
|
|
|
|
|
2020-05-02 11:36:40 +00:00
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '
|
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#####################################[ vcs: git status ]######################################
|
2022-06-22 10:06:24 +00:00
|
|
|
|
# Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
|
2019-08-05 18:23:30 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
|
|
|
|
|
|
|
|
|
|
# Untracked files icon. It's really a question mark, your font isn't broken.
|
|
|
|
|
# Change the value of this parameter to show a different icon.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
|
|
|
|
|
|
2019-10-07 10:03:54 +00:00
|
|
|
|
# Formatter for Git status.
|
2019-08-02 07:39:40 +00:00
|
|
|
|
#
|
2021-06-08 09:47:19 +00:00
|
|
|
|
# Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
|
2019-08-02 07:39:40 +00:00
|
|
|
|
#
|
2019-10-07 10:03:54 +00:00
|
|
|
|
# You can edit the function to customize how Git status looks.
|
|
|
|
|
#
|
|
|
|
|
# VCS_STATUS_* parameters are set by gitstatus plugin. See reference:
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.
|
2019-10-07 10:03:54 +00:00
|
|
|
|
function my_git_formatter() {
|
|
|
|
|
emulate -L zsh
|
|
|
|
|
|
|
|
|
|
if [[ -n $P9K_CONTENT ]]; then
|
|
|
|
|
# If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from
|
|
|
|
|
# gitstatus plugin). VCS_STATUS_* parameters are not available in this case.
|
|
|
|
|
typeset -g my_git_format=$P9K_CONTENT
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if (( $1 )); then
|
|
|
|
|
# Styling for up-to-date Git status.
|
|
|
|
|
local meta='%f' # default foreground
|
|
|
|
|
local clean='%76F' # green foreground
|
|
|
|
|
local modified='%178F' # yellow foreground
|
|
|
|
|
local untracked='%39F' # blue foreground
|
|
|
|
|
local conflicted='%196F' # red foreground
|
|
|
|
|
else
|
|
|
|
|
# Styling for incomplete and stale Git status.
|
|
|
|
|
local meta='%244F' # grey foreground
|
|
|
|
|
local clean='%244F' # grey foreground
|
|
|
|
|
local modified='%244F' # grey foreground
|
|
|
|
|
local untracked='%244F' # grey foreground
|
|
|
|
|
local conflicted='%244F' # grey foreground
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
local res
|
2020-12-20 06:54:27 +00:00
|
|
|
|
|
2019-10-07 10:03:54 +00:00
|
|
|
|
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
|
2020-12-20 06:54:27 +00:00
|
|
|
|
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.
|
|
|
|
|
# Tip: To always show local branch name in full without truncation, delete the next line.
|
|
|
|
|
(( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
|
|
|
|
|
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
|
2019-10-07 10:03:54 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2020-12-20 06:54:27 +00:00
|
|
|
|
if [[ -n $VCS_STATUS_TAG
|
|
|
|
|
# Show tag only if not on a branch.
|
|
|
|
|
# Tip: To always show tag, delete the next line.
|
|
|
|
|
&& -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
|
|
|
|
|
]]; 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.
|
|
|
|
|
# Tip: To always show tag name in full without truncation, delete the next line.
|
|
|
|
|
(( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
|
|
|
|
|
res+="${meta}#${clean}${tag//\%/%%}"
|
|
|
|
|
fi
|
2019-10-07 10:03:54 +00:00
|
|
|
|
|
2020-12-20 06:54:27 +00:00
|
|
|
|
# Display the current Git commit if there is no branch and no tag.
|
|
|
|
|
# Tip: To always display the current Git commit, delete the next line.
|
2021-03-09 11:20:28 +00:00
|
|
|
|
[[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
|
2020-12-20 06:54:27 +00:00
|
|
|
|
res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
|
2019-12-09 13:15:57 +00:00
|
|
|
|
|
2019-10-07 10:03:54 +00:00
|
|
|
|
# Show tracking branch name if it differs from local branch.
|
|
|
|
|
if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
|
2020-12-20 06:54:27 +00:00
|
|
|
|
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
|
2019-10-07 10:03:54 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2021-06-08 09:47:19 +00:00
|
|
|
|
# Display "wip" if the latest commit's summary contains "wip" or "WIP".
|
|
|
|
|
if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then
|
|
|
|
|
res+=" ${modified}wip"
|
|
|
|
|
fi
|
|
|
|
|
|
2023-06-26 08:33:21 +00:00
|
|
|
|
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.
|
|
|
|
|
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
|
|
|
|
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
|
|
|
|
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
|
2023-07-12 13:01:32 +00:00
|
|
|
|
# Tip: Uncomment the next line to display '=' if up to date with the remote.
|
|
|
|
|
# res+=" ${clean}="
|
2023-06-26 08:33:21 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2020-02-09 14:43:55 +00:00
|
|
|
|
# ⇠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}"
|
2019-10-07 10:03:54 +00:00
|
|
|
|
# *42 if have stashes.
|
|
|
|
|
(( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}"
|
|
|
|
|
# 'merge' if the repo is in an unusual state.
|
|
|
|
|
[[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}"
|
|
|
|
|
# ~42 if have merge conflicts.
|
|
|
|
|
(( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}"
|
|
|
|
|
# +42 if have staged changes.
|
|
|
|
|
(( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}"
|
|
|
|
|
# !42 if have unstaged changes.
|
|
|
|
|
(( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}"
|
|
|
|
|
# ?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.
|
|
|
|
|
# Remove the next line if you don't want to see untracked files at all.
|
2020-03-13 09:34:50 +00:00
|
|
|
|
(( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}"
|
2020-02-10 17:08:09 +00:00
|
|
|
|
# "─" 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}─"
|
2019-10-07 10:03:54 +00:00
|
|
|
|
|
|
|
|
|
typeset -g my_git_format=$res
|
|
|
|
|
}
|
2019-10-08 11:47:55 +00:00
|
|
|
|
functions -M my_git_formatter 2>/dev/null
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2020-02-10 17:08:09 +00:00
|
|
|
|
# Don't count the number of unstaged, untracked and conflicted files in Git repositories with
|
|
|
|
|
# more than this many files in the index. Negative value means infinity.
|
|
|
|
|
#
|
|
|
|
|
# If you are working in Git repositories with tens of millions of files and seeing performance
|
|
|
|
|
# sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output
|
|
|
|
|
# of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's
|
|
|
|
|
# config: `git config bash.showDirtyState false`.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1
|
|
|
|
|
|
2020-02-11 12:14:04 +00:00
|
|
|
|
# Don't show Git status in prompt for repositories whose workdir matches this pattern.
|
|
|
|
|
# For example, if set to '~', the Git repository at $HOME/.git will be ignored.
|
2020-05-14 10:06:46 +00:00
|
|
|
|
# Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.
|
2020-02-11 12:14:04 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
|
|
|
|
|
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Disable the default Git status formatting.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Install our own Git status formatter.
|
2019-10-07 10:03:54 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Enable counters for staged, unstaged, etc.
|
2019-08-05 20:26:23 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-08-05 18:23:30 +00:00
|
|
|
|
# Icon color.
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76
|
2019-10-07 10:03:54 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244
|
2019-07-29 10:48:18 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-29 13:37:58 +00:00
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_VCS_PREFIX='%fon '
|
2019-07-29 10:48:18 +00:00
|
|
|
|
|
2019-07-17 10:22:29 +00:00
|
|
|
|
# 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
|
2022-06-03 13:19:20 +00:00
|
|
|
|
# isn't in an svn or hg repository.
|
2019-07-17 10:22:29 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
|
|
|
|
|
|
2020-06-21 09:04:23 +00:00
|
|
|
|
# These settings are used for repositories other than Git or when gitstatusd fails and
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Powerlevel10k has to fall back to using vcs_info.
|
2019-08-02 07:39:40 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76
|
2019-08-19 11:54:42 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
##########################[ status: exit code of the last command ]###########################
|
2019-07-26 13:35:46 +00:00
|
|
|
|
# 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
|
2019-07-29 08:13:51 +00:00
|
|
|
|
|
|
|
|
|
# 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.
|
2019-07-12 13:47:13 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_OK=false
|
2019-07-29 08:13:51 +00:00
|
|
|
|
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.
|
2019-07-26 13:35:46 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR=false
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160
|
2019-11-19 09:43:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
|
2019-07-29 08:13:51 +00:00
|
|
|
|
|
|
|
|
|
# Status when the last command was terminated by a signal.
|
2019-07-26 13:35:46 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160
|
2019-07-26 13:35:46 +00:00
|
|
|
|
# Use terse signal names: "INT" instead of "SIGINT(2)".
|
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
|
2019-11-19 09:43:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
|
2019-07-29 08:13:51 +00:00
|
|
|
|
|
|
|
|
|
# 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.
|
2019-07-26 13:35:46 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160
|
2019-11-19 09:43:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
###################[ command_execution_time: duration of the last command ]###################
|
2020-07-11 20:53:38 +00:00
|
|
|
|
# Show duration of the last command if takes at least this many seconds.
|
2019-07-19 23:25:28 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
|
2019-07-15 22:47:34 +00:00
|
|
|
|
# Show this many fractional digits. Zero means round to seconds.
|
|
|
|
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Execution time color.
|
|
|
|
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
|
2019-07-20 10:41:52 +00:00
|
|
|
|
# Duration format: 1d 2h 3m 4s.
|
|
|
|
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-29 13:37:58 +00:00
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook '
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#######################[ background_jobs: presence of background jobs ]#######################
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Don't show the number of background jobs.
|
|
|
|
|
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
|
2019-07-28 16:52:45 +00:00
|
|
|
|
# Background jobs color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70
|
2020-01-26 18:44:59 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-10-27 10:27:03 +00:00
|
|
|
|
#######################[ direnv: direnv status (https://direnv.net/) ]########################
|
|
|
|
|
# Direnv color.
|
|
|
|
|
typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178
|
2020-01-26 18:44:59 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-10-27 10:27:03 +00:00
|
|
|
|
|
2020-02-06 15:49:30 +00:00
|
|
|
|
###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############
|
|
|
|
|
# Default asdf color. Only used to display tools for which there is no color override (see below).
|
2020-06-12 11:00:03 +00:00
|
|
|
|
# Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND.
|
2020-02-06 15:49:30 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66
|
|
|
|
|
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# There are four parameters that can be used to hide asdf tools. Each parameter describes
|
|
|
|
|
# conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at
|
|
|
|
|
# least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to
|
|
|
|
|
# hide a tool, it gets shown.
|
|
|
|
|
#
|
|
|
|
|
# Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and
|
|
|
|
|
# POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:
|
2020-02-07 11:12:38 +00:00
|
|
|
|
#
|
|
|
|
|
# asdf local python 3.8.1
|
|
|
|
|
# asdf global python 3.8.1
|
|
|
|
|
#
|
|
|
|
|
# After running both commands the current python version is 3.8.1 and its source is "local" as
|
|
|
|
|
# it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,
|
|
|
|
|
# it'll hide python version in this case because 3.8.1 is the same as the global version.
|
|
|
|
|
# POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't
|
|
|
|
|
# contain "local".
|
|
|
|
|
|
|
|
|
|
# Hide tool versions that don't come from one of these sources.
|
|
|
|
|
#
|
|
|
|
|
# Available sources:
|
|
|
|
|
#
|
|
|
|
|
# - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable"
|
|
|
|
|
# - local `asdf current` says "set by /some/not/home/directory/file"
|
|
|
|
|
# - global `asdf current` says "set by /home/username/file"
|
|
|
|
|
#
|
|
|
|
|
# Note: If this parameter is set to (shell local global), it won't hide tools.
|
|
|
|
|
# Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global)
|
|
|
|
|
|
|
|
|
|
# If set to false, hide tool versions that are the same as global.
|
|
|
|
|
#
|
|
|
|
|
# Note: The name of this parameter doesn't reflect its meaning at all.
|
|
|
|
|
# Note: If this parameter is set to true, it won't hide tools.
|
|
|
|
|
# Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false
|
|
|
|
|
|
|
|
|
|
# If set to false, hide tool versions that are equal to "system".
|
|
|
|
|
#
|
|
|
|
|
# Note: If this parameter is set to true, it won't hide tools.
|
|
|
|
|
# Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true
|
|
|
|
|
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# If set to non-empty value, hide tools unless there is a file matching the specified file pattern
|
2020-11-22 18:02:27 +00:00
|
|
|
|
# in the current directory, or its parent directory, or its grandparent directory, and so on.
|
2020-02-12 15:26:35 +00:00
|
|
|
|
#
|
|
|
|
|
# Note: If this parameter is set to empty value, it won't hide tools.
|
|
|
|
|
# Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.
|
|
|
|
|
# Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.
|
|
|
|
|
#
|
|
|
|
|
# Example: Hide nodejs version when there is no package.json and no *.js files in the current
|
|
|
|
|
# directory, in `..`, in `../..` and so on.
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=
|
|
|
|
|
|
2020-02-06 15:49:30 +00:00
|
|
|
|
# Ruby version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
|
|
|
|
# Python version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
|
|
|
|
# Go version from asdf.
|
2020-02-27 07:11:58 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
|
|
|
|
# Node.js version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
|
|
|
|
# Rust version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
|
|
|
|
# .NET Core version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
|
|
|
|
# Flutter version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
|
|
|
|
# Lua version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
|
|
|
|
# Java version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
|
|
|
|
# Perl version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-06 15:49:30 +00:00
|
|
|
|
|
2020-02-07 08:16:55 +00:00
|
|
|
|
# Erlang version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-07 08:16:55 +00:00
|
|
|
|
|
|
|
|
|
# Elixir version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-07 08:16:55 +00:00
|
|
|
|
|
|
|
|
|
# Postgres version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2020-02-12 15:26:35 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'
|
2020-02-07 08:16:55 +00:00
|
|
|
|
|
2020-02-15 12:50:28 +00:00
|
|
|
|
# PHP version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'
|
|
|
|
|
|
2020-02-29 11:13:53 +00:00
|
|
|
|
# Haskell version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'
|
|
|
|
|
|
2020-06-12 10:55:02 +00:00
|
|
|
|
# Julia version from asdf.
|
|
|
|
|
typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar'
|
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########
|
2019-07-29 08:13:51 +00:00
|
|
|
|
# NordVPN connection indicator color.
|
|
|
|
|
typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39
|
|
|
|
|
# Hide NordVPN connection indicator when not connected.
|
|
|
|
|
typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=
|
|
|
|
|
typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-25 16:04:52 +00:00
|
|
|
|
|
2019-08-17 08:01:06 +00:00
|
|
|
|
#################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################
|
|
|
|
|
# Ranger shell color.
|
2019-08-19 11:54:42 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
|
2019-08-17 08:01:06 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2024-02-12 09:26:42 +00:00
|
|
|
|
|
2024-02-12 09:45:18 +00:00
|
|
|
|
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
|
2024-02-12 09:26:42 +00:00
|
|
|
|
# Yazi shell color.
|
|
|
|
|
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-12-01 11:14:24 +00:00
|
|
|
|
|
2020-01-02 17:59:19 +00:00
|
|
|
|
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
|
|
|
|
|
# Nnn shell color.
|
|
|
|
|
typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2022-12-16 14:52:19 +00:00
|
|
|
|
######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
|
2022-12-16 14:25:25 +00:00
|
|
|
|
# lf shell color.
|
|
|
|
|
typeset -g POWERLEVEL9K_LF_FOREGROUND=72
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2021-05-15 11:37:58 +00:00
|
|
|
|
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
|
|
|
|
|
# xplr shell color.
|
|
|
|
|
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-12-02 12:29:58 +00:00
|
|
|
|
###########################[ vim_shell: vim shell indicator (:sh) ]###########################
|
|
|
|
|
# Vim shell indicator color.
|
|
|
|
|
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
|
2020-01-26 18:44:59 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-12-02 12:29:58 +00:00
|
|
|
|
|
2019-12-01 11:14:24 +00:00
|
|
|
|
######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
|
|
|
|
|
# Midnight Commander shell color.
|
|
|
|
|
typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178
|
2020-01-26 18:44:59 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-08-17 08:01:06 +00:00
|
|
|
|
|
2020-01-30 07:25:24 +00:00
|
|
|
|
#[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##
|
|
|
|
|
# Nix shell color.
|
|
|
|
|
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
|
|
|
|
|
|
2023-04-12 09:07:32 +00:00
|
|
|
|
# Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
|
|
|
|
|
# typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
|
|
|
|
|
|
2020-01-30 07:25:24 +00:00
|
|
|
|
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
|
|
|
|
|
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
|
|
|
|
|
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2023-06-11 07:07:41 +00:00
|
|
|
|
##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
|
|
|
|
|
# chezmoi shell color.
|
|
|
|
|
typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-03-21 05:58:12 +00:00
|
|
|
|
##################################[ disk_usage: disk usage ]##################################
|
2020-01-18 16:09:15 +00:00
|
|
|
|
# Colors for different levels of disk usage.
|
|
|
|
|
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
|
|
|
|
|
typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220
|
|
|
|
|
typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160
|
|
|
|
|
# Thresholds for different levels of disk usage (percentage points).
|
|
|
|
|
typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
|
|
|
|
|
typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
|
|
|
|
|
# If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.
|
|
|
|
|
typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-08-29 16:36:36 +00:00
|
|
|
|
######################################[ ram: free RAM ]#######################################
|
|
|
|
|
# RAM color.
|
|
|
|
|
typeset -g POWERLEVEL9K_RAM_FOREGROUND=66
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-01-25 16:57:02 +00:00
|
|
|
|
#####################################[ swap: used swap ]######################################
|
|
|
|
|
# Swap color.
|
|
|
|
|
typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-08-29 16:36:36 +00:00
|
|
|
|
######################################[ load: CPU load ]######################################
|
|
|
|
|
# Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.
|
|
|
|
|
typeset -g POWERLEVEL9K_LOAD_WHICH=5
|
|
|
|
|
# Load color when load is under 50%.
|
|
|
|
|
typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66
|
|
|
|
|
# Load color when load is between 50% and 70%.
|
|
|
|
|
typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178
|
|
|
|
|
# Load color when load is over 70%.
|
|
|
|
|
typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-01-03 08:56:58 +00:00
|
|
|
|
################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################
|
|
|
|
|
# Todo color.
|
|
|
|
|
typeset -g POWERLEVEL9K_TODO_FOREGROUND=110
|
|
|
|
|
# Hide todo when the total number of tasks is zero.
|
|
|
|
|
typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true
|
|
|
|
|
# Hide todo when the number of tasks after filtering is zero.
|
|
|
|
|
typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false
|
|
|
|
|
|
|
|
|
|
# Todo format. The following parameters are available within the expansion.
|
|
|
|
|
#
|
|
|
|
|
# - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks.
|
|
|
|
|
# - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering.
|
|
|
|
|
#
|
|
|
|
|
# These variables correspond to the last line of the output of `todo.sh -p ls`:
|
|
|
|
|
#
|
|
|
|
|
# TODO: 24 of 42 tasks shown
|
|
|
|
|
#
|
|
|
|
|
# Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'
|
|
|
|
|
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-01-26 18:29:06 +00:00
|
|
|
|
###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############
|
|
|
|
|
# Timewarrior color.
|
|
|
|
|
typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110
|
2020-01-26 19:26:09 +00:00
|
|
|
|
# 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}:+…}'
|
2020-01-26 18:29:06 +00:00
|
|
|
|
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-02-20 15:24:36 +00:00
|
|
|
|
##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############
|
|
|
|
|
# Taskwarrior color.
|
|
|
|
|
typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74
|
2020-12-20 15:28:52 +00:00
|
|
|
|
|
2020-02-20 15:24:36 +00:00
|
|
|
|
# Taskwarrior segment format. The following parameters are available within the expansion.
|
|
|
|
|
#
|
|
|
|
|
# - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`.
|
|
|
|
|
# - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`.
|
|
|
|
|
#
|
|
|
|
|
# Zero values are represented as empty parameters.
|
|
|
|
|
#
|
|
|
|
|
# The default format:
|
|
|
|
|
#
|
|
|
|
|
# '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT'
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT'
|
|
|
|
|
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2023-07-25 11:25:19 +00:00
|
|
|
|
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
|
|
|
|
|
# Color when using local/global history.
|
|
|
|
|
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
|
|
|
|
|
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
|
|
|
|
|
|
|
|
|
|
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
|
|
|
|
|
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
|
|
|
|
|
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2022-10-09 09:54:02 +00:00
|
|
|
|
################################[ cpu_arch: CPU architecture ]################################
|
|
|
|
|
# CPU architecture color.
|
|
|
|
|
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
|
|
|
|
|
|
|
|
|
|
# Hide the segment when on a specific CPU architecture.
|
|
|
|
|
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=
|
|
|
|
|
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=
|
|
|
|
|
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-09-24 08:40:50 +00:00
|
|
|
|
##################################[ context: user@hostname ]##################################
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Context color when running with privileges.
|
2019-08-19 11:54:42 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
|
2019-11-30 16:34:12 +00:00
|
|
|
|
# Context color in SSH without privileges.
|
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180
|
|
|
|
|
# Default context color (no privileges, no SSH).
|
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180
|
|
|
|
|
|
2019-09-24 08:40:50 +00:00
|
|
|
|
# Context format when running with privileges: bold user@hostname.
|
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'
|
2019-11-30 16:34:12 +00:00
|
|
|
|
# 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'
|
2019-07-29 13:37:58 +00:00
|
|
|
|
|
2019-08-16 07:52:11 +00:00
|
|
|
|
# Don't show context unless running with privileges or in SSH.
|
2019-09-24 08:40:50 +00:00
|
|
|
|
# Tip: Remove the next line to always show context.
|
2019-07-29 08:21:43 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
|
2019-07-29 13:37:58 +00:00
|
|
|
|
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-29 13:37:58 +00:00
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith '
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
|
2019-07-12 13:47:13 +00:00
|
|
|
|
# Python virtual environment color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
|
2019-07-29 14:13:37 +00:00
|
|
|
|
# Don't show Python version next to the virtual environment name.
|
|
|
|
|
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
2020-09-09 10:10:26 +00:00
|
|
|
|
# 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.
|
2020-05-18 05:00:11 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Separate environment name from Python version only with a space.
|
2019-07-12 13:47:13 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#####################[ anaconda: conda environment (https://conda.io/) ]######################
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Anaconda environment color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37
|
2020-05-25 05:31:19 +00:00
|
|
|
|
|
|
|
|
|
# Anaconda segment format. The following parameters are available within the expansion.
|
|
|
|
|
#
|
|
|
|
|
# - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment.
|
|
|
|
|
# - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment.
|
|
|
|
|
# - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below).
|
|
|
|
|
# - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version).
|
|
|
|
|
#
|
|
|
|
|
# CONDA_PROMPT_MODIFIER can be configured with the following command:
|
|
|
|
|
#
|
|
|
|
|
# conda config --set env_prompt '({default_env}) '
|
|
|
|
|
#
|
|
|
|
|
# The last argument is a Python format string that can use the following variables:
|
|
|
|
|
#
|
|
|
|
|
# - prefix The same as CONDA_PREFIX.
|
|
|
|
|
# - default_env The same as CONDA_DEFAULT_ENV.
|
|
|
|
|
# - name The last segment of CONDA_PREFIX.
|
|
|
|
|
# - stacked_env Comma-separated list of names in the environment stack. The first element is
|
|
|
|
|
# always the same as default_env.
|
|
|
|
|
#
|
|
|
|
|
# Note: '({default_env}) ' is the default value of env_prompt.
|
|
|
|
|
#
|
|
|
|
|
# The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER
|
2020-06-09 19:33:10 +00:00
|
|
|
|
# without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former
|
|
|
|
|
# is empty.
|
|
|
|
|
typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}'
|
2020-05-25 05:31:19 +00:00
|
|
|
|
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Pyenv color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37
|
2019-12-12 14:38:56 +00:00
|
|
|
|
# Hide python version if it doesn't come from one of these sources.
|
|
|
|
|
typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)
|
|
|
|
|
# If set to false, hide python version if it's the same as global:
|
|
|
|
|
# $(pyenv version-name) == $(pyenv global).
|
2019-07-12 13:47:13 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
|
2020-03-06 15:48:21 +00:00
|
|
|
|
# If set to false, hide python version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true
|
2020-05-18 05:10:33 +00:00
|
|
|
|
|
|
|
|
|
# Pyenv segment format. The following parameters are available within the expansion.
|
|
|
|
|
#
|
|
|
|
|
# - P9K_CONTENT Current pyenv environment (pyenv version-name).
|
|
|
|
|
# - P9K_PYENV_PYTHON_VERSION Current python version (python --version).
|
|
|
|
|
#
|
|
|
|
|
# The default format has the following logic:
|
|
|
|
|
#
|
2021-05-22 10:09:13 +00:00
|
|
|
|
# 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
|
|
|
|
|
# starts with "$P9K_PYENV_PYTHON_VERSION/".
|
|
|
|
|
# 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
|
|
|
|
|
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
|
2020-05-18 05:10:33 +00:00
|
|
|
|
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
|
2019-12-01 11:47:03 +00:00
|
|
|
|
################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
|
|
|
|
|
# Goenv color.
|
|
|
|
|
typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37
|
2020-01-28 09:00:15 +00:00
|
|
|
|
# Hide go version if it doesn't come from one of these sources.
|
|
|
|
|
typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)
|
|
|
|
|
# If set to false, hide go version if it's the same as global:
|
|
|
|
|
# $(goenv version-name) == $(goenv global).
|
2019-12-01 11:47:03 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false
|
2020-03-06 15:48:21 +00:00
|
|
|
|
# If set to false, hide go version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true
|
2019-12-01 11:47:03 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########
|
2019-07-16 22:36:39 +00:00
|
|
|
|
# Nodenv color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70
|
2020-03-05 15:14:39 +00:00
|
|
|
|
# Hide node version if it doesn't come from one of these sources.
|
|
|
|
|
typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)
|
|
|
|
|
# If set to false, hide node version if it's the same as global:
|
|
|
|
|
# $(nodenv version-name) == $(nodenv global).
|
2019-07-16 22:36:39 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false
|
2020-03-06 15:48:21 +00:00
|
|
|
|
# If set to false, hide node version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-16 22:36:39 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
|
2019-07-16 22:36:39 +00:00
|
|
|
|
# Nvm color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
|
2023-05-07 09:10:08 +00:00
|
|
|
|
# If set to false, hide node version if it's the same as default:
|
|
|
|
|
# $(nvm version current) == $(nvm version default).
|
|
|
|
|
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
|
2023-05-06 07:52:08 +00:00
|
|
|
|
# If set to false, hide node version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-16 22:36:39 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############
|
2019-07-16 22:36:39 +00:00
|
|
|
|
# Nodeenv color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70
|
2019-07-29 14:13:37 +00:00
|
|
|
|
# Don't show Node version next to the environment name.
|
|
|
|
|
typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false
|
|
|
|
|
# Separate environment name from Node version only with a space.
|
|
|
|
|
typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-16 22:36:39 +00:00
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
##############################[ node_version: node.js version ]###############################
|
2019-07-16 22:36:39 +00:00
|
|
|
|
# Node version color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70
|
2019-07-16 22:36:39 +00:00
|
|
|
|
# Show node version only when in a directory tree containing package.json.
|
2019-07-26 14:22:21 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-16 22:36:39 +00:00
|
|
|
|
|
2019-08-12 06:40:55 +00:00
|
|
|
|
#######################[ go_version: go version (https://golang.org) ]########################
|
2019-08-12 06:56:47 +00:00
|
|
|
|
# Go version color.
|
2019-07-30 13:46:11 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37
|
2019-08-12 06:56:47 +00:00
|
|
|
|
# Show go version only when in a go project subdirectory.
|
|
|
|
|
typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
|
2019-07-30 13:20:00 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-08-12 06:40:55 +00:00
|
|
|
|
#################[ rust_version: rustc version (https://www.rust-lang.org) ]##################
|
|
|
|
|
# Rust version color.
|
|
|
|
|
typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37
|
2019-08-12 06:56:47 +00:00
|
|
|
|
# Show rust version only when in a rust project subdirectory.
|
|
|
|
|
typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
|
2019-08-12 06:40:55 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-09-24 08:17:54 +00:00
|
|
|
|
###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################
|
|
|
|
|
# .NET version color.
|
|
|
|
|
typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134
|
|
|
|
|
# Show .NET version only when in a .NET project subdirectory.
|
|
|
|
|
typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-02-15 12:47:11 +00:00
|
|
|
|
#####################[ php_version: php version (https://www.php.net/) ]######################
|
|
|
|
|
# PHP version color.
|
|
|
|
|
typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99
|
|
|
|
|
# Show PHP version only when in a PHP project subdirectory.
|
|
|
|
|
typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-02-15 13:49:18 +00:00
|
|
|
|
##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########
|
|
|
|
|
# Laravel version color.
|
|
|
|
|
typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-02-28 10:28:43 +00:00
|
|
|
|
####################[ java_version: java version (https://www.java.com/) ]####################
|
|
|
|
|
# Java version color.
|
|
|
|
|
typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32
|
|
|
|
|
# Show java version only when in a java project subdirectory.
|
|
|
|
|
typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true
|
|
|
|
|
# Show brief version.
|
|
|
|
|
typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-03-09 16:38:52 +00:00
|
|
|
|
###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####
|
|
|
|
|
# Package color.
|
|
|
|
|
typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117
|
|
|
|
|
# Package format. The following parameters are available within the expansion.
|
|
|
|
|
#
|
|
|
|
|
# - 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//\%/%%}'
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-08-01 21:19:16 +00:00
|
|
|
|
#############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############
|
|
|
|
|
# Rbenv color.
|
|
|
|
|
typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168
|
2019-11-18 10:32:53 +00:00
|
|
|
|
# Hide ruby version if it doesn't come from one of these sources.
|
|
|
|
|
typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)
|
|
|
|
|
# If set to false, hide ruby version if it's the same as global:
|
|
|
|
|
# $(rbenv version-name) == $(rbenv global).
|
2019-08-01 21:19:16 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false
|
2020-03-06 15:48:21 +00:00
|
|
|
|
# If set to false, hide ruby version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true
|
2019-08-01 21:19:16 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-08-10 08:49:04 +00:00
|
|
|
|
#######################[ rvm: ruby version from rvm (https://rvm.io) ]########################
|
|
|
|
|
# Rvm color.
|
|
|
|
|
typeset -g POWERLEVEL9K_RVM_FOREGROUND=168
|
|
|
|
|
# Don't show @gemset at the end.
|
|
|
|
|
typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false
|
|
|
|
|
# Don't show ruby- at the front.
|
|
|
|
|
typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-12-05 16:45:30 +00:00
|
|
|
|
###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############
|
|
|
|
|
# Fvm color.
|
|
|
|
|
typeset -g POWERLEVEL9K_FVM_FOREGROUND=38
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-01-02 16:43:45 +00:00
|
|
|
|
##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########
|
|
|
|
|
# Lua color.
|
|
|
|
|
typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32
|
|
|
|
|
# Hide lua version if it doesn't come from one of these sources.
|
|
|
|
|
typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)
|
|
|
|
|
# If set to false, hide lua version if it's the same as global:
|
|
|
|
|
# $(luaenv version-name) == $(luaenv global).
|
|
|
|
|
typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false
|
2020-03-06 15:48:21 +00:00
|
|
|
|
# If set to false, hide lua version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true
|
2020-01-02 16:43:45 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-01-02 17:03:59 +00:00
|
|
|
|
###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################
|
|
|
|
|
# Java color.
|
|
|
|
|
typeset -g POWERLEVEL9K_JENV_FOREGROUND=32
|
|
|
|
|
# Hide java version if it doesn't come from one of these sources.
|
|
|
|
|
typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)
|
|
|
|
|
# If set to false, hide java version if it's the same as global:
|
|
|
|
|
# $(jenv version-name) == $(jenv global).
|
|
|
|
|
typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false
|
2020-03-06 15:48:21 +00:00
|
|
|
|
# If set to false, hide java version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true
|
2020-01-02 17:03:59 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-01-02 17:24:01 +00:00
|
|
|
|
###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############
|
|
|
|
|
# Perl color.
|
|
|
|
|
typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67
|
|
|
|
|
# Hide perl version if it doesn't come from one of these sources.
|
|
|
|
|
typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)
|
|
|
|
|
# If set to false, hide perl version if it's the same as global:
|
|
|
|
|
# $(plenv version-name) == $(plenv global).
|
|
|
|
|
typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false
|
2020-03-06 15:48:21 +00:00
|
|
|
|
# If set to false, hide perl version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true
|
2020-01-02 17:24:01 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2022-02-27 02:27:19 +00:00
|
|
|
|
###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
|
|
|
|
|
# Perlbrew color.
|
|
|
|
|
typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
|
|
|
|
|
# Show perlbrew version only when in a perl project subdirectory.
|
|
|
|
|
typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
|
2022-02-28 09:30:39 +00:00
|
|
|
|
# Don't show "perl-" at the front.
|
2022-02-27 02:27:19 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-02-15 12:48:01 +00:00
|
|
|
|
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
|
2020-02-15 12:38:44 +00:00
|
|
|
|
# PHP color.
|
|
|
|
|
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
|
|
|
|
|
# Hide php version if it doesn't come from one of these sources.
|
|
|
|
|
typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)
|
|
|
|
|
# If set to false, hide php version if it's the same as global:
|
|
|
|
|
# $(phpenv version-name) == $(phpenv global).
|
|
|
|
|
typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false
|
2020-03-06 15:48:21 +00:00
|
|
|
|
# If set to false, hide php version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true
|
2020-02-15 12:38:44 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-09-03 08:53:19 +00:00
|
|
|
|
#######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######
|
|
|
|
|
# Scala color.
|
|
|
|
|
typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160
|
|
|
|
|
# Hide scala version if it doesn't come from one of these sources.
|
|
|
|
|
typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)
|
|
|
|
|
# If set to false, hide scala version if it's the same as global:
|
|
|
|
|
# $(scalaenv version-name) == $(scalaenv global).
|
|
|
|
|
typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false
|
|
|
|
|
# If set to false, hide scala version if it's equal to "system".
|
|
|
|
|
typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2020-02-29 11:10:58 +00:00
|
|
|
|
##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########
|
|
|
|
|
# Haskell color.
|
|
|
|
|
typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172
|
|
|
|
|
# Hide haskell version if it doesn't come from one of these sources.
|
|
|
|
|
#
|
|
|
|
|
# shell: version is set by STACK_YAML
|
|
|
|
|
# local: version is set by stack.yaml up the directory tree
|
|
|
|
|
# global: version is set by the implicit global project (~/.stack/global-project/stack.yaml)
|
|
|
|
|
typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local)
|
|
|
|
|
# If set to false, hide haskell version if it's the same as in the implicit global project.
|
|
|
|
|
typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
2022-01-08 18:43:25 +00:00
|
|
|
|
# Show kubecontext only when the command you are typing invokes one of these tools.
|
2020-01-13 20:56:49 +00:00
|
|
|
|
# Tip: Remove the next line to always show kubecontext.
|
2023-06-17 08:46:55 +00:00
|
|
|
|
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'
|
2020-01-13 20:56:49 +00:00
|
|
|
|
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# different contexts.
|
2019-07-12 13:47:13 +00:00
|
|
|
|
#
|
2019-07-29 20:02:01 +00:00
|
|
|
|
# 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)
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# 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
|
2019-07-29 20:02:01 +00:00
|
|
|
|
# POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The
|
|
|
|
|
# first match wins.
|
2019-07-12 13:47:13 +00:00
|
|
|
|
#
|
2019-09-07 08:30:37 +00:00
|
|
|
|
# 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
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# 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:
|
|
|
|
|
#
|
2019-08-19 11:54:42 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
2019-07-12 13:47:13 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# '*prod*' PROD # These values are examples that are unlikely
|
|
|
|
|
# '*test*' TEST # to match your needs. Customize them as needed.
|
2019-07-12 13:47:13 +00:00
|
|
|
|
'*' DEFAULT)
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
|
2019-09-09 13:29:31 +00:00
|
|
|
|
# segment. Parameter expansions are very flexible and fast, too. See reference:
|
|
|
|
|
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
|
2019-07-29 20:02:01 +00:00
|
|
|
|
#
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# Within the expansion the following parameters are always available:
|
2019-07-29 20:02:01 +00:00
|
|
|
|
#
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# - 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".
|
2020-01-26 10:45:56 +00:00
|
|
|
|
# - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the
|
|
|
|
|
# output of `kubectl config get-contexts`.
|
2019-07-29 20:02:01 +00:00
|
|
|
|
#
|
2019-09-07 08:30:37 +00:00
|
|
|
|
# If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),
|
|
|
|
|
# the following extra parameters are available:
|
2019-07-29 20:02:01 +00:00
|
|
|
|
#
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# - 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
|
2019-07-29 20:02:01 +00:00
|
|
|
|
#
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01":
|
2019-07-29 20:02:01 +00:00
|
|
|
|
#
|
2019-07-30 07:38:42 +00:00
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_NAME=eks
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
|
|
|
|
|
# - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
|
2019-09-09 13:29:31 +00:00
|
|
|
|
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}'
|
2019-07-12 22:02:24 +00:00
|
|
|
|
|
2019-07-29 13:37:58 +00:00
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '
|
|
|
|
|
|
2019-08-19 14:07:59 +00:00
|
|
|
|
################[ terraform: terraform workspace (https://www.terraform.io) ]#################
|
2020-07-04 06:08:49 +00:00
|
|
|
|
# Don't show terraform workspace if it's literally "default".
|
|
|
|
|
typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false
|
2020-01-31 09:52:34 +00:00
|
|
|
|
# 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
|
2020-07-04 06:08:49 +00:00
|
|
|
|
# '*' OTHER)
|
2020-01-31 09:52:34 +00:00
|
|
|
|
#
|
|
|
|
|
# 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.
|
2020-07-04 06:08:49 +00:00
|
|
|
|
'*' OTHER)
|
|
|
|
|
typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
|
|
|
|
|
# typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-08-19 14:07:59 +00:00
|
|
|
|
|
2021-07-17 08:27:01 +00:00
|
|
|
|
#############[ terraform_version: terraform version (https://www.terraform.io) ]##############
|
|
|
|
|
# Terraform version color.
|
|
|
|
|
typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-09-24 12:30:06 +00:00
|
|
|
|
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
|
2022-01-08 18:43:25 +00:00
|
|
|
|
# Show aws only when the command you are typing invokes one of these tools.
|
2020-01-13 20:56:49 +00:00
|
|
|
|
# Tip: Remove the next line to always show aws.
|
2023-12-16 07:36:29 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt'
|
2020-01-15 16:44:46 +00:00
|
|
|
|
|
2019-11-14 11:40:28 +00:00
|
|
|
|
# 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
|
2020-01-31 09:52:34 +00:00
|
|
|
|
# POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The
|
2019-11-14 11:40:28 +00:00
|
|
|
|
# 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)
|
2020-01-15 16:44:46 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
|
2019-11-14 11:40:28 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-09-24 12:30:06 +00:00
|
|
|
|
|
2021-05-28 12:53:50 +00:00
|
|
|
|
# AWS segment format. The following parameters are available within the expansion.
|
|
|
|
|
#
|
|
|
|
|
# - P9K_AWS_PROFILE The name of the current AWS profile.
|
|
|
|
|
# - P9K_AWS_REGION The region associated with the current AWS profile.
|
|
|
|
|
typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}'
|
|
|
|
|
|
2019-10-08 14:03:39 +00:00
|
|
|
|
#[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
|
|
|
|
|
# AWS Elastic Beanstalk environment color.
|
|
|
|
|
typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-10-08 11:46:39 +00:00
|
|
|
|
##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
|
2022-01-08 18:43:25 +00:00
|
|
|
|
# Show azure only when the command you are typing invokes one of these tools.
|
2020-01-13 20:56:49 +00:00
|
|
|
|
# Tip: Remove the next line to always show azure.
|
2020-08-24 07:02:52 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
|
2023-07-11 08:53:52 +00:00
|
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
|
|
|
|
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
|
|
|
|
|
# you'll see this value in your prompt. The second element of each pair in
|
|
|
|
|
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
|
|
|
|
|
# first match wins.
|
|
|
|
|
#
|
|
|
|
|
# For example, given these settings:
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
|
|
|
|
# '*prod*' PROD
|
|
|
|
|
# '*test*' TEST
|
|
|
|
|
# '*' OTHER)
|
|
|
|
|
#
|
2023-07-11 09:11:21 +00:00
|
|
|
|
# If your current azure account is "company_test", its class is TEST because "company_test"
|
2023-07-11 08:53:52 +00:00
|
|
|
|
# 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_AZURE_TEST_FOREGROUND=28
|
|
|
|
|
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
|
|
|
|
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
|
|
|
|
# '*prod*' PROD # These values are examples that are unlikely
|
|
|
|
|
# '*test*' TEST # to match your needs. Customize them as needed.
|
|
|
|
|
'*' OTHER)
|
|
|
|
|
|
2019-10-08 11:46:39 +00:00
|
|
|
|
# Azure account name color.
|
2023-07-11 08:53:52 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
|
2019-10-08 11:46:39 +00:00
|
|
|
|
# Custom icon.
|
2023-07-11 08:53:52 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-10-08 11:46:39 +00:00
|
|
|
|
|
2020-01-31 14:18:39 +00:00
|
|
|
|
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
|
2022-01-08 18:43:25 +00:00
|
|
|
|
# Show gcloud only when the command you are typing invokes one of these tools.
|
2020-01-13 20:56:49 +00:00
|
|
|
|
# Tip: Remove the next line to always show gcloud.
|
2021-12-26 15:13:24 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
|
2020-01-15 16:44:46 +00:00
|
|
|
|
# Google cloud color.
|
2019-12-05 22:53:30 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
|
|
|
|
|
|
2020-03-21 17:11:44 +00:00
|
|
|
|
# Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or
|
|
|
|
|
# POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative
|
|
|
|
|
# enough. You can use the following parameters in the expansions. Each of them corresponds to the
|
|
|
|
|
# output of `gcloud` tool.
|
|
|
|
|
#
|
|
|
|
|
# Parameter | Source
|
|
|
|
|
# -------------------------|--------------------------------------------------------------------
|
|
|
|
|
# P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)'
|
|
|
|
|
# P9K_GCLOUD_ACCOUNT | gcloud config get-value account
|
|
|
|
|
# P9K_GCLOUD_PROJECT_ID | gcloud config get-value project
|
|
|
|
|
# P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'
|
|
|
|
|
#
|
2020-09-07 20:30:55 +00:00
|
|
|
|
# Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.
|
2020-03-21 17:11:44 +00:00
|
|
|
|
#
|
|
|
|
|
# Obtaining project name requires sending a request to Google servers. This can take a long time
|
|
|
|
|
# and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud
|
|
|
|
|
# prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets
|
|
|
|
|
# set and gcloud prompt segment transitions to state COMPLETE.
|
|
|
|
|
#
|
|
|
|
|
# You can customize the format, icon and colors of gcloud segment separately for states PARTIAL
|
|
|
|
|
# and COMPLETE. You can also hide gcloud in state PARTIAL by setting
|
|
|
|
|
# POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and
|
|
|
|
|
# POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty.
|
|
|
|
|
typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}'
|
|
|
|
|
typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}'
|
|
|
|
|
|
|
|
|
|
# Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name
|
|
|
|
|
# this often. Negative value disables periodic polling. In this mode project name is retrieved
|
|
|
|
|
# only when the current configuration, account or project id changes.
|
|
|
|
|
typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60
|
2019-12-05 22:53:30 +00:00
|
|
|
|
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-12-19 17:46:31 +00:00
|
|
|
|
#[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
|
2022-01-08 18:43:25 +00:00
|
|
|
|
# Show google_app_cred only when the command you are typing invokes one of these tools.
|
2020-01-15 16:40:29 +00:00
|
|
|
|
# Tip: Remove the next line to always show google_app_cred.
|
2020-08-24 07:02:52 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
|
2020-01-15 16:44:46 +00:00
|
|
|
|
|
2020-01-02 16:18:31 +00:00
|
|
|
|
# Google application credentials classes for the purpose of using different colors, icons and
|
|
|
|
|
# expansions with different credentials.
|
|
|
|
|
#
|
|
|
|
|
# POWERLEVEL9K_GOOGLE_APP_CRED_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_GOOGLE_APP_CRED_*CONTENT_EXPANSION
|
|
|
|
|
# parameters, you'll see this value in your prompt. The second element of each pair in
|
|
|
|
|
# POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.
|
|
|
|
|
# The first match wins.
|
|
|
|
|
#
|
|
|
|
|
# For example, given these settings:
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
|
|
|
|
|
# '*:*prod*:*' PROD
|
|
|
|
|
# '*:*test*:*' TEST
|
|
|
|
|
# '*' DEFAULT)
|
|
|
|
|
#
|
|
|
|
|
# If your current Google application credentials is "service_account deathray-testing x@y.com",
|
|
|
|
|
# its class is TEST because it 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_GOOGLE_APP_CRED_TEST_FOREGROUND=28
|
|
|
|
|
# typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'
|
|
|
|
|
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
|
|
|
|
|
# '*:*prod*:*' PROD # These values are examples that are unlikely
|
|
|
|
|
# '*:*test*:*' TEST # to match your needs. Customize them as needed.
|
|
|
|
|
'*' DEFAULT)
|
|
|
|
|
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32
|
|
|
|
|
# typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
|
|
|
|
# Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by
|
|
|
|
|
# google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:
|
|
|
|
|
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
|
|
|
|
|
#
|
|
|
|
|
# You can use the following parameters in the expansion. Each of them corresponds to one of the
|
|
|
|
|
# fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.
|
2019-12-16 17:21:23 +00:00
|
|
|
|
#
|
2019-12-19 17:46:31 +00:00
|
|
|
|
# Parameter | JSON key file field
|
|
|
|
|
# ---------------------------------+---------------
|
|
|
|
|
# P9K_GOOGLE_APP_CRED_TYPE | type
|
|
|
|
|
# P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id
|
|
|
|
|
# P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email
|
2019-12-16 17:21:23 +00:00
|
|
|
|
#
|
2020-09-07 20:30:55 +00:00
|
|
|
|
# Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
|
2020-01-02 16:18:31 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
|
2019-12-16 17:21:23 +00:00
|
|
|
|
|
2021-09-10 11:21:31 +00:00
|
|
|
|
##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
|
|
|
|
|
# Toolbox color.
|
|
|
|
|
typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178
|
|
|
|
|
# Don't display the name of the toolbox if it matches fedora-toolbox-*.
|
|
|
|
|
typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin '
|
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
###############################[ public_ip: public IP address ]###############################
|
2019-07-16 22:55:34 +00:00
|
|
|
|
# Public IP color.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-16 22:55:34 +00:00
|
|
|
|
|
2019-09-19 12:34:29 +00:00
|
|
|
|
########################[ vpn_ip: virtual private network indicator ]#########################
|
|
|
|
|
# VPN IP color.
|
|
|
|
|
typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81
|
|
|
|
|
# When on VPN, show just an icon without the IP address.
|
2020-01-18 15:46:52 +00:00
|
|
|
|
# Tip: To display the private IP address when on VPN, remove the next line.
|
2019-09-19 12:34:29 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
|
2020-02-05 16:26:28 +00:00
|
|
|
|
# Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
|
|
|
|
|
# to see the name of the interface.
|
2023-01-28 11:50:42 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'
|
2020-02-24 13:29:26 +00:00
|
|
|
|
# If set to true, show one segment per matching network interface. If set to false, show only
|
|
|
|
|
# one segment corresponding to the first matching network interface.
|
|
|
|
|
# Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
|
|
|
|
|
typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false
|
2020-01-26 18:44:59 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-09-19 12:34:29 +00:00
|
|
|
|
|
2020-02-05 16:26:28 +00:00
|
|
|
|
###########[ ip: ip address and bandwidth usage for a specified network interface ]###########
|
|
|
|
|
# IP color.
|
|
|
|
|
typeset -g POWERLEVEL9K_IP_FOREGROUND=38
|
|
|
|
|
# The following parameters are accessible within the expansion:
|
|
|
|
|
#
|
|
|
|
|
# Parameter | Meaning
|
2021-05-14 09:41:56 +00:00
|
|
|
|
# ----------------------+-------------------------------------------
|
|
|
|
|
# P9K_IP_IP | IP address
|
|
|
|
|
# P9K_IP_INTERFACE | network interface
|
|
|
|
|
# P9K_IP_RX_BYTES | total number of bytes received
|
|
|
|
|
# P9K_IP_TX_BYTES | total number of bytes sent
|
|
|
|
|
# P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt
|
|
|
|
|
# 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)
|
2020-02-24 11:15:58 +00:00
|
|
|
|
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}'
|
2020-02-05 16:26:28 +00:00
|
|
|
|
# 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.
|
2021-01-15 17:20:46 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
|
2020-02-05 16:26:28 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-08-27 08:57:54 +00:00
|
|
|
|
#########################[ proxy: system-wide http/https/ftp proxy ]##########################
|
|
|
|
|
# Proxy color.
|
|
|
|
|
typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
################################[ battery: internal battery ]#################################
|
2019-07-20 13:40:23 +00:00
|
|
|
|
# Show battery in red when it's below this level and not connected to power supply.
|
|
|
|
|
typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
|
2019-08-19 11:54:42 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
|
2019-09-09 13:15:31 +00:00
|
|
|
|
# Show battery in green when it's charging or fully charged.
|
|
|
|
|
typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70
|
|
|
|
|
# Show battery in yellow when it's discharging.
|
2019-07-29 08:13:51 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
|
2019-07-20 13:40:23 +00:00
|
|
|
|
# Battery pictograms going from low to high level of charge.
|
2019-09-09 13:15:31 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')
|
2019-07-20 13:40:23 +00:00
|
|
|
|
# Don't show the remaining time to charge/discharge.
|
|
|
|
|
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
|
|
|
|
|
2020-02-03 10:47:55 +00:00
|
|
|
|
#####################################[ wifi: wifi speed ]#####################################
|
|
|
|
|
# WiFi color.
|
|
|
|
|
typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68
|
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
|
|
|
|
|
|
# Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).
|
|
|
|
|
#
|
|
|
|
|
# # Wifi colors and icons for different signal strength levels (low to high).
|
|
|
|
|
# typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values
|
|
|
|
|
# typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values
|
|
|
|
|
#
|
|
|
|
|
# typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'
|
|
|
|
|
# typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'
|
|
|
|
|
#
|
|
|
|
|
# The following parameters are accessible within the expansions:
|
|
|
|
|
#
|
|
|
|
|
# Parameter | Meaning
|
|
|
|
|
# ----------------------+---------------
|
|
|
|
|
# P9K_WIFI_SSID | service set identifier, a.k.a. network name
|
2020-09-01 09:01:24 +00:00
|
|
|
|
# P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown
|
2020-02-03 10:47:55 +00:00
|
|
|
|
# P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second
|
|
|
|
|
# P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0
|
|
|
|
|
# P9K_WIFI_NOISE | noise in dBm, from -120 to 0
|
|
|
|
|
# P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
|
|
|
|
|
|
2019-07-25 17:02:50 +00:00
|
|
|
|
####################################[ time: current time ]####################################
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Current time color.
|
2019-07-12 13:47:13 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_TIME_FOREGROUND=66
|
2019-07-12 22:02:24 +00:00
|
|
|
|
# Format for the current time: 09:51:02. See `man 3 strftime`.
|
2019-07-12 13:47:13 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
|
2019-07-17 06:45:11 +00:00
|
|
|
|
# If set to true, time will update when you hit enter. This way prompts for the past
|
|
|
|
|
# commands will contain the start times of their commands as opposed to the default
|
2019-07-17 06:47:58 +00:00
|
|
|
|
# behavior where they contain the end times of their preceding commands.
|
2019-07-17 06:45:11 +00:00
|
|
|
|
typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
|
2019-07-26 14:22:21 +00:00
|
|
|
|
# Custom icon.
|
|
|
|
|
# typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-07-29 13:37:58 +00:00
|
|
|
|
# Custom prefix.
|
|
|
|
|
# typeset -g POWERLEVEL9K_TIME_PREFIX='%fat '
|
2019-07-27 13:09:41 +00:00
|
|
|
|
|
|
|
|
|
# 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
|
2019-07-29 08:13:51 +00:00
|
|
|
|
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.
|
2019-07-27 13:09:41 +00:00
|
|
|
|
#
|
2019-07-31 17:41:14 +00:00
|
|
|
|
# Type `p10k help segment` for documentation and a more sophisticated example.
|
2019-07-27 13:09:41 +00:00
|
|
|
|
function prompt_example() {
|
2019-07-31 17:41:14 +00:00
|
|
|
|
p10k segment -f 208 -i '⭐' -t 'hello, %n'
|
2019-07-27 13:09:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-10-27 09:30:39 +00:00
|
|
|
|
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
|
|
|
|
|
# is to generate the prompt segment for display in instant prompt. See
|
2024-05-07 09:39:44 +00:00
|
|
|
|
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
2019-10-27 09:30:39 +00:00
|
|
|
|
#
|
|
|
|
|
# Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
|
|
|
|
|
# and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
|
|
|
|
|
# will replay these calls without actually calling instant_prompt_*. It is imperative that
|
|
|
|
|
# instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this
|
|
|
|
|
# rule is not observed, the content of instant prompt will be incorrect.
|
|
|
|
|
#
|
|
|
|
|
# Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If
|
|
|
|
|
# instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.
|
|
|
|
|
function instant_prompt_example() {
|
|
|
|
|
# Since prompt_example always makes the same `p10k segment` calls, we can call it from
|
|
|
|
|
# instant_prompt_example. This will give us the same `example` prompt segment in the instant
|
|
|
|
|
# and regular prompts.
|
|
|
|
|
prompt_example
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-27 13:09:41 +00:00
|
|
|
|
# User-defined prompt segments can be customized the same way as built-in segments.
|
2019-10-27 09:30:39 +00:00
|
|
|
|
# typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208
|
|
|
|
|
# typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
2019-10-20 14:40:51 +00:00
|
|
|
|
|
2019-11-06 10:54:14 +00:00
|
|
|
|
# Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
|
|
|
|
|
# when accepting a command line. Supported values:
|
|
|
|
|
#
|
|
|
|
|
# - off: Don't change prompt when accepting a command line.
|
|
|
|
|
# - always: Trim down prompt when accepting a command line.
|
|
|
|
|
# - same-dir: Trim down prompt when accepting a command line unless this is the first command
|
|
|
|
|
# typed after changing current working directory.
|
|
|
|
|
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off
|
|
|
|
|
|
2019-10-26 18:43:38 +00:00
|
|
|
|
# Instant prompt mode.
|
|
|
|
|
#
|
|
|
|
|
# - off: Disable instant prompt. Choose this if you've tried instant prompt and found
|
|
|
|
|
# it incompatible with your zsh configuration files.
|
|
|
|
|
# - quiet: Enable instant prompt and don't print warnings when detecting console output
|
|
|
|
|
# during zsh initialization. Choose this if you've read and understood
|
2024-05-07 09:39:44 +00:00
|
|
|
|
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
2019-10-26 18:43:38 +00:00
|
|
|
|
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
|
|
|
|
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
|
|
|
|
# seen the warning, or if you are unsure what this all means.
|
|
|
|
|
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
2019-11-06 10:54:14 +00:00
|
|
|
|
|
|
|
|
|
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
|
|
|
|
|
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
|
|
|
|
|
# can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
|
|
|
|
|
# really need it.
|
|
|
|
|
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
2019-11-21 08:24:29 +00:00
|
|
|
|
|
|
|
|
|
# If p10k is already loaded, reload configuration.
|
|
|
|
|
# This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
|
|
|
|
(( ! $+functions[p10k] )) || p10k reload
|
2019-07-12 13:47:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-05 05:25:10 +00:00
|
|
|
|
# Tell `p10k configure` which file it should overwrite.
|
|
|
|
|
typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
|
|
|
|
|
|
2019-10-03 12:50:08 +00:00
|
|
|
|
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
|
2019-09-20 09:22:14 +00:00
|
|
|
|
'builtin' 'unset' 'p10k_config_opts'
|