feat: initial commit of Ela's Arch config. :)
This commit is contained in:
commit
9ed00ff30c
59 changed files with 2769 additions and 0 deletions
49
zsh/.zsh.d/themes/prompt_elatella_setup
Normal file
49
zsh/.zsh.d/themes/prompt_elatella_setup
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# vim: ft=zsh
|
||||
|
||||
function prompt_elatella_precmd {
|
||||
if (( $+functions[git-info] )); then
|
||||
git-info
|
||||
fi
|
||||
}
|
||||
|
||||
function prompt_elatella_setup {
|
||||
setopt LOCAL_OPTIONS
|
||||
unsetopt XTRACE KSH_ARRAYS
|
||||
prompt_opts=(cr percent sp subst)
|
||||
|
||||
# Load required functions
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
# Add hook for calling git-info before each command
|
||||
add-zsh-hook precmd prompt_elatella_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set git-info parameters
|
||||
zstyle ':prezto:module:git:info' verbose 'yes'
|
||||
zstyle ':prezto:module:git:info:branch' format '%b'
|
||||
zstyle ':prezto:module:git:info:position' format '%p'
|
||||
zstyle ':prezto:module:git:info:commit' format '%.7c'
|
||||
zstyle ':prezto:module:git:info:action' format '%F{yellow}[%s]%f'
|
||||
zstyle ':prezto:module:git:info:deleted' format '%F{yellow}●%f'
|
||||
zstyle ':prezto:module:git:info:modified' format '%F{yellow}●%f'
|
||||
zstyle ':prezto:module:git:info:untracked' format '%F{yellow}●%f'
|
||||
zstyle ':prezto:module:git:info:renamed' format '%F{green}●%f'
|
||||
zstyle ':prezto:module:git:info:added' format '%F{green}●%f'
|
||||
zstyle ':prezto:module:git:info:ahead' format '%F{yellow} ⬆%f'
|
||||
zstyle ':prezto:module:git:info:behind' format '%F{yellow} ⬇%f'
|
||||
zstyle ':prezto:module:git:info:stashed' format '%F{yellow} ★%f'
|
||||
zstyle ':prezto:module:git:info:keys' format \
|
||||
'prompt' ' %F{cyan}[$(coalesce "%b" "%p" "%c")%f${(e)git_info[status]}%F{cyan}]%f%s' \
|
||||
'status' '$(coalesce "%a" "%r")$(coalesce "%d" "%m" "%u")%A%B%S' \
|
||||
|
||||
# Define prompts
|
||||
PROMPT='%F{magenta}%c%f${(e)git_info[prompt]} '
|
||||
}
|
||||
|
||||
function prompt_elatella_help {
|
||||
echo 'This prompt is as minimalist as possible and cannot be customized.'
|
||||
}
|
||||
|
||||
prompt_elatella_setup "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue