stuff
This commit is contained in:
parent
95fb76e0ea
commit
933edc60e1
@ -20,6 +20,8 @@ ozsh_load theme powerlevel10k
|
||||
# load plugins
|
||||
ozsh_load plugin zsh-autosuggestions
|
||||
ozsh_load plugin zsh-syntax-highlighting
|
||||
ozsh_load plugin zsh-completions
|
||||
autoload -U compinit && compinit
|
||||
ozsh_load plugin_omz gpg-agent
|
||||
|
||||
# optional settings
|
88
p10k.zsh
88
p10k.zsh
@ -1,8 +1,7 @@
|
||||
# Generated by Powerlevel10k configuration wizard on 2021-02-20 at 22:27 EST.
|
||||
# Generated by Powerlevel10k configuration wizard on 2021-02-21 at 00:35 EST.
|
||||
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 43896.
|
||||
# Wizard options: awesome-fontconfig + powerline, large icons, unicode, lean, 2 lines,
|
||||
# disconnected, left frame, light-ornaments, sparse, few icons, concise,
|
||||
# instant_prompt=verbose.
|
||||
# Wizard options: awesome-fontconfig + powerline, large icons, ascii, lean, 2 lines,
|
||||
# disconnected, sparse, concise, instant_prompt=verbose.
|
||||
# Type `p10k configure` to generate another config.
|
||||
#
|
||||
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
|
||||
@ -37,6 +36,7 @@
|
||||
dir # current directory
|
||||
vcs # git status
|
||||
status
|
||||
command_execution_time
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline # \n
|
||||
prompt_char # prompt symbol
|
||||
@ -49,7 +49,7 @@
|
||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
||||
# =========================[ Line #1 ]=========================
|
||||
# status # exit code of the last command
|
||||
command_execution_time # duration of the last command
|
||||
# command_execution_time # duration of the last command
|
||||
background_jobs # presence of background jobs
|
||||
direnv # direnv status (https://direnv.net/)
|
||||
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
||||
@ -111,10 +111,10 @@
|
||||
)
|
||||
|
||||
# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
|
||||
typeset -g POWERLEVEL9K_MODE=awesome-fontconfig
|
||||
typeset -g POWERLEVEL9K_MODE=ascii
|
||||
# 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=moderate
|
||||
typeset -g POWERLEVEL9K_ICON_PADDING=none
|
||||
|
||||
# Basic style options that define the overall look of your prompt. You probably don't want to
|
||||
# change them.
|
||||
@ -140,16 +140,16 @@
|
||||
typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
|
||||
|
||||
# Connect left prompt lines with these symbols.
|
||||
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─'
|
||||
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─'
|
||||
typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─'
|
||||
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_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=' '
|
||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
|
||||
# The right end of right prompt.
|
||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=
|
||||
|
||||
@ -157,10 +157,10 @@
|
||||
# probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and
|
||||
# POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below.
|
||||
typeset -g POWERLEVEL9K_SHOW_RULER=false
|
||||
typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·'
|
||||
typeset -g POWERLEVEL9K_RULER_CHAR='-' # reasonable alternative: '·'
|
||||
typeset -g POWERLEVEL9K_RULER_FOREGROUND=242
|
||||
|
||||
# Filler between left and right prompt on the first prompt line. You can set it to '·' or '─'
|
||||
# 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
|
||||
@ -192,13 +192,13 @@
|
||||
# Red prompt symbol if the last command failed.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196
|
||||
# Default prompt symbol.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='>'
|
||||
# Prompt symbol in command vi mode.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='<'
|
||||
# Prompt symbol in visual vi mode.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'
|
||||
# Prompt symbol in overwrite vi mode.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='^'
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
|
||||
# No line terminator if prompt_char is the last segment.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
|
||||
@ -349,7 +349,7 @@
|
||||
|
||||
# Formatter for Git status.
|
||||
#
|
||||
# Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
|
||||
# Example output: master <42>42 *42 merge ~42 +42 !42 ?42.
|
||||
#
|
||||
# You can edit the function to customize how Git status looks.
|
||||
#
|
||||
@ -386,9 +386,9 @@
|
||||
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
|
||||
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.
|
||||
# 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
|
||||
(( $#branch > 32 )) && branch[13,-13]=".." # <-- this line
|
||||
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
|
||||
fi
|
||||
|
||||
@ -399,9 +399,9 @@
|
||||
]]; 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.
|
||||
# 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
|
||||
(( $#tag > 32 )) && tag[13,-13]=".." # <-- this line
|
||||
res+="${meta}#${clean}${tag//\%/%%}"
|
||||
fi
|
||||
|
||||
@ -415,16 +415,16 @@
|
||||
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
|
||||
fi
|
||||
|
||||
# ⇣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.
|
||||
# <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}"
|
||||
# ⇠42 if behind the push remote.
|
||||
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}>${VCS_STATUS_COMMITS_AHEAD}"
|
||||
# <-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}"
|
||||
# ->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}"
|
||||
# *42 if have stashes.
|
||||
(( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}"
|
||||
# 'merge' if the repo is in an unusual state.
|
||||
@ -439,12 +439,12 @@
|
||||
# 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.
|
||||
(( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}"
|
||||
# "─" if the number of unstaged files is unknown. This can happen due to
|
||||
# "-" 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}─"
|
||||
(( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}-"
|
||||
|
||||
typeset -g my_git_format=$res
|
||||
}
|
||||
@ -500,32 +500,32 @@
|
||||
# it will signify success by turning green.
|
||||
typeset -g POWERLEVEL9K_STATUS_OK=false
|
||||
typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70
|
||||
typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
|
||||
typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='ok'
|
||||
|
||||
# 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='✔'
|
||||
typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='ok'
|
||||
|
||||
# Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as
|
||||
# it will signify error by turning red.
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR=false
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='err'
|
||||
|
||||
# Status when the last command was terminated by a signal.
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160
|
||||
# Use terse signal names: "INT" instead of "SIGINT(2)".
|
||||
typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION=
|
||||
|
||||
# Status when some part of a pipe command fails and the overall exit status is also non-zero.
|
||||
# It may look like this: 1|0.
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
|
||||
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='err'
|
||||
|
||||
###################[ command_execution_time: duration of the last command ]###################
|
||||
# Show duration of the last command if takes at least this many seconds.
|
||||
@ -802,11 +802,11 @@
|
||||
###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############
|
||||
# Timewarrior color.
|
||||
typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110
|
||||
# If the tracked task is longer than 24 characters, truncate and append "…".
|
||||
# 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}:+…}'
|
||||
typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+..}'
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
@ -866,7 +866,7 @@
|
||||
# Separate environment name from Python version only with a space.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
|
||||
# Custom icon.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='🐍'
|
||||
# typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
#####################[ anaconda: conda environment (https://conda.io/) ]######################
|
||||
# Anaconda environment color.
|
||||
@ -899,7 +899,7 @@
|
||||
typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}'
|
||||
|
||||
# Custom icon.
|
||||
typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='🐍'
|
||||
# typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################
|
||||
# Pyenv color.
|
||||
@ -925,7 +925,7 @@
|
||||
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}'
|
||||
|
||||
# Custom icon.
|
||||
typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='🐍'
|
||||
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
|
||||
# Goenv color.
|
||||
@ -1445,7 +1445,7 @@
|
||||
# P9K_IP_TX_BYTES | total number of bytes sent
|
||||
# P9K_IP_RX_RATE | receive 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}'
|
||||
# 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.
|
||||
typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
|
||||
@ -1467,7 +1467,7 @@
|
||||
# Show battery in yellow when it's discharging.
|
||||
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
|
||||
# Battery pictograms going from low to high level of charge.
|
||||
typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')
|
||||
typeset -g POWERLEVEL9K_BATTERY_STAGES=('battery')
|
||||
# Don't show the remaining time to charge/discharge.
|
||||
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
||||
|
||||
@ -1517,7 +1517,7 @@
|
||||
#
|
||||
# Type `p10k help segment` for documentation and a more sophisticated example.
|
||||
function prompt_example() {
|
||||
p10k segment -f 208 -i '⭐' -t 'hello, %n'
|
||||
p10k segment -f 208 -i '*' -t 'hello, %n'
|
||||
}
|
||||
|
||||
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
|
||||
|
Loading…
Reference in New Issue
Block a user