diff options
| author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2026-04-17 14:52:29 +0300 |
|---|---|---|
| committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2026-04-17 14:52:29 +0300 |
| commit | 7824704b5a4c9e323aee270e5877572694174fda (patch) | |
| tree | 6755926a28deacd910cece2eb9b2136ec9468ce0 /dotfiles/.config | |
| parent | a3c92a546b8088d548059b85073ee84c8a82813a (diff) | |
| download | swayrice-7824704b5a4c9e323aee270e5877572694174fda.tar.gz swayrice-7824704b5a4c9e323aee270e5877572694174fda.zip | |
zsh: update promptniri
Kinda got tired of my old prompt. Wanted to see the user@host on the
left, plus kinda also wanted to have a timestamp.
Diffstat (limited to 'dotfiles/.config')
| -rw-r--r-- | dotfiles/.config/zsh/.zshrc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/dotfiles/.config/zsh/.zshrc b/dotfiles/.config/zsh/.zshrc index 5684477..327c685 100644 --- a/dotfiles/.config/zsh/.zshrc +++ b/dotfiles/.config/zsh/.zshrc @@ -7,12 +7,10 @@ precmd_functions+=( precmd_vcs_info ) setopt prompt_subst if [ "$USER" = "root" ]; then - # Make it so that we display root's user@host on the left and colored red so - # that it is quite clear that we are under root. - PROMPT=$'\n''%{[38;5;14m%}%B%~ ${reset_color}%F{yellow}${vcs_info_msg_0_}%f'$'\n''%F{red}%n%f@%F{red}%m%f %F{green}→%f ' + # Display root's user colored red so that 'tis quite clear when we are root. + PROMPT=$'\n''%F{red}%n@%F{red}%m:%f%B%~ ${reset_color}%F{yellow}${vcs_info_msg_0_}%f'$'\n''%F{green}└%*#%f ' else - PROMPT=$'\n''%{[38;5;14m%}%B%~ ${reset_color}%F{yellow}${vcs_info_msg_0_}%f'$'\n''%F{green}→%f ' - RPROMPT='%{[38;5;14m%} %n%f@%F{red}%m%f' + PROMPT=$'\n''%{[38;5;14m%}%n@%F{red}%m:%f%B%~ ${reset_color}%F{yellow}${vcs_info_msg_0_}%f'$'\n''%F{green}└%*→%f ' fi zstyle ':vcs_info:git:*' formats ' %b' |
