Skip to content

Instantly share code, notes, and snippets.

@jsnanigans
Last active December 5, 2019 14:17
Show Gist options
  • Select an option

  • Save jsnanigans/16abbfd9931e2db06d0e4fb7d8fb8304 to your computer and use it in GitHub Desktop.

Select an option

Save jsnanigans/16abbfd9931e2db06d0e4fb7d8fb8304 to your computer and use it in GitHub Desktop.

Revisions

  1. Brendan Mullins revised this gist Dec 5, 2019. No changes.
  2. Brendan Mullins created this gist Dec 5, 2019.
    43 changes: 43 additions & 0 deletions blinks2.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    # 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
    }

    # 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

    # Default values for the appearance of the prompt.
    # ZSH_THEME_GIT_PROMPT_PREFIX="("
    # ZSH_THEME_GIT_PROMPT_SUFFIX=")"
    ZSH_THEME_GIT_PROMPT_SEPARATOR="|"
    ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}"
    ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[red]%}%{●%G%}"
    ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[red]%}%{✖%G%}"
    ZSH_THEME_GIT_PROMPT_CHANGED="%{$fg[blue]%}%{✚%G%}"
    ZSH_THEME_GIT_PROMPT_BEHIND="%{↓%G%}"
    ZSH_THEME_GIT_PROMPT_AHEAD="%{↑%G%}"
    ZSH_THEME_GIT_PROMPT_UNTRACKED="%{…%G%}"
    ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}%{✔%G%}"

    ZSH_THEME_GIT_PROMPT_PREFIX=" (%{%B%F{blue}%}"
    ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{${bkg}}%B%F{green}%})"
    ZSH_THEME_GIT_PROMPT_DIRTY=" %{%F{red}%}*%{%f%k%b%}"
    # ZSH_THEME_GIT_PROMPT_CLEAN=""

    PROMPT='%{%f%k%b%}
    %{%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_super_status)%E%{%f%k%b%}
    %{%K{${bkg}}%}$(_prompt_char)%{%K{${bkg}}%} %#%{%f%k%b%} '

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