zsh: prompt in bottom

This commit is contained in:
thek4n 2024-03-13 10:08:12 +03:00
parent e98eb3afcb
commit d2a57b6f56

View File

@ -104,18 +104,19 @@ configure_prompt() {
[ "$EUID" -eq 0 ] && prompt_symbol=💀 [ "$EUID" -eq 0 ] && prompt_symbol=💀
[[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]] && prompt_symbol='📡' [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]] && prompt_symbol='📡'
_bottom_prompt="$(tput cup 999 0)"
case "$PROMPT_ALTERNATIVE" in case "$PROMPT_ALTERNATIVE" in
twoline) twoline)
PROMPT=$'%F{%(#.blue.green)}┌──${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n$prompt_symbol%M%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}] $(vcs_info_wrapper)%b%F{%(#.blue.green)}\n└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} ' PROMPT=$'%{${_bottom_prompt}%}%F{%(#.blue.green)}┌──${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n$prompt_symbol%M%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}] $(vcs_info_wrapper)%b%F{%(#.blue.green)}\n└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} '
RPROMPT=$'%F{cyan}${formatted_elapsed_time}%F{reset}%(?.. %? %F{red}%B%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)' RPROMPT=$'%F{cyan}${formatted_elapsed_time}%F{reset}%(?.. %? %F{red}%B%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)'
;; ;;
oneline) oneline)
PROMPT=$'${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{%(#.red.blue)}%n@%m%b%F{reset}:%B%F{%(#.blue.green)}%~%b%F{reset}%(#.#.$) ' PROMPT=$'%{${_bottom_prompt}%}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{%(#.red.blue)}%n@%m%b%F{reset}:%B%F{%(#.blue.green)}%~%b%F{reset}%(#.#.$) '
RPROMPT= RPROMPT=
;; ;;
backtrack) backtrack)
PROMPT=$'${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{red}%n@%m%b%F{reset}:%B%F{blue}%~%b%F{reset}%(#.#.$) ' PROMPT=$'%{${_bottom_prompt}%}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{red}%n@%m%b%F{reset}:%B%F{blue}%~%b%F{reset}%(#.#.$) '
RPROMPT= RPROMPT=
;; ;;
esac esac
@ -206,4 +207,4 @@ esac
PS2="> " PS2="> "