Skip to content

Instantly share code, notes, and snippets.

@kpmeen
Last active May 5, 2017 21:00
Show Gist options
  • Select an option

  • Save kpmeen/adff3f0a60b1ad9b5b6c to your computer and use it in GitHub Desktop.

Select an option

Save kpmeen/adff3f0a60b1ad9b5b6c to your computer and use it in GitHub Desktop.

Revisions

  1. kpmeen revised this gist Jul 27, 2016. 2 changed files with 1 addition and 6 deletions.
    5 changes: 0 additions & 5 deletions echelon.zsh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,5 @@
    # echelon

    # Stealing shamelessly from these oh-my-zsh themes:
    # in-fino-veritas
    # fino-time
    # https://gist.github.com/smileart/3750104

    function virtualenv_info {
    [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
    }
    2 changes: 1 addition & 1 deletion echelon2.zsh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # echelon
    # echelon2
    NEWLINE='
    '

  2. kpmeen revised this gist Jul 27, 2016. 1 changed file with 47 additions and 0 deletions.
    47 changes: 47 additions & 0 deletions echelon2.zsh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    # echelon
    NEWLINE='
    '

    ZSH_THEME_GIT_PROMPT_PREFIX="%{$FG[009]%}\ue0a0%{$reset_color%} "
    ZSH_THEME_GIT_PROMPT_SUFFIX=""
    ZSH_THEME_GIT_PROMPT_DIRTY=" %F{red}✘%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_CLEAN=" %F{green}✔%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_ADDED=" %F{green}✚%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_MODIFIED=" %F{blue}✹%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_DELETED=" %F{red}✖%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_UNTRACKED=" %F{yellow}✭%{$reset_color%}"
    ZSH_THEME_GIT_PROMPT_RENAMED=""
    ZSH_THEME_GIT_PROMPT_UNMERGED=""
    ZSH_THEME_GIT_PROMPT_AHEAD=""
    ZSH_THEME_GIT_PROMPT_BEHIND=""
    ZSH_THEME_GIT_PROMPT_DIVERGED=""

    LINE1="%{$FG[039]%}╭─"
    LINE2="%{$FG[039]%}╰─ "

    function virtualenv_info {
    [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
    }

    function box_name {
    echo "%{$FG[040]%}%n%{$FG[239]%}@%{$FG[033]%}$(hostname -s)"
    }

    function echelon_git_info {
    local git_info='$(git_prompt_info)'
    echo "${git_info}"
    }

    function end_prompt {
    echo "$LINE2%{$FG[255]$terminfo[bold]%}λ$(virtualenv_info)%(?.%{$FG[002]%}.%{$FG[001]%}✘)%{$reset_color%} "
    }

    function build_prompt {
    local current_dir='${PWD/#$HOME/~}'
    local git_info='$(git_prompt_info)'

    echo "$LINE1$(box_name) %{$terminfo[bold]$FG[006]%}${current_dir}%{$FG[255]%}$NEWLINE$(end_prompt)"
    }

    PROMPT="$(build_prompt)%{$reset_color%}"
    RPROMPT="$(echelon_git_info) [%{$FG[039]%}%*%{$reset_color%}]"
  3. kpmeen created this gist Jun 2, 2014.
    28 changes: 28 additions & 0 deletions echelon.zsh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    # echelon

    # Stealing shamelessly from these oh-my-zsh themes:
    # in-fino-veritas
    # fino-time
    # https://gist.github.com/smileart/3750104

    function virtualenv_info {
    [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
    }

    function box_name {
    hostname -s
    }

    function build_prompt {
    local current_dir='${PWD/#$HOME/~}'
    local git_info='$(git_prompt_info)'

    echo "[%{$FG[039]%}%*%{$reset_color%}] %{$FG[040]%}%n%{$reset_color%}%{$FG[239]%}@%{$reset_color%}%{$FG[033]%}$(box_name)%{$reset_color%}%{$FG[239]%}/%{$reset_color%}%{$terminfo[bold]$FG[006]%}${current_dir}%{$reset_color%} ${git_info} λ$(virtualenv_info)%(?.%{%F{green}%}.%{%F{red}%}✘) %{$reset_color%}"
    }


    PROMPT="$(build_prompt)"
    ZSH_THEME_GIT_PROMPT_PREFIX=" %{$reset_color%}["
    ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"
    ZSH_THEME_GIT_PROMPT_DIRTY=" %{$FG[202]%}✘"
    ZSH_THEME_GIT_PROMPT_CLEAN=" %{$FG[040]%}✔"