From 394984892483c9d4dcddef98019633d6190bd3d2 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Sat, 27 Jul 2024 22:43:06 +0200 Subject: [PATCH] zsh: visual tweaks to prompt --- config/zsh/prompt.zsh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/config/zsh/prompt.zsh b/config/zsh/prompt.zsh index 56ba210..4b8361b 100644 --- a/config/zsh/prompt.zsh +++ b/config/zsh/prompt.zsh @@ -29,20 +29,19 @@ render_prompt() { "$(render_exec_time)" ) - local separator="${zfg[gray]} ❯ " - echo ${(pj.$separator.)sections:#} - echo -n "${zfg[gray]}" - printf '❯%.0s' {1..$SHLVL} - echo -n "${zfg[rst]} " + local separator=" ${zfg[faded]}❯ " + echo "${(@pj.$separator.)sections:#}${zfg[gray]}" + (($SHLVL > 1)) && printf '󰅂%.0s' {2..$SHLVL} + echo -n "❯ ${zfg[rst]}" } render_exit_code() { ((PROMPT_EXIT_CODE == 0)) && return if ((PROMPT_EXIT_CODE > 128 && PROMPT_EXIT_CODE < 160)); then - print "${fg_white}$(kill -l $PROMPT_EXIT_CODE)" + print "%{%B%}${zfg[white]}$(kill -l $PROMPT_EXIT_CODE)%{%b%}" else - print "${fg_red}✘ $PROMPT_EXIT_CODE" + print "%{%B%}${zfg[red]}✘ $PROMPT_EXIT_CODE%{%b%}" fi }