Skip to content

Instantly share code, notes, and snippets.

@pgib
Last active August 29, 2015 14:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgib/32fb9c9ff1bf45513407 to your computer and use it in GitHub Desktop.
Save pgib/32fb9c9ff1bf45513407 to your computer and use it in GitHub Desktop.
My oh-my-zsh theme.
# Path to your oh-my-zsh configuration.
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="pgib"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
COMPLETION_WAITING_DOTS="true"
# 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)
plugins=(git)
source $ZSH/oh-my-zsh.sh
bindkey "^I" expand-or-complete-with-dots
if [ -e $HOME/.zprofile ]; then
source ~/.zprofile
fi
# Customize to your needs...
export BROWSER="open"
# based on the alanpeabody theme, with some very minor modifications
#local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
if [ $USER = "root" ]; then
local user='%{$fg[white]%}%n@%{$fg[red]%}%m%{$reset_color%}'
else
local user='%{$fg[red]%}%m%{$reset_color%}'
fi
local pwd='%{$fg[blue]%}%~%{$reset_color%}'
#local rvm=''
#if which rvm-prompt &> /dev/null; then
# rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
#else
# if which rbenv &> /dev/null; then
# rvm='%{$fg[green]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}'
# fi
#fi
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
#local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚ "
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹ "
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖ "
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜ "
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═ "
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭ "
PROMPT="${user} ${pwd}$ "
#RPROMPT="${return_code} ${git_branch} ${rvm}"
RPROMPT="${return_code}"
PROMPT="$PROMPT"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#D" | tr -d %) "$PWD")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment