Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Bash-it theme based on Solarized colors
# https://gist.github.com/hansek
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif [[ $TERM != dumb ]] && infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
# Solarized
YELLOW=$(tput setaf 136)
ORANGE=$(tput setaf 166)
RED=$(tput setaf 160)
MAGENTA=$(tput setaf 162)
VIOLET=$(tput setaf 62)
BLUE=$(tput setaf 32)
CYAN=$(tput setaf 36)
GREEN=$(tput setaf 100)
BOLD=$(tput bold)
RESET=$(tput sgr0)
COLOR_TIME=$RESET
COLOR_ENV=$RED
COLOR_USER=$YELLOW
COLOR_HOST=$BLUE
COLOR_PATH=$GREEN
COLOR_GIT=$VIOLET
VIRTUALENV_THEME_PROMPT_PREFIX="(\[$COLOR_ENV\]"
VIRTUALENV_THEME_PROMPT_SUFFIX="\[$COLOR_DEFAULT\]) "
function prompt_command() {
PS1="\t $(virtualenv_prompt)\[$COLOR_USER\]\u\[$RESET\] at \[$COLOR_HOST\]\h\[$RESET\] in \[$COLOR_PATH\]\w\[$RESET\]\[$COLOR_GIT\]\$(__git_ps1) \[$RESET\]» "
}
safe_append_prompt_command prompt_command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.