-
-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
themes: Add a new theme "copied-duru" (#638)
- Loading branch information
Showing
5 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains 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