ZSHFiles/p10k.zsh

145 lines
4.4 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

typeset -g POWERLEVEL9K_DISABLE_GITSTATUS=true
source "$EXTERN_PLUGINS/powerlevel10k/powerlevel10k.zsh-theme"
# Prompt elements
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
os_icon
time
load
ram
disk_usage
battery
newline
context
vi_mode
dir
pyenv
virtualenv
go_version
)
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
c_mpv
newline
c_todo
background_jobs
status
command_execution_time
vcs
vim_shell
root_indicator
ssh
)
# General settings
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
typeset -g POWERLEVEL9K_MODE=nerdfont-complete
typeset -g POWERLEVEL9K_ICON_PADDING=none
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
typeset -g POWERLEVEL9K_USE_CACHE=true
# Colors
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3
typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255
typeset -g POWERLEVEL9K_DIR_FOREGROUND=254
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196
typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2
typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=3
typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=1
typeset -g POWERLEVEL9K_VI_MODE_INSERT_BACKGROUND=4
typeset -g POWERLEVEL9K_VCS_{CLEAN,UNTRACKED}_BACKGROUND=2
typeset -g POWERLEVEL9K_VCS_{MODIFIED,CONFLICTED}_BACKGROUND=3
typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8
# Segment settings
## Command time
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
## Context (user@host)
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m'
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
## Directory
local anchor_files=(
.git
APKBUILD
PKGBUILD
Dockerfile
main.yml
)
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})"
typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=true
typeset -g POWERLEVEL9K_DIR_MAX_LENGTH='50%'
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=true
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
## Disk usage
typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
## Prompt character
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION=''
## Separators
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR='\uE0BD'
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0BC'
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0BA'
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2'
typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=
typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=
## Status
typeset -g POWERLEVEL9K_STATUS_OK{,_PIPE}=false
typeset -g POWERLEVEL9K_STATUS_ERROR{,_{SIGNAL,PIPE}}=true
typeset -g POWERLEVEL9K_STATUS_VERBOSE{,_SIGNAME}=true
typeset -g POWERLEVEL9K_STATUS_ERROR_{VISUAL,SIGNAL,PIPE}_IDENTIFIER_EXPANSION=''
## Current time
typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
## Vi mode
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=N
typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=V
typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=O
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=I
## VCS
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 '
typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1
typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
# Load custom prompt segments from here
P10K_CUSTOM_PROMPTS_PATH="$ZDOTDIR/p10k-segments/"
fpath+=("$P10K_CUSTOM_PROMPTS_PATH")
P10K_CUSTOM_PROMPTS=("$P10K_CUSTOM_PROMPTS_PATH"/*)
autoload -Uz ${P10K_CUSTOM_PROMPTS##*${P10K_CUSTOM_PROMPTS##/}/}