[zsh] simple new prompt
This commit is contained in:
parent
86d0c775be
commit
26b9ced635
3 changed files with 18 additions and 11 deletions
|
@ -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
|
||||
|
|
17
.config/zsh/prompts/simple-two-line.zsh
Normal file
17
.config/zsh/prompts/simple-two-line.zsh
Normal 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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue