From 47dbf60fed442d2fb4aea470b1d89c1ed017aa2b Mon Sep 17 00:00:00 2001 From: ewancoder Date: Sun, 14 Feb 2016 14:34:04 +0300 Subject: [PATCH] Add *ewancoder* theme: based on *gnzh* and *fino* themes --- themes/ewancoder.zsh-theme | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 themes/ewancoder.zsh-theme diff --git a/themes/ewancoder.zsh-theme b/themes/ewancoder.zsh-theme new file mode 100644 index 000000000..c22ae7fab --- /dev/null +++ b/themes/ewancoder.zsh-theme @@ -0,0 +1,25 @@ +# Ewancoder theme +# Based on fino theme + +function prompt_char { + git branch >/dev/null 2>/dev/null && echo "±" && return + echo '○' +} + +local current_dir='${PWD/#$HOME/~}' +local git_info='$(git_prompt_info)' +local prompt_char='$(prompt_char)' + +if [[ $UID -ne 0 ]]; then + usercolor="040" +else + usercolor="001" +fi + +PROMPT="╭─%{$FG[$usercolor]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$HOST%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%} %{$FG[239]%}${git_info} +╰─${prompt_char}%{$reset_color%} " + +ZSH_THEME_GIT_PROMPT_PREFIX="$FG[239]on $terminfo[bold]$FG[255]" +ZSH_THEME_GIT_PROMPT_SUFFIX="" +ZSH_THEME_GIT_PROMPT_DIRTY="$FG[202] ✘✘✘" +ZSH_THEME_GIT_PROMPT_CLEAN="$FG[040] ✔ $reset_color"