Created
September 30, 2017 01:28
-
-
Save dayne/b43b8904784a26e7ce5382ac87f2702c to your computer and use it in GitHub Desktop.
bash_it-theme
This file contains hidden or 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
| SCM_THEME_PROMPT_PREFIX="" | |
| SCM_THEME_PROMPT_SUFFIX="" | |
| SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" | |
| SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" | |
| SCM_GIT_CHAR="${bold_green}±${normal}" | |
| SCM_SVN_CHAR="${bold_cyan}⑆${normal}" | |
| SCM_HG_CHAR="${bold_red}☿${normal}" | |
| case $TERM in | |
| xterm*) | |
| TITLEBAR="\[\033]0;\w\007\]" | |
| ;; | |
| *) | |
| TITLEBAR="" | |
| ;; | |
| esac | |
| PS3=">> " | |
| chef_knife_block() { | |
| if [ -f $HOME/.chef/knife.rb ]; then | |
| knife_target=$(readlink $HOME/.chef/knife.rb) | |
| echo "[$(basename -s .rb ${knife_target/knife-/})]" | |
| else | |
| echo "" | |
| fi | |
| } | |
| is_vim_shell() { | |
| if [ ! -z "$VIMRUNTIME" ] | |
| then | |
| echo "[${cyan}vim shell${normal}]" | |
| fi | |
| } | |
| modern_scm_prompt() { | |
| CHAR=$(scm_char) | |
| if [ $CHAR = $SCM_NONE_CHAR ] | |
| then | |
| return | |
| else | |
| echo "[$(scm_char)][$(scm_prompt_info)]" | |
| fi | |
| } | |
| prompt() { | |
| if [ $? -ne 0 ] | |
| then | |
| # Yes, the indenting on these is weird, but it has to be like | |
| # this otherwise it won't display properly. | |
| PS1="${TITLEBAR}${bold_red}┌─${reset_color}$(chef_knife_block)$(modern_scm_prompt)[${cyan}\W${normal}][$(battery_charge)]$(is_vim_shell) | |
| ${bold_red}└─▪${normal} ${HOSTNAME%%.*} $ " | |
| else | |
| PS1="${TITLEBAR}┌─$(chef_knife_block)$(modern_scm_prompt)[${cyan}\W${normal}][$(battery_charge)]$(is_vim_shell) | |
| └─▪ ${HOSTNAME%%.*} > " | |
| fi | |
| } | |
| PS2="└─▪ ${HOSTNAME%%.*} $ " | |
| safe_append_prompt_command prompt |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I put this in my
$HOME/.local/bash_it-theme.bashand then use it with bash-it by setting theBASH_IT_THEMEin your .bashrc: