Update theme and screenshot

This commit is contained in:
Ivan Bushchik 2022-09-29 18:54:50 +03:00
parent 09dcfa0030
commit 43248c05a4
No known key found for this signature in database
GPG key ID: 3E4E9C7D66E44BF7
2 changed files with 25 additions and 20 deletions

View file

@ -1,25 +1,30 @@
# ivabus zsh prompt theme # ivabus zsh prompt theme
__zsh_prompt() { __zsh_prompt() {
local prompt_username # set basic prompt with "USERNAME@HOSTNAME "
prompt_username="%n" if [[ $UID == 0 || $EUID == 0 ]]; then
local prompt_hostname PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[red]%}%m "
prompt_hostname="%m" else
if [[ $UID == 0 || $EUID == 0 ]]; then PROMPT="%{$fg[green]%}%n%{$reset_color%}@%{$fg[cyan]%}%m "
PROMPT="%{$fg[red]%}${prompt_username}%{$reset_color%}@%{$fg[red]%}${prompt_hostname} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" fi
else # add to current prompt arrow or [exitcode] if non 0
PROMPT="%{$fg[green]%}${prompt_username}%{$reset_color%}@%{$fg[cyan]%}${prompt_hostname} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow PROMPT+='%(?:%{$reset_color%}➜ :%{$fg_bold[red]%}%(?..[%?]) )'
fi # add current working directory
PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} '
PROMPT+='$(git_prompt_info)' # Git status # and git status
if [[ $UID == 0 || $EUID == 0 ]]; then PROMPT+='$(git_prompt_info)'
PROMPT+='%{$fg[red]%}# %{$reset_color%}' # add $ or #
else if [[ $UID == 0 || $EUID == 0 ]]; then
PROMPT+='%{$fg[white]%}$ %{$reset_color%}' PROMPT+='%{$fg[red]%}# %{$reset_color%}'
fi else
unset -f __zsh_prompt PROMPT+='%{$fg[white]%}$ %{$reset_color%}'
fi
unset -f __zsh_prompt
} }
# setup git status
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}(%{$fg_bold[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}(%{$fg_bold[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}✗%{$fg_bold[cyan]%})" ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}✗%{$fg_bold[cyan]%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%})" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%}"
__zsh_prompt __zsh_prompt

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 254 KiB