mirror of
https://github.com/ivabus/ivabus-zsh-theme
synced 2024-12-04 22:15:06 +03:00
Update theme and screenshot
This commit is contained in:
parent
09dcfa0030
commit
43248c05a4
2 changed files with 25 additions and 20 deletions
|
@ -1,16 +1,18 @@
|
|||
# ivabus zsh prompt theme
|
||||
__zsh_prompt() {
|
||||
local prompt_username
|
||||
prompt_username="%n"
|
||||
local prompt_hostname
|
||||
prompt_hostname="%m"
|
||||
# set basic prompt with "USERNAME@HOSTNAME "
|
||||
if [[ $UID == 0 || $EUID == 0 ]]; then
|
||||
PROMPT="%{$fg[red]%}${prompt_username}%{$reset_color%}@%{$fg[red]%}${prompt_hostname} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )"
|
||||
PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[red]%}%m "
|
||||
else
|
||||
PROMPT="%{$fg[green]%}${prompt_username}%{$reset_color%}@%{$fg[cyan]%}${prompt_hostname} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow
|
||||
PROMPT="%{$fg[green]%}%n%{$reset_color%}@%{$fg[cyan]%}%m "
|
||||
fi
|
||||
PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd
|
||||
PROMPT+='$(git_prompt_info)' # Git status
|
||||
# add to current prompt arrow or [exitcode] if non 0
|
||||
PROMPT+='%(?:%{$reset_color%}➜ :%{$fg_bold[red]%}%(?..[%?]) )'
|
||||
# add current working directory
|
||||
PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} '
|
||||
# and git status
|
||||
PROMPT+='$(git_prompt_info)'
|
||||
# add $ or #
|
||||
if [[ $UID == 0 || $EUID == 0 ]]; then
|
||||
PROMPT+='%{$fg[red]%}# %{$reset_color%}'
|
||||
else
|
||||
|
@ -18,8 +20,11 @@ __zsh_prompt() {
|
|||
fi
|
||||
unset -f __zsh_prompt
|
||||
}
|
||||
|
||||
# setup git status
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}(%{$fg_bold[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}✗%{$fg_bold[cyan]%})"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%})"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}✗%{$fg_bold[cyan]%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%}"
|
||||
__zsh_prompt
|
||||
|
||||
|
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 254 KiB |
Loading…
Reference in a new issue