Skip to content

Instantly share code, notes, and snippets.

@edfungus
Created November 16, 2017 07:20
Show Gist options
  • Save edfungus/68ad1b739a9733a0be62e945b275b9ea to your computer and use it in GitHub Desktop.
Save edfungus/68ad1b739a9733a0be62e945b275b9ea to your computer and use it in GitHub Desktop.
My bashit theme
#!/usr/bin/env bash
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
SCM_THEME_PROMPT_PREFIX=" ${green}|"
SCM_THEME_PROMPT_SUFFIX="${green}|"
GIT_THEME_PROMPT_DIRTY=" ${red}✗"
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
GIT_THEME_PROMPT_PREFIX=" ${green}|"
GIT_THEME_PROMPT_SUFFIX="${green}|"
RVM_THEME_PROMPT_PREFIX="|"
RVM_THEME_PROMPT_SUFFIX="|"
__bobby_clock() {
printf "$(clock_prompt) "
if [ "${THEME_SHOW_CLOCK_CHAR}" == "true" ]; then
printf "$(clock_char) "
fi
}
function prompt_command() {
# Get Virtual Env
if [[ $VIRTUAL_ENV != "" ]]
then
# Strip out the path and just leave the env name
venv="${green}[${VIRTUAL_ENV##*/}] ${cyan}$(scm_prompt_char_info)"
else
# In case you don't have one activated
venv="${cyan}$(scm_prompt_char_info)"
fi
#PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(ruby_version_prompt) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} "
# PS1="\n$(battery_char) $(__bobby_clock)${yellow}$(ruby_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_prompt_char_info) ${green}→${reset_color} "
PS1="\n${purple}\h:${reset_color} ${yellow}\w\n$(echo $venv) ${cyan}→${reset_color} "
}
THEME_SHOW_CLOCK_CHAR=${THEME_SHOW_CLOCK_CHAR:-"true"}
THEME_CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:-"$red"}
THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$bold_cyan"}
THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%Y-%m-%d %H:%M:%S"}
safe_append_prompt_command prompt_command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment