Skip to content

Instantly share code, notes, and snippets.

@PiiXiieeS
Forked from egeste/bureau-rvm.zsh-theme
Last active February 1, 2017 06:19
Show Gist options
  • Save PiiXiieeS/5e186ce32b292f608d7c8e61e9603d3c to your computer and use it in GitHub Desktop.
Save PiiXiieeS/5e186ce32b292f608d7c8e61e9603d3c to your computer and use it in GitHub Desktop.

Revisions

  1. PiiXiieeS revised this gist Feb 1, 2017. 3 changed files with 232 additions and 0 deletions.
    115 changes: 115 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,115 @@
    # Path to your oh-my-zsh installation.
    # Usually located in ~/.zshrc
    export ZSH=$HOME/.oh-my-zsh

    # Set name of the theme to load.
    # Look in ~/.oh-my-zsh/themes/
    # Optionally, if you set this to "random", it'll load a random theme each
    # time that oh-my-zsh is loaded.
    # ZSH_THEME="agnoster"
    ZSH_THEME="piixiiees2"
    # ZSH_THEME="hyperzsh"
    # ZSH_THEME="bira"
    # ZSH_THEME="bureau"



    # Uncomment the following line to use case-sensitive completion.
    # CASE_SENSITIVE="true"

    # Uncomment the following line to disable bi-weekly auto-update checks.
    DISABLE_AUTO_UPDATE="true"

    # Uncomment the following line to change how often to auto-update (in days).
    # export UPDATE_ZSH_DAYS=13

    # Uncomment the following line to disable colors in ls.
    # DISABLE_LS_COLORS="true"

    # Uncomment the following line to disable auto-setting terminal title.
    # DISABLE_AUTO_TITLE="true"

    # Uncomment the following line to enable command auto-correction.
    # ENABLE_CORRECTION="true"

    # Uncomment the following line to display red dots whilst waiting for completion.
    # COMPLETION_WAITING_DOTS="true"

    # Uncomment the following line if you want to disable marking untracked files
    # under VCS as dirty. This makes repository status check for large repositories
    # much, much faster.
    # DISABLE_UNTRACKED_FILES_DIRTY="true"

    # Uncomment the following line if you want to change the command execution time
    # stamp shown in the history command output.
    # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
    # HIST_STAMPS="mm/dd/yyyy"

    # Would you like to use another custom folder than $ZSH/custom?
    # ZSH_CUSTOM=/path/to/new-custom-folder

    # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
    # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
    # Example format: plugins=(rails git textmate ruby lighthouse)
    # Add wisely, as too many plugins slow down shell startup.
    plugins=(git)

    # User configuration
    export PATH=$HOME/bin:/usr/local/bin:$PATH

    # To move npm global packages to a non root/sudo path
    # export PATH="$HOME/.npm-global/bin:$PATH"

    # added by Anaconda3 4.2.0 installer
    export PATH="$HOME/anaconda/bin:$PATH"

    # export MANPATH="/usr/local/man:$MANPATH"

    alias wget="curl -0"
    export PATH=/usr/local/bin:$PATH
    export PATH=$PATH:.

    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm



    # === alias command to transfer files to https://transfer.sh/
    transfer() {
    # write to output to tmpfile because of progress bar
    tmpfile=$( mktemp -t transferXXX )
    curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
    cat $tmpfile;
    rm -f $tmpfile;
    }

    alias transfer=transfer
    # ===


    source $ZSH/oh-my-zsh.sh

    # You may need to manually set your language environment
    # export LANG=en_US.UTF-8

    # Preferred editor for local and remote sessions
    # if [[ -n $SSH_CONNECTION ]]; then
    # export EDITOR='vim'
    # else
    # export EDITOR='mvim'
    # fi

    # Compilation flags
    # export ARCHFLAGS="-arch x86_64"

    # ssh
    # export SSH_KEY_PATH="~/.ssh/dsa_id"

    # Set personal aliases, overriding those provided by oh-my-zsh libs,
    # plugins, and themes. Aliases can be placed here, though oh-my-zsh
    # users are encouraged to define aliases within the ZSH_CUSTOM folder.
    # For a full list of active aliases, run `alias`.
    #
    # Example aliases
    # alias zshconfig="mate ~/.zshrc"
    # alias ohmyzsh="mate ~/.oh-my-zsh"
    1 change: 1 addition & 0 deletions piixiiees-new.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    # oh-my-zsh Customized Bureau Theme for PiiXiieeS
    # zsh Themes are located in ~/zsh/piixiiees.zsh-theme

    ### NVM

    116 changes: 116 additions & 0 deletions piixiiees-old.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,116 @@
    # oh-my-zsh PiiXiieeS Theme
    # zsh Themes are located in ~/zsh/piixiiees.zsh-theme

    ### NVM
    ZSH_THEME_NVM_PROMPT_PREFIX="%B⬡%b "
    ZSH_THEME_NVM_PROMPT_SUFFIX=""

    ### Git [±master ▾●]
    ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg_bold[green]%}±%{$reset_color%}%{$fg_bold[white]%}"
    ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"
    ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✓%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[cyan]%}▴%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[magenta]%}▾%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}"

    piixiiees_git_branch () {
    ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
    ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
    echo "${ref#refs/heads/}"
    }

    piixiiees_git_status () {
    _INDEX=$(command git status --porcelain -b 2> /dev/null)
    _STATUS=""
    if $(echo "$_INDEX" | grep '^[AMRD]. ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
    fi
    if $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
    fi
    if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
    fi
    if $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
    fi
    if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
    fi
    if $(echo "$_INDEX" | grep '^## .*ahead' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
    fi
    if $(echo "$_INDEX" | grep '^## .*behind' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
    fi
    if $(echo "$_INDEX" | grep '^## .*diverged' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED"
    fi

    echo $_STATUS
    }

    piixiiees_git_prompt () {
    local _branch=$(piixiiees_git_branch)
    local _status=$(piixiiees_git_status)
    local _result=""
    if [[ "${_branch}x" != "x" ]]; then
    _result="$ZSH_THEME_GIT_PROMPT_PREFIX$_branch"
    if [[ "${_status}x" != "x" ]]; then
    _result="$_result $_status"
    fi
    _result="$_result$ZSH_THEME_GIT_PROMPT_SUFFIX"
    fi
    echo $_result
    }


    _PATH="%{$fg_bold[white]%}%~%{$reset_color%}"
    ## %F{yellow}%
    if [[ $EUID -eq 0 ]]; then
    _USERNAME="%{$fg_bold[red]%}%n"
    _LIBERTY=""
    else
    _USERNAME="%{$fg[white]%}%n"
    _LIBERTY="%{$fg[green]%}➜" # └ᐅ"
    fi
    _USERNAME="$_USERNAME%{$reset_color%}@%m"
    _LIBERTY="$_LIBERTY%{$reset_color%}"


    get_space () {
    local STR=$1$2
    local zero='%([BSUbfksu]|([FB]|){*})'
    local LENGTH=${#${(S%%)STR//$~zero/}}
    local SPACES=""
    (( LENGTH = ${COLUMNS} - $LENGTH - 1))

    for i in {0..$LENGTH}
    do
    SPACES="$SPACES "
    done

    echo $SPACES
    }

    _1LEFT="$_USERNAME $_PATH"
    _1RIGHT="[%*] "

    piixiiees_precmd () {
    _1SPACES=`get_space $_1LEFT $_1RIGHT`
    print
    print -rP "$_1LEFT$_1SPACES$_1RIGHT"
    }

    setopt prompt_subst
    PROMPT=' $_LIBERTY '
    RPROMPT='$(nvm_prompt_info) $(piixiiees_git_prompt)'

    autoload -U add-zsh-hook
    add-zsh-hook precmd piixiiees_precmd

    # See http://geoff.greer.fm/lscolors/
    export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx"
    export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:"
  2. PiiXiieeS renamed this gist Jan 29, 2017. 1 changed file with 13 additions and 14 deletions.
    27 changes: 13 additions & 14 deletions bureau-rvm.zsh-theme → piixiiees-new.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -1,22 +1,17 @@
    # oh-my-zsh Customized Bureau Theme
    # oh-my-zsh Customized Bureau Theme for PiiXiieeS

    ### NVM

    ZSH_THEME_NVM_PROMPT_PREFIX="(⬡"
    ZSH_THEME_NVM_PROMPT_SUFFIX=")"

    ### RVM

    ZSH_THEME_RVM_PROMPT_PREFIX="(💎"
    ZSH_THEME_RVM_PROMPT_SUFFIX=""
    ZSH_THEME_NVM_PROMPT_PREFIX="%B⬡%b "
    ZSH_THEME_NVM_PROMPT_SUFFIX=""

    ### Git

    ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg_bold[green]%}±%{$reset_color%}%{$fg_bold[white]%}"
    ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"

    ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%} %{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} %{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%} %{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} %{$reset_color%}"

    ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[cyan]%}▴%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[magenta]%}▾%{$reset_color%}"
    @@ -28,16 +23,16 @@ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[red]%}•%{$reset_color%}"
    ### Prompt
    if [[ $EUID -eq 0 ]]; then
    _USERNAME="%{$fg_bold[red]%}%n"
    _LIBERTY="%{$fg[red]%}#"
    _LIBERTY="%{$fg[red]%}"
    else
    _USERNAME="%{$fg_bold[white]%}%n"
    _LIBERTY="%{$fg[green]%}$"
    _LIBERTY="%{$fg[green]%}"
    fi
    _USERNAME="$_USERNAME%{$reset_color%}@%m"
    _LIBERTY="$_LIBERTY%{$reset_color%}"

    setopt prompt_subst
    PROMPT="> $_LIBERTY "
    PROMPT=" %B$_LIBERTY%b "
    RPROMPT='$(rvm_prompt_info)$(nvm_prompt_info)'

    get_space () {
    @@ -60,4 +55,8 @@ bureau_precmd () {
    }

    autoload -U add-zsh-hook
    add-zsh-hook precmd bureau_precmd
    add-zsh-hook precmd bureau_precmd

    # See http://geoff.greer.fm/lscolors/
    export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx"
    export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:"
  3. Steve Regester renamed this gist Jul 17, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. Steve Regester revised this gist Apr 25, 2015. No changes.
  5. Steve Regester revised this gist Mar 27, 2015. 1 changed file with 22 additions and 61 deletions.
    83 changes: 22 additions & 61 deletions bureau-nvm.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,30 @@
    # oh-my-zsh Modified Bureau Theme
    # oh-my-zsh Customized Bureau Theme

    ### NVM

    ZSH_THEME_NVM_PROMPT_PREFIX="(⬡ "
    ZSH_THEME_NVM_PROMPT_PREFIX="(⬡"
    ZSH_THEME_NVM_PROMPT_SUFFIX=")"

    ### RVM

    ZSH_THEME_RVM_PROMPT_PREFIX="(💎 "
    ZSH_THEME_RVM_PROMPT_PREFIX="(💎"
    ZSH_THEME_RVM_PROMPT_SUFFIX=""

    ### Git

    ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg_bold[green]%}±%{$reset_color%}%{$fg_bold[white]%}"
    ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"

    ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%} চ%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} দ%{$reset_color%}"

    ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[cyan]%}▴%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[magenta]%}▾%{$reset_color%}"

    ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}•%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[yellow]%}•%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[red]%}•%{$reset_color%}"

    ### Prompt
    if [[ $EUID -eq 0 ]]; then
    _USERNAME="%{$fg_bold[red]%}%n"
    @@ -22,62 +37,8 @@ _USERNAME="$_USERNAME%{$reset_color%}@%m"
    _LIBERTY="$_LIBERTY%{$reset_color%}"

    setopt prompt_subst
    PROMPT='> $_LIBERTY '
    RPROMPT='$(rvm_prompt_info) $(nvm_prompt_info)'

    ### Git [±master ▾●]

    ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg_bold[green]%}±%{$reset_color%}%{$fg_bold[white]%}"
    ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"
    ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✓%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[cyan]%}▴%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[magenta]%}▾%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}"

    bureau_git_branch () {
    ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
    ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
    echo "${ref#refs/heads/}"
    }

    bureau_git_status () {
    _INDEX=$(command git status --porcelain -b 2> /dev/null)
    _STATUS=""
    if $(echo "$_INDEX" | grep '^[AMRD]. ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
    elif $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
    elif $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
    elif $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
    elif $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
    elif $(echo "$_INDEX" | grep '^## .*ahead' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
    elif $(echo "$_INDEX" | grep '^## .*behind' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
    elif $(echo "$_INDEX" | grep '^## .*diverged' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED"
    fi
    echo $_STATUS
    }

    bureau_git_prompt () {
    local _branch=$(bureau_git_branch)
    local _status=$(bureau_git_status)
    local _result=""
    if [[ "${_branch}x" != "x" ]]; then
    _result="$ZSH_THEME_GIT_PROMPT_PREFIX$_branch"
    if [[ "${_status}x" != "x" ]]; then
    _result="$_result $_status"
    fi
    _result="$_result$ZSH_THEME_GIT_PROMPT_SUFFIX"
    fi
    echo $_result
    }
    PROMPT="> $_LIBERTY "
    RPROMPT='$(rvm_prompt_info)$(nvm_prompt_info)'

    get_space () {
    local STR=$1$2
    @@ -92,11 +53,11 @@ get_space () {
    bureau_precmd () {
    _PATH="%{$fg_bold[white]%}%~%{$reset_color%}"
    _1LEFT="$_USERNAME:$_PATH"
    _1RIGHT="$(bureau_git_prompt) [%*]"
    _1RIGHT="$(git_prompt_status)$(git_prompt_info)[%*]"
    _1SPACES=`get_space $_1LEFT $_1RIGHT`
    print
    print -rP "${_1LEFT}${_1SPACES}${_1RIGHT}"
    }

    autoload -U add-zsh-hook
    add-zsh-hook precmd bureau_precmd
    add-zsh-hook precmd bureau_precmd
  6. Steve Regester revised this gist Mar 25, 2015. No changes.
  7. Steve Regester renamed this gist Mar 25, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  8. Steve Regester created this gist Mar 25, 2015.
    102 changes: 102 additions & 0 deletions bureau-nvm.xsh-theme
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,102 @@
    # oh-my-zsh Modified Bureau Theme

    ### NVM

    ZSH_THEME_NVM_PROMPT_PREFIX="(⬡ "
    ZSH_THEME_NVM_PROMPT_SUFFIX=")"

    ### RVM

    ZSH_THEME_RVM_PROMPT_PREFIX="(💎 "
    ZSH_THEME_RVM_PROMPT_SUFFIX=""

    ### Prompt
    if [[ $EUID -eq 0 ]]; then
    _USERNAME="%{$fg_bold[red]%}%n"
    _LIBERTY="%{$fg[red]%}#"
    else
    _USERNAME="%{$fg_bold[white]%}%n"
    _LIBERTY="%{$fg[green]%}$"
    fi
    _USERNAME="$_USERNAME%{$reset_color%}@%m"
    _LIBERTY="$_LIBERTY%{$reset_color%}"

    setopt prompt_subst
    PROMPT='> $_LIBERTY '
    RPROMPT='$(rvm_prompt_info) $(nvm_prompt_info)'

    ### Git [±master ▾●]

    ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg_bold[green]%}±%{$reset_color%}%{$fg_bold[white]%}"
    ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"
    ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✓%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[cyan]%}▴%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[magenta]%}▾%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}"

    bureau_git_branch () {
    ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
    ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
    echo "${ref#refs/heads/}"
    }

    bureau_git_status () {
    _INDEX=$(command git status --porcelain -b 2> /dev/null)
    _STATUS=""
    if $(echo "$_INDEX" | grep '^[AMRD]. ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
    elif $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
    elif $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
    elif $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
    elif $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
    elif $(echo "$_INDEX" | grep '^## .*ahead' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
    elif $(echo "$_INDEX" | grep '^## .*behind' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
    elif $(echo "$_INDEX" | grep '^## .*diverged' &> /dev/null); then
    _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED"
    fi
    echo $_STATUS
    }

    bureau_git_prompt () {
    local _branch=$(bureau_git_branch)
    local _status=$(bureau_git_status)
    local _result=""
    if [[ "${_branch}x" != "x" ]]; then
    _result="$ZSH_THEME_GIT_PROMPT_PREFIX$_branch"
    if [[ "${_status}x" != "x" ]]; then
    _result="$_result $_status"
    fi
    _result="$_result$ZSH_THEME_GIT_PROMPT_SUFFIX"
    fi
    echo $_result
    }

    get_space () {
    local STR=$1$2
    local zero='%([BSUbfksu]|([FB]|){*})'
    local LENGTH=${#${(S%%)STR//$~zero/}}
    local SPACES=""
    (( LENGTH = ${COLUMNS} - $LENGTH - 1))
    for i in {0..$LENGTH}; do SPACES="$SPACES "; done
    echo $SPACES
    }

    bureau_precmd () {
    _PATH="%{$fg_bold[white]%}%~%{$reset_color%}"
    _1LEFT="$_USERNAME:$_PATH"
    _1RIGHT="$(bureau_git_prompt) [%*]"
    _1SPACES=`get_space $_1LEFT $_1RIGHT`
    print
    print -rP "${_1LEFT}${_1SPACES}${_1RIGHT}"
    }

    autoload -U add-zsh-hook
    add-zsh-hook precmd bureau_precmd