Last active
February 13, 2017 23:05
-
-
Save hansek/0621b2a8bcbecd52beb479ac37255372 to your computer and use it in GitHub Desktop.
Theme for bash-it https://github.com/Bash-it/bash-it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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