aboutsummaryrefslogtreecommitdiff
path: root/modules/zsh/themes
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-06-23 15:56:06 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-06-23 15:56:06 -0400
commit3fc8da8e183b0bd348a0e9944e6a3944f99156a7 (patch)
tree2cc54d97d9f319c25efd62c4aeb9eea41dcd8ee1 /modules/zsh/themes
parentbc7429703e01fe5b0bc06410ebd3c55be54d4163 (diff)
downloadhome-3fc8da8e183b0bd348a0e9944e6a3944f99156a7.tar.gz
modules/zsh: update prompt
Diffstat (limited to 'modules/zsh/themes')
-rw-r--r--modules/zsh/themes/stefan.zsh-theme12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/zsh/themes/stefan.zsh-theme b/modules/zsh/themes/stefan.zsh-theme
index 4f1c643..4e8fa54 100644
--- a/modules/zsh/themes/stefan.zsh-theme
+++ b/modules/zsh/themes/stefan.zsh-theme
@@ -59,6 +59,14 @@ function gitstatus_prompt_update() {
GITSTATUS_PROMPT="%f${p}%f"
}
+function nl() {
+ if [ -z "$_NL_PROMPT" ]; then
+ _NL_PROMPT=1
+ elif [ "$_NL_PROMPT" -eq 1 ]; then
+ echo ""
+ fi
+}
+
INS_MODE='%{%F{reset}%}[%{%F{green}%}i%{%F{reset}%}]'
NORMAL_MODE='%{%F{reset}%}[%{%F{yellow}%}n%{%F{reset}%}]'
VI_MODE=$INS_MODE
@@ -85,13 +93,13 @@ gitstatus_stop 'MY' && gitstatus_start -s -1 -u -1 -c -1 -d -1 'MY'
autoload -Uz add-zsh-hook
add-zsh-hook precmd gitstatus_prompt_update
+add-zsh-hook precmd nl
setopt prompt_subst prompt_percent no_prompt_bang
-NEWLINE=$'\n'
GIT_PROMPT_INFO=${GITSTATUS_PROMPT:+ $GITSTATUS_PROMPT}
# PROMPT='%F{magenta}%~% %f% ${VI_MODE}${NEWLINE}%{%F{yellow}%}λ %b%f% '
-PROMPT='%~%${NEWLINE} λ %b% '
+PROMPT="%~% "$'\n'"%{%F{green}%}❯%{%F{reset}%} %b% "
RPROMPT='$(virtualenv_info)% ${GITSTATUS_PROMPT:+ $GITSTATUS_PROMPT} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"