|
|
@ -1,19 +1,12 @@
|
|
|
|
# Config for Powerlevel10k with classic powerline prompt style. Requires a powerline font.
|
|
|
|
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate
|
|
|
|
# The color scheme is suitable for dark terminal background.
|
|
|
|
# your own config based on it.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Once you've installed Powerlevel10k, run these commands to apply classic style.
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# curl -fsSL -o ~/p10k-classic.zsh https://raw.githubusercontent.com/romkatv/powerlevel10k/master/config/p10k-classic.zsh
|
|
|
|
|
|
|
|
# echo 'source ~/p10k-classic.zsh' >>! ~/.zshrc
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# To customize your prompt, open ~/p10k-classic.zsh in your favorite text editor, change it and
|
|
|
|
|
|
|
|
# restart ZSH. The file is well-documented.
|
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Tip: Looking for a nice color? Here's a one-liner to print colormap.
|
|
|
|
# Tip: Looking for a nice color? Here's a one-liner to print colormap.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# for i in {0..255}; do print -Pn "%${i}F${(l:3::0:)i}%f " ${${(M)$((i%8)):#7}:+$'\n'}; done
|
|
|
|
# for i in {0..255}; do print -Pn "%${i}F${(l:3::0:)i}%f " ${${(M)$((i%8)):#7}:+$'\n'}; done
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -o 'aliases' ]]; then
|
|
|
|
if [[ -o 'aliases' ]]; then
|
|
|
|
|
|
|
|
# Temporarily disable aliases.
|
|
|
|
'builtin' 'unsetopt' 'aliases'
|
|
|
|
'builtin' 'unsetopt' 'aliases'
|
|
|
|
local p9k_classic_restore_aliases=1
|
|
|
|
local p9k_classic_restore_aliases=1
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -23,6 +16,7 @@ fi
|
|
|
|
() {
|
|
|
|
() {
|
|
|
|
emulate -L zsh
|
|
|
|
emulate -L zsh
|
|
|
|
setopt no_unset
|
|
|
|
setopt no_unset
|
|
|
|
|
|
|
|
local LC_ALL=C.UTF-8
|
|
|
|
|
|
|
|
|
|
|
|
# Unset all configuration options. This allows you to apply configiguration changes without
|
|
|
|
# Unset all configuration options. This allows you to apply configiguration changes without
|
|
|
|
# restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.
|
|
|
|
# restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.
|
|
|
@ -277,6 +271,13 @@ fi
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_CLASSES=()
|
|
|
|
# typeset -g POWERLEVEL9K_DIR_CLASSES=()
|
|
|
|
|
|
|
|
|
|
|
|
#####################################[ vcs: git status ]######################################
|
|
|
|
#####################################[ vcs: git status ]######################################
|
|
|
|
|
|
|
|
# Branch icon. Set this parameter to '\uF126' for the popular Powerline branch icon.
|
|
|
|
|
|
|
|
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='?'
|
|
|
|
|
|
|
|
|
|
|
|
# Git status: feature:master#tag ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
|
|
|
|
# Git status: feature:master#tag ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# You can edit the lines below to customize how Git status looks.
|
|
|
|
# You can edit the lines below to customize how Git status looks.
|
|
|
@ -285,7 +286,7 @@ fi
|
|
|
|
# https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.
|
|
|
|
# https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.
|
|
|
|
local vcs=''
|
|
|
|
local vcs=''
|
|
|
|
# 'feature' or '@72f5c8a' if not on a branch.
|
|
|
|
# 'feature' or '@72f5c8a' if not on a branch.
|
|
|
|
vcs+='${${VCS_STATUS_LOCAL_BRANCH:+%76F${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${VCS_STATUS_LOCAL_BRANCH//\%/%%}}'
|
|
|
|
vcs+='${${VCS_STATUS_LOCAL_BRANCH:+%76F'${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}'${VCS_STATUS_LOCAL_BRANCH//\%/%%}}'
|
|
|
|
vcs+=':-%f@%76F${VCS_STATUS_COMMIT[1,8]}}'
|
|
|
|
vcs+=':-%f@%76F${VCS_STATUS_COMMIT[1,8]}}'
|
|
|
|
# ':master' if the tracking branch name differs from local branch.
|
|
|
|
# ':master' if the tracking branch name differs from local branch.
|
|
|
|
vcs+='${${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH}:+%f:%76F${VCS_STATUS_REMOTE_BRANCH//\%/%%}}'
|
|
|
|
vcs+='${${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH}:+%f:%76F${VCS_STATUS_REMOTE_BRANCH//\%/%%}}'
|
|
|
@ -309,17 +310,10 @@ fi
|
|
|
|
# ?42 if have untracked files. It's really a question mark, your font isn't broken.
|
|
|
|
# ?42 if have untracked files. It's really a question mark, your font isn't broken.
|
|
|
|
# See POWERLEVEL9K_VCS_UNTRACKED_ICON below if you want to use a different icon.
|
|
|
|
# See POWERLEVEL9K_VCS_UNTRACKED_ICON below if you want to use a different icon.
|
|
|
|
# Remove the next line if you don't want to see untracked files at all.
|
|
|
|
# Remove the next line if you don't want to see untracked files at all.
|
|
|
|
vcs+='${${VCS_STATUS_NUM_UNTRACKED:#0}:+ %39F${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}}'
|
|
|
|
vcs+='${${VCS_STATUS_NUM_UNTRACKED:#0}:+ %39F'${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}'${VCS_STATUS_NUM_UNTRACKED}}'
|
|
|
|
# If P9K_CONTENT is not empty, leave it unchanged. It's either "loading" or from vcs_info.
|
|
|
|
# If P9K_CONTENT is not empty, leave it unchanged. It's either "loading" or from vcs_info.
|
|
|
|
vcs="\${P9K_CONTENT:-$vcs}"
|
|
|
|
vcs="\${P9K_CONTENT:-$vcs}"
|
|
|
|
|
|
|
|
|
|
|
|
# Branch icon. Set this parameter to $'\uF126' for the popular Powerline branch icon.
|
|
|
|
|
|
|
|
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='?'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Disable the default Git status formatting.
|
|
|
|
# Disable the default Git status formatting.
|
|
|
|
typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
|
|
|
|
typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
|
|
|
|
# Install our own Git status formatter.
|
|
|
|
# Install our own Git status formatter.
|
|
|
@ -330,6 +324,8 @@ fi
|
|
|
|
# Enable counters for staged, unstaged, etc.
|
|
|
|
# Enable counters for staged, unstaged, etc.
|
|
|
|
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
|
|
|
|
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Icon color.
|
|
|
|
|
|
|
|
typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76
|
|
|
|
# Custom icon.
|
|
|
|
# Custom icon.
|
|
|
|
# typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
# typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
|
|
# Custom prefix.
|
|
|
|
# Custom prefix.
|
|
|
|