-
-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #481 from edsonarios/theme-edsonarios
themes/new-theme
- Loading branch information
Showing
4 changed files
with
50 additions
and
5 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
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,35 @@ | ||
#! bash oh-my-bash.module | ||
|
||
# If you want the same background color that the screenshot, modify the | ||
# background option in your terminal with the code: #333333 | ||
|
||
# For unstaged(*) and staged(+) values next to branch name in __git_ps1 | ||
GIT_PS1_SHOWDIRTYSTATE="enabled" | ||
OMB_PROMPT_VIRTUALENV_FORMAT=' [%s]' | ||
OMB_PROMPT_CONDAENV_FORMAT=' [%s]' | ||
|
||
OMB_THEME_EDSONARIOS_STATUS_BAD="${_omb_prompt_bold_brown}❯_${_omb_prompt_normal} " | ||
OMB_THEME_EDSONARIOS_STATUS_OK="${_omb_prompt_bold_green}❯_${_omb_prompt_normal} " | ||
|
||
function _omb_theme_PROMPT_COMMAND { | ||
if (($? == 0)); then | ||
local ret_status=${OMB_THEME_EDSONARIOS_STATUS_OK-} | ||
else | ||
local ret_status=${OMB_THEME_EDSONARIOS_STATUS_BAD-} | ||
fi | ||
|
||
# If the current directory is the same as HOME, will just show "~/". If not, | ||
# show the complete route unlike \w. | ||
if [[ $PWD == "$HOME" ]]; then | ||
local directory='\W/' | ||
else | ||
local directory="$PWD/" | ||
fi | ||
|
||
local python_venv | ||
_omb_prompt_get_python_venv | ||
|
||
PS1="\n⚡ \t $_omb_prompt_bold_teal${directory}$_omb_prompt_bold_purple$python_venv$_omb_prompt_bold_green$(__git_ps1 " (%s)") \n${ret_status}" | ||
} | ||
|
||
_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