[zsh] simple new prompt

This commit is contained in:
Afonso Franco 2025-01-03 18:31:40 +00:00
parent 86d0c775be
commit 26b9ced635
Signed by: afonso
SSH key fingerprint: SHA256:PQTRDHPH3yALEGtHXnXBp3Orfcn21pK20t0tS1kHg54
3 changed files with 18 additions and 11 deletions

View file

@ -22,10 +22,7 @@ export READER=mupdf
source $ZDOTDIR/themes/gruvbox_dark.zsh
#Prompt
fpath+=$ZDOTDIR/prompts/pure
autoload -U promptinit; promptinit
export PURE_GIT_PULL=0
prompt pure
source $ZDOTDIR/prompts/simple-two-line.zsh
source $ZDOTDIR/functions.zsh
source $ZDOTDIR/plugins.zsh

View file

@ -0,0 +1,17 @@
autoload -Uz vcs_info
precmd() {
vcs_info
setopt PROMPT_SUBST
if [[ -n "$vcs_info_msg_0_" ]]; then
PROMPT='%F{blue}%~%F{yellow} (${vcs_info_msg_0_})%f'$'\n''%F{magenta} '
else
PROMPT='%F{blue}%~%f'$'\n''%F{magenta} '
fi
print -P ""
}
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git*' formats '%b'
# Simple prompt initialization
autoload -U promptinit; promptinit

View file

@ -75,8 +75,6 @@ ZSH_HIGHLIGHT_STYLES[cursor]='fg=#83a598'
#ZSH Syntax Highlighting
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#928374,italic,underline"
#Pure prompt
# Define gruvbox dark colors
pure_prompt_colors() {
@ -102,11 +100,6 @@ pure_prompt_colors() {
(( $#colors )) || echo $colors
}
# Apply gruvbox dark colors to Zsh Pure prompt
for color in $(pure_prompt_colors); do
zstyle ":prompt:pure:$color" color "$color"
done
# FZF
# # Scheme name: Gruvbox dark, hard
# Scheme system: base16