dotfiles/root/usr/share/oh-my-zsh/custom/themes/af-magic.zsh-theme

44 lines
1.4 KiB
Plaintext
Raw Normal View History

2021-01-28 23:00:43 +00:00
#!/usr/bin/env zsh
2021-01-28 23:17:44 +00:00
# Inspired by af-magic.zsh-theme
2020-10-22 16:00:38 +00:00
# Repo: https://github.com/andyfleming/oh-my-zsh
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
# settings
typeset +H return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
2021-01-28 23:00:43 +00:00
typeset +H GRAY="$FG[237]"
typeset +H RED="$FG[196]"
2021-01-28 23:17:44 +00:00
typeset +H ORANGE="$FG[214]"
2021-01-28 23:00:43 +00:00
typeset +H BLUE="$FG[032]"
typeset +H PURPLE="$FG[105]"
2021-01-28 23:17:44 +00:00
typeset +H GREEN="$FG[078]"
typeset +H LBLUE="$FG[075]"
2021-01-28 23:00:43 +00:00
# Primary Prompt
[ "$EUID" -eq 0 ] && PS1="$RED%n@%m " || PS1="$GRAY%n@%m " # user@machine (red/gray based on root)
PS1+="$BLUE%~" # cwd
PS1+='$(git_prompt_info)$(hg_prompt_info)' # git,hg
PS1+=" $PURPLE%(!.#.»)%{$reset_color%} " # final symbol
# Next line prompt
PS2="%{$RED%}\ %{$reset_color%}"
# Right side prompt
RPS1="${return_code}"
(( $+functions[virtualenv_prompt_info] )) && RPS1+="$(virtualenv_prompt_info)"
2020-10-22 16:00:38 +00:00
# git settings
2021-01-28 23:17:44 +00:00
ZSH_THEME_GIT_PROMPT_PREFIX="$LBLUE($ORANGE"
2020-10-22 16:00:38 +00:00
ZSH_THEME_GIT_PROMPT_CLEAN=""
2021-01-28 23:17:44 +00:00
ZSH_THEME_GIT_PROMPT_DIRTY="$RED*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="$LBLUE)%{$reset_color%}"
2020-10-22 16:00:38 +00:00
# hg settings
2021-01-28 23:17:44 +00:00
ZSH_THEME_HG_PROMPT_PREFIX="$LBLUE($GREEN"
2020-10-22 16:00:38 +00:00
ZSH_THEME_HG_PROMPT_CLEAN=""
2021-01-28 23:17:44 +00:00
ZSH_THEME_HG_PROMPT_DIRTY="$RED*%{$reset_color%}"
ZSH_THEME_HG_PROMPT_SUFFIX="$LBLUE)%{$reset_color%}"
2020-10-22 16:00:38 +00:00
# virtualenv settings
2021-01-28 23:17:44 +00:00
ZSH_THEME_VIRTUALENV_PREFIX=" $LBLUE\["
2020-10-22 16:00:38 +00:00
ZSH_THEME_VIRTUALENV_SUFFIX="]%{$reset_color%}"