change prompt from agnoster to spaceship

This commit is contained in:
Dmytro Meleshko 2019-01-17 07:58:51 +02:00
parent a0c4f91ed1
commit 699f12bb1d
2 changed files with 35 additions and 12 deletions

View file

@ -8,9 +8,3 @@ configure_dircolors() {
}
configure_dircolors
# This ugly hack is required only for the agnoster theme which I use. I'm
# probably going to switch to another theme because it is so damn slow
autoload -Uz add-zsh-hook
_patch-prompt() { PROMPT="$PROMPT"$'\n%{%B%}\u03bb>%{%b%} '; }
add-zsh-hook precmd _patch-prompt

View file

@ -25,8 +25,42 @@ configure_syntax_highlighting() {
FAST_WORK_DIR="$DOTFILES_PATH/cache"
}
configure_prompt() {
SPACESHIP_PROMPT_ADD_NEWLINE=false
SPACESHIP_PROMPT_ORDER=(
user
host
dir
git
# hg
exec_time
line_sep
# vi_mode
jobs
exit_code
char
)
SPACESHIP_CHAR_SYMBOL="$ "
SPACESHIP_CHAR_SYMBOL_ROOT="# "
SPACESHIP_CHAR_SYMBOL_SECONDARY="> "
SPACESHIP_GIT_STATUS_DELETED="\u2718 "
SPACESHIP_HG_STATUS_DELETED="\u2718 "
SPACESHIP_EXIT_CODE_SYMBOL="\u2718 "
SPACESHIP_JOBS_SYMBOL="\u2726 "
SPACESHIP_USER_SHOW=always
SPACESHIP_DIR_TRUNC=0
SPACESHIP_DIR_TRUNC_REPO=false
SPACESHIP_EXIT_CODE_SHOW=true
}
configure_oh_my_zsh
configure_syntax_highlighting
configure_prompt
source "$DOTFILES_PATH/zgen/zgen.zsh"
@ -40,12 +74,7 @@ if ! zgen saved; then
zgen load zdharma/fast-syntax-highlighting
# official agnoster theme is much faster than one bundled with OMZ and has
# more features
zgen load agnoster/agnoster-zsh-theme agnoster
zgen load denysdovhan/spaceship-prompt spaceship
zgen save
fi
# fix prompt theme
PLUSMINUS="$PLUSMINUS "