diff --git a/clean_files.txt b/clean_files.txt index 5cececcf..ad8b93f5 100644 --- a/clean_files.txt +++ b/clean_files.txt @@ -43,6 +43,7 @@ themes/bobby-python themes/brainy themes/brunton themes/command_duration.theme.bash +themes/easy themes/modern themes/purity diff --git a/docs/themes-list/easy.rst b/docs/themes-list/easy.rst new file mode 100644 index 00000000..cd553cf4 --- /dev/null +++ b/docs/themes-list/easy.rst @@ -0,0 +1,14 @@ +.. _easy: + +Easy Theme +========== + +A simple theme + +Examples +-------- + +.. code-block:: bash + + user@hostname ~/.bash_it + [ master ✓ ] ❯ diff --git a/docs/themes-list/index.rst b/docs/themes-list/index.rst index 6e912446..49c5a623 100644 --- a/docs/themes-list/index.rst +++ b/docs/themes-list/index.rst @@ -187,6 +187,22 @@ Doubletime Multiline Python Only :alt: +---- + +Easy +^^^^ + + +.. image:: https://bash-it.github.io/bash-it/docs/images/easy-black.jpg + :target: https://bash-it.github.io/bash-it/docs/images/easy-black.jpg + :alt: + + +.. image:: https://bash-it.github.io/bash-it/docs/images/easy-white.jpg + :target: https://bash-it.github.io/bash-it/docs/images/easy-white.jpg + :alt: + + ---- Envy diff --git a/themes/easy/easy.theme.bash b/themes/easy/easy.theme.bash new file mode 100644 index 00000000..a48eb824 --- /dev/null +++ b/themes/easy/easy.theme.bash @@ -0,0 +1,19 @@ +# shellcheck shell=bash + +SCM_THEME_PROMPT_PREFIX="${bold_green}[ ${normal}" +SCM_THEME_PROMPT_SUFFIX="${bold_green} ] " +SCM_THEME_PROMPT_DIRTY=" ${red}✗" +SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" + +prompt_command() { + if [ "$(whoami)" = root ]; then + cursor_color="${bold_red}" + user_color="${green}" + else + cursor_color="${bold_green}" + user_color="${white}" + fi + PS1="${user_color}\u${normal}@${white}\h ${bold_black}\w\n${reset_color}$(scm_prompt_info)${cursor_color}❯ ${normal}" +} + +safe_append_prompt_command prompt_command