blinks.zsh-theme 979 Bytes
Newer Older
Adam Blinkinsop's avatar
Adam Blinkinsop committed
1
2
3
4
5
6
7
8
9
10
# https://github.com/blinks zsh theme

function _prompt_char() {
  if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
    echo "%{%F{blue}%}±%{%f%k%b%}"
  else
    echo ' '
  fi
}

11
12
13
14
15
16
17
18
19
20
# This theme works with both the "dark" and "light" variants of the
# Solarized color schema.  Set the SOLARIZED_THEME variable to one of
# these two values to choose.  If you don't specify, we'll assume you're
# using the "dark" variant.

case ${SOLARIZED_THEME:-dark} in
    light) bkg=white;;
    *)     bkg=black;;
esac

Adam Blinkinsop's avatar
Adam Blinkinsop committed
21
ZSH_THEME_GIT_PROMPT_PREFIX=" [%{%B%F{blue}%}"
22
ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{${bkg}}%B%F{green}%}]"
Adam Blinkinsop's avatar
Adam Blinkinsop committed
23
24
25
26
ZSH_THEME_GIT_PROMPT_DIRTY=" %{%F{red}%}*%{%f%k%b%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""

PROMPT='%{%f%k%b%}
27
28
%{%K{${bkg}}%B%F{green}%}%n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{${bkg}}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%}
%{%K{${bkg}}%}$(_prompt_char)%{%K{${bkg}}%} %#%{%f%k%b%} '
Adam Blinkinsop's avatar
Adam Blinkinsop committed
29
30

RPROMPT='!%{%B%F{cyan}%}%!%{%f%k%b%}'