Skip to content

Instantly share code, notes, and snippets.

@roryhardy
Last active April 19, 2016 17:59
Show Gist options
  • Save roryhardy/5456912 to your computer and use it in GitHub Desktop.
Save roryhardy/5456912 to your computer and use it in GitHub Desktop.
Multi-lined version of my oh-my-zsh theme.

gg2.zsh-theme

A ZSH theme for those who like the robbyrussell theme, but want the familiar $ and would like their prompt on a separate line from the typing space. For example, if you use git and have large branch names you could have path$ git:(this-is-a-very-very-very-very-very-long-branch-name) which eats up most of a small terminal window.

NOTE: Though this theme looks okay with most fonts, you will need to install a Powerline-patched font for this theme to render correctly.

Screenshot

# Context: user@hostname (who am I and where am I)
prompt_context() {
local user=`whoami`
if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
echo -n "$user@%m:"
fi
}
PROMPT='%{$fg_bold[red]%}╭─ %{$reset_color%}$(prompt_context)%{$fg[cyan]%}%c%{$fg_bold[red]%}$%{$fg_bold[blue]%}$(git_prompt_info)
%{$fg_bold[red]%}╰→ %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) %{$fg[green]%}✓"
@apjanke
Copy link

apjanke commented Jul 9, 2015

That Powerline fonts link looks like a stale downstream copy. Would you mind updating it to point at the main powerline/fonts repo?

@roryhardy
Copy link
Author

@apjanke, thanks for the heads up! I updated it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment