.p10k_server.zsh: 根據我的需求客製調整
This commit is contained in:
parent
ffd36e6859
commit
82aa90f70a
123
.p10k_server.zsh
123
.p10k_server.zsh
@ -1,4 +1,4 @@
|
|||||||
# Generated by Powerlevel10k configuration wizard on 2025-05-03 at 19:39 CST.
|
# Generated by Powerlevel10k configuration wizard on 2025-05-03 at 18:03 CST.
|
||||||
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 37983.
|
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 37983.
|
||||||
# Wizard options: nerdfont-v3 + powerline, large icons, unicode, lean, 24h time,
|
# Wizard options: nerdfont-v3 + powerline, large icons, unicode, lean, 24h time,
|
||||||
# 2 lines, solid, full frame, light-ornaments, sparse, many icons, concise,
|
# 2 lines, solid, full frame, light-ornaments, sparse, many icons, concise,
|
||||||
@ -33,8 +33,8 @@
|
|||||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
||||||
# =========================[ Line #1 ]=========================
|
# =========================[ Line #1 ]=========================
|
||||||
os_icon # os identifier
|
os_icon # os identifier
|
||||||
|
context # user@hostname
|
||||||
dir # current directory
|
dir # current directory
|
||||||
vcs # git status
|
|
||||||
# =========================[ Line #2 ]=========================
|
# =========================[ Line #2 ]=========================
|
||||||
newline # \n
|
newline # \n
|
||||||
prompt_char # prompt symbol
|
prompt_char # prompt symbol
|
||||||
@ -50,6 +50,46 @@
|
|||||||
command_execution_time # duration of the last command
|
command_execution_time # duration of the last command
|
||||||
background_jobs # presence of background jobs
|
background_jobs # presence of background jobs
|
||||||
direnv # direnv status (https://direnv.net/)
|
direnv # direnv status (https://direnv.net/)
|
||||||
|
|
||||||
|
haskell_stack # haskell version from stack (https://haskellstack.org/)
|
||||||
|
kubecontext # current kubernetes context (https://kubernetes.io/)
|
||||||
|
terraform # terraform workspace (https://www.terraform.io)
|
||||||
|
# terraform_version # terraform version (https://www.terraform.io)
|
||||||
|
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)
|
||||||
|
gcloud # google cloud cli account and project (https://cloud.google.com/)
|
||||||
|
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
|
||||||
|
toolbox # toolbox name (https://github.com/containers/toolbox)
|
||||||
|
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||||
|
ranger # ranger shell (https://github.com/ranger/ranger)
|
||||||
|
yazi # yazi shell (https://github.com/sxyazi/yazi)
|
||||||
|
nnn # nnn shell (https://github.com/jarun/nnn)
|
||||||
|
lf # lf shell (https://github.com/gokcehan/lf)
|
||||||
|
xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
||||||
|
vim_shell # vim shell indicator (:sh)
|
||||||
|
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||||
|
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
||||||
|
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
||||||
|
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||||
|
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||||
|
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||||
|
per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
||||||
|
# cpu_arch # CPU architecture
|
||||||
|
ip # ip address and bandwidth usage for a specified network interface
|
||||||
|
public_ip # public IP address
|
||||||
|
# vpn_ip # virtual private network indicator
|
||||||
|
# load # CPU load
|
||||||
|
disk_usage # disk usage
|
||||||
|
# ram # free RAM
|
||||||
|
# swap # used swap
|
||||||
|
# proxy # system-wide http/https/ftp proxy
|
||||||
|
# battery # internal battery
|
||||||
|
# wifi # wifi speed
|
||||||
|
time # current time
|
||||||
|
# =========================[ Line #2 ]=========================
|
||||||
|
newline
|
||||||
|
vcs # git status
|
||||||
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
||||||
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
||||||
anaconda # conda environment (https://conda.io/)
|
anaconda # conda environment (https://conda.io/)
|
||||||
@ -75,46 +115,8 @@
|
|||||||
perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
|
perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
|
||||||
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
|
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
|
||||||
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
|
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
|
||||||
haskell_stack # haskell version from stack (https://haskellstack.org/)
|
|
||||||
kubecontext # current kubernetes context (https://kubernetes.io/)
|
|
||||||
terraform # terraform workspace (https://www.terraform.io)
|
|
||||||
# terraform_version # terraform version (https://www.terraform.io)
|
|
||||||
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)
|
|
||||||
gcloud # google cloud cli account and project (https://cloud.google.com/)
|
|
||||||
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
|
|
||||||
toolbox # toolbox name (https://github.com/containers/toolbox)
|
|
||||||
context # user@hostname
|
|
||||||
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
|
||||||
ranger # ranger shell (https://github.com/ranger/ranger)
|
|
||||||
yazi # yazi shell (https://github.com/sxyazi/yazi)
|
|
||||||
nnn # nnn shell (https://github.com/jarun/nnn)
|
|
||||||
lf # lf shell (https://github.com/gokcehan/lf)
|
|
||||||
xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
|
||||||
vim_shell # vim shell indicator (:sh)
|
|
||||||
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
|
||||||
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
|
||||||
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
|
||||||
# vpn_ip # virtual private network indicator
|
|
||||||
# load # CPU load
|
|
||||||
# disk_usage # disk usage
|
|
||||||
# ram # free RAM
|
|
||||||
# swap # used swap
|
|
||||||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
|
||||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
|
||||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
|
||||||
per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
|
||||||
# cpu_arch # CPU architecture
|
|
||||||
time # current time
|
|
||||||
# =========================[ Line #2 ]=========================
|
|
||||||
newline
|
|
||||||
# ip # ip address and bandwidth usage for a specified network interface
|
|
||||||
# public_ip # public IP address
|
|
||||||
# proxy # system-wide http/https/ftp proxy
|
|
||||||
# battery # internal battery
|
|
||||||
# wifi # wifi speed
|
|
||||||
# example # example user-defined segment (see prompt_example function below)
|
# example # example user-defined segment (see prompt_example function below)
|
||||||
|
netspeed
|
||||||
)
|
)
|
||||||
|
|
||||||
# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
|
# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
|
||||||
@ -214,7 +216,8 @@
|
|||||||
|
|
||||||
##################################[ dir: current directory ]##################################
|
##################################[ dir: current directory ]##################################
|
||||||
# Default current directory color.
|
# Default current directory color.
|
||||||
typeset -g POWERLEVEL9K_DIR_FOREGROUND=31
|
# 調整過
|
||||||
|
typeset -g POWERLEVEL9K_DIR_FOREGROUND=117
|
||||||
# If directory is too long, shorten some of its segments to the shortest possible unique
|
# If directory is too long, shorten some of its segments to the shortest possible unique
|
||||||
# prefix. The shortened directory can be tab-completed to the original.
|
# prefix. The shortened directory can be tab-completed to the original.
|
||||||
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
||||||
@ -224,7 +227,8 @@
|
|||||||
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
|
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
|
||||||
# Color of the anchor directory segments. Anchor segments are never shortened. The first
|
# Color of the anchor directory segments. Anchor segments are never shortened. The first
|
||||||
# segment is always an anchor.
|
# segment is always an anchor.
|
||||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39
|
# 調整過
|
||||||
|
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=117
|
||||||
# Display anchor directory segments in bold.
|
# Display anchor directory segments in bold.
|
||||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
|
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
|
||||||
# Don't shorten directories that contain any of these files. They are anchors.
|
# Don't shorten directories that contain any of these files. They are anchors.
|
||||||
@ -266,7 +270,7 @@
|
|||||||
# respectively.
|
# respectively.
|
||||||
typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
|
typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
|
||||||
# Don't shorten this many last directory segments. They are anchors.
|
# Don't shorten this many last directory segments. They are anchors.
|
||||||
typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
|
typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=100
|
||||||
# Shorten directory if it's longer than this even if there is space for it. The value can
|
# 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,
|
# be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,
|
||||||
# directory will be shortened only when prompt doesn't fit or when other parameters demand it
|
# directory will be shortened only when prompt doesn't fit or when other parameters demand it
|
||||||
@ -497,7 +501,7 @@
|
|||||||
# Custom icon.
|
# Custom icon.
|
||||||
# typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
# typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||||
# Custom prefix.
|
# Custom prefix.
|
||||||
# typeset -g POWERLEVEL9K_VCS_PREFIX='%fon '
|
typeset -g POWERLEVEL9K_VCS_PREFIX='%fon '
|
||||||
|
|
||||||
# Show status of repositories of these types. You can add svn and/or hg if you are
|
# 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
|
# using them. If you do, your prompt may become slow even when your current directory
|
||||||
@ -506,6 +510,7 @@
|
|||||||
|
|
||||||
# These settings are used for repositories other than Git or when gitstatusd fails and
|
# These settings are used for repositories other than Git or when gitstatusd fails and
|
||||||
# Powerlevel10k has to fall back to using vcs_info.
|
# Powerlevel10k has to fall back to using vcs_info.
|
||||||
|
# 調整過
|
||||||
typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76
|
typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76
|
||||||
typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76
|
typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76
|
||||||
typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178
|
typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178
|
||||||
@ -558,7 +563,7 @@
|
|||||||
# Custom icon.
|
# Custom icon.
|
||||||
# typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
# typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||||
# Custom prefix.
|
# Custom prefix.
|
||||||
# typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook '
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook '
|
||||||
|
|
||||||
#######################[ background_jobs: presence of background jobs ]#######################
|
#######################[ background_jobs: presence of background jobs ]#######################
|
||||||
# Don't show the number of background jobs.
|
# Don't show the number of background jobs.
|
||||||
@ -918,11 +923,13 @@
|
|||||||
|
|
||||||
# Don't show context unless running with privileges or in SSH.
|
# Don't show context unless running with privileges or in SSH.
|
||||||
# Tip: Remove the next line to always show context.
|
# Tip: Remove the next line to always show context.
|
||||||
typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
|
# 有調整
|
||||||
|
# typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
|
||||||
|
|
||||||
# Custom icon.
|
# Custom icon.
|
||||||
# typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
# typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||||
# Custom prefix.
|
# Custom prefix.
|
||||||
|
# 有調整
|
||||||
# typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith '
|
# typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith '
|
||||||
|
|
||||||
###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
|
###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
|
||||||
@ -1570,7 +1577,9 @@
|
|||||||
|
|
||||||
###########[ ip: ip address and bandwidth usage for a specified network interface ]###########
|
###########[ ip: ip address and bandwidth usage for a specified network interface ]###########
|
||||||
# IP color.
|
# IP color.
|
||||||
typeset -g POWERLEVEL9K_IP_FOREGROUND=38
|
# 調整過
|
||||||
|
# typeset -g POWERLEVEL9K_IP_FOREGROUND=38
|
||||||
|
typeset -g POWERLEVEL9K_IP_FOREGROUND=146
|
||||||
# The following parameters are accessible within the expansion:
|
# The following parameters are accessible within the expansion:
|
||||||
#
|
#
|
||||||
# Parameter | Meaning
|
# Parameter | Meaning
|
||||||
@ -1583,7 +1592,9 @@
|
|||||||
# P9K_IP_TX_BYTES_DELTA | number of bytes sent 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_RX_RATE | receive rate (since last prompt)
|
||||||
# P9K_IP_TX_RATE | send rate (since last prompt)
|
# P9K_IP_TX_RATE | send rate (since last prompt)
|
||||||
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}'
|
# 調整過
|
||||||
|
# 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}'
|
||||||
|
typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP$'
|
||||||
# Show information for the first network interface whose name matches this regular expression.
|
# 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.
|
# Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
|
||||||
typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
|
typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
|
||||||
@ -1657,6 +1668,20 @@
|
|||||||
function prompt_example() {
|
function prompt_example() {
|
||||||
p10k segment -f 208 -i '⭐' -t 'hello, %n'
|
p10k segment -f 208 -i '⭐' -t 'hello, %n'
|
||||||
}
|
}
|
||||||
|
# 調整過
|
||||||
|
typeset -g POWERLEVEL9K_NETSPEED_FOREGROUND=250
|
||||||
|
typeset -g POWERLEVEL9K_NETSPEED_ICON='⇄'
|
||||||
|
typeset -g POWERLEVEL9K_NETSPEED_VISUAL_IDENTIFIER_EXPANSION='⇄'
|
||||||
|
function prompt_netspeed() {
|
||||||
|
# typeset -g POWERLEVEL9K_NETSPEED_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}'
|
||||||
|
# p10k segment -f 208 -i '⭐' -t '${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}'
|
||||||
|
if [[ -n $P9K_IP_RX_RATE || -n $P9K_IP_TX_RATE ]]; then
|
||||||
|
local rx tx
|
||||||
|
[[ -n $P9K_IP_RX_RATE ]] && rx="%70F⇣$P9K_IP_RX_RATE"
|
||||||
|
[[ -n $P9K_IP_TX_RATE ]] && tx="%215F⇡$P9K_IP_TX_RATE"
|
||||||
|
p10k segment -f 250 -i '⇄' -t "$rx $tx"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
|
# 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
|
# is to generate the prompt segment for display in instant prompt. See
|
||||||
|
Loading…
x
Reference in New Issue
Block a user