diff --git a/themes/THEMES.md b/themes/THEMES.md index 42b62efef..6a4be11bf 100644 --- a/themes/THEMES.md +++ b/themes/THEMES.md @@ -51,6 +51,10 @@ [![](cooperkid/cooperkid-dark.png)](cooperkid/cooperkid-dark.png) +## `copied-duru` + +[![](copied-duru/copied-duru-dark.png)](copied-duru/copied-duru-dark.png) + ## `cupcake` [![](cupcake/cupcake-dark.png)](cupcake/cupcake-dark.png) diff --git a/themes/copied-duru/README.md b/themes/copied-duru/README.md new file mode 100644 index 000000000..bc83a8860 --- /dev/null +++ b/themes/copied-duru/README.md @@ -0,0 +1,16 @@ +# Copied-Duru Theme + +This theme is heavily inspired by the "Sexy" and "Duru" themes. The goal was to combine the color scheme of "Sexy" with the style of "Duru", and that is exactly what this theme achieves! + +## Features + +- **Colorful Prompt:** Utilizes the vibrant color scheme from the "Sexy" theme. +- **Informative Prompt:** Displays useful information such as the current time, user, host, current directory, Git branch, and Python virtual environment. + +## Usage + +- **Python Virtual Environment**Displayed in magenta +- **User and Host:** Displayed in purple and white +- **Current Time:** Displayed in Yellow +- **Current Directory:** Displayed in purple +- **Git Branch** Displayed in magenta \ No newline at end of file diff --git a/themes/copied-duru/copied-duru-dark.png b/themes/copied-duru/copied-duru-dark.png new file mode 100644 index 000000000..7b6fe7460 Binary files /dev/null and b/themes/copied-duru/copied-duru-dark.png differ diff --git a/themes/copied-duru/copied-duru.theme.sh b/themes/copied-duru/copied-duru.theme.sh new file mode 100644 index 000000000..191d5ee07 --- /dev/null +++ b/themes/copied-duru/copied-duru.theme.sh @@ -0,0 +1,32 @@ +#! bash oh-my-bash.module +# "Copied-Duru" Prompt, inspired by "Sexy" and obviously "Duru" + +source "$OSH/themes/sexy/sexy.theme.sh" + +if [[ $COLORTERM == gnome-* && $TERM == xterm ]] && infocmp gnome-256color &>/dev/null; then + export TERM=gnome-256color +elif [[ $TERM != dumb ]] && infocmp xterm-256color &>/dev/null; then + export TERM=xterm-256color +fi + +function _omb_theme_PROMPT_COMMAND { + local current_time='\D{%H:%M:%S}' + local python_venv= + local just_a_format=' '$MAGENTA'(%s)' + + if [[ $VIRTUAL_ENV ]]; then + printf -v python_venv "$just_a_format" "${VIRTUAL_ENV##*/}" + elif [[ $CONDA_DEFAULT_ENV ]]; then + printf -v python_venv "$just_a_format" "${CONDA_DEFAULT_ENV##*/}" + fi + + local git_prefix= + [[ $(_omb_prompt_git branch 2> /dev/null) ]] && git_prefix=' on ' + + PS1=$GREEN'#'$python_venv' '$PURPLE'\u@'$WHITE'\h'$GREEN + PS1+=' '$current_time'>'$RESET + PS1+=' '$PURPLE'<\w'$WHITE$git_prefix$MAGENTA$(parse_git_branch) + PS1+=$PURPLE'>'$RESET'\n'$GREEN'$ '$RESET +} + +_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND diff --git a/themes/sexy/sexy.theme.sh b/themes/sexy/sexy.theme.sh index 8133ec419..15313adc7 100644 --- a/themes/sexy/sexy.theme.sh +++ b/themes/sexy/sexy.theme.sh @@ -3,7 +3,7 @@ # Screenshot: http://cloud.gf3.ca/M5rG # A big thanks to \amethyst on Freenode -if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color &>/dev/null; then +if [[ $COLORTERM == gnome-* && $TERM == xterm ]] && infocmp gnome-256color &>/dev/null; then export TERM=gnome-256color elif [[ $TERM != dumb ]] && infocmp xterm-256color &>/dev/null; then export TERM=xterm-256color @@ -36,9 +36,11 @@ function parse_git_branch { function _omb_theme_PROMPT_COMMAND() { local python_venv _omb_prompt_get_python_venv - local git_prefix - git_prefix=$([[ -n $(_omb_prompt_git branch 2> /dev/null) ]] && _omb_util_print ' on ') - PS1="$python_venv${MAGENTA}\u ${WHITE}at ${ORANGE}\h ${WHITE}in ${GREEN}\w${WHITE}$git_prefix${PURPLE}\$(parse_git_branch)${WHITE}\n\$ ${RESET}" + local git_prefix= + [[ $(_omb_prompt_git branch 2> /dev/null) ]] && git_prefix=' on ' + PS1=$python_venv$MAGENTA'\u '$WHITE'at '$ORANGE'\h' + PS1+=' '$WHITE'in '$GREEN'\w'$WHITE + PS1+=$git_prefix$PURPLE'$(parse_git_branch)'$WHITE'\n\$ '$RESET } _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND