From d2a57b6f567e88678487781b36d7f3bc743b00fa Mon Sep 17 00:00:00 2001 From: thek4n Date: Wed, 13 Mar 2024 10:08:12 +0300 Subject: [PATCH] zsh: prompt in bottom --- home/user/.config/zsh/prompt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/home/user/.config/zsh/prompt b/home/user/.config/zsh/prompt index 5cb80b5..7dc0b4a 100644 --- a/home/user/.config/zsh/prompt +++ b/home/user/.config/zsh/prompt @@ -104,18 +104,19 @@ configure_prompt() { [ "$EUID" -eq 0 ] && prompt_symbol=💀 [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]] && prompt_symbol='📡' + _bottom_prompt="$(tput cup 999 0)" case "$PROMPT_ALTERNATIVE" in 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}.)' ;; 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= ;; 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= ;; esac @@ -206,4 +207,4 @@ esac -PS2="> " +PS2="> " \ No newline at end of file