Skip to content

Instantly share code, notes, and snippets.

@kottenator
Last active January 15, 2017 01:58
Show Gist options
  • Save kottenator/acb2ef43ad73b45545db45d9aa7d48f3 to your computer and use it in GitHub Desktop.
Save kottenator/acb2ef43ad73b45545db45d9aa7d48f3 to your computer and use it in GitHub Desktop.

Revisions

  1. kottenator revised this gist Jan 15, 2017. No changes.
  2. kottenator created this gist Jan 15, 2017.
    20 changes: 20 additions & 0 deletions kott.theme.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    # Custom theme for https://github.com/bash-it/bash-it
    # Place it into ~/.bash_it/custom/themes/kott/kott.theme.bash
    # Enable it in your ~/.bashrc: export BASH_IT_THEME='kott'

    SCM_THEME_PROMPT_DIRTY=""
    SCM_THEME_PROMPT_CLEAN=""
    SCM_THEME_PROMPT_PREFIX=" ("
    SCM_THEME_PROMPT_SUFFIX=")"

    function scm_prompt_info {
    scm_prompt_vars
    [ "$SCM_DIRTY" == "0" ] && SCM_COLOR="$bold_green" || SCM_COLOR="$bold_yellow";
    echo -e "$SCM_COLOR$SCM_PREFIX$SCM_STATE$SCM_BRANCH$SCM_SUFFIX$reset_color"
    }

    function prompt_command() {
    PS1="$bold_green» $bold_blue\W/$(scm_prompt_info) $normal$ "
    }

    safe_append_prompt_command prompt_command