Last active
February 4, 2022 06:00
-
-
Save gvisoc/bf6095640d0139811133d1907c00c7f2 to your computer and use it in GitHub Desktop.
gvisoc.zsh-theme
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
# My "Oh My ZSH" theme. | |
# Based on juanghurtado.zsh-theme, tested on Gnome Terminal | |
# | |
# - Adds *l*ast execution code, number of *a*live processes. | |
# - Removes right prompt and the user@host. | |
# - Less marks for git-ahead. Uses ^ instead of !. | |
# - Instead of '>' uses '#%': the prompt is % for regulars and # for root. | |
# - Bold colors predominant, for Gnome Terminal's "Show bold text in bright colors" | |
# Color shortcuts | |
WHITE=$fg[white] | |
GRAY=$fg[gray] | |
RED_BOLD=$fg_bold[red] | |
YELLOW_BOLD=$fg_bold[yellow] | |
GREEN_BOLD=$fg_bold[green] | |
WHITE_BOLD=$fg_bold[white] | |
RESET_COLOR=$reset_color | |
# Format for parse_git_dirty() | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED_BOLD%}(*)" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
# Format for git_prompt_status() | |
ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED_BOLD%}unmerged" | |
ZSH_THEME_GIT_PROMPT_DELETED=" %{$RED_BOLD%}deleted" | |
ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW_BOLD%}renamed" | |
ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$YELLOW_BOLD%}modified" | |
ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN_BOLD%}added" | |
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$WHITE_BOLD%}untracked" | |
# Format for git_prompt_ahead() | |
ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED_BOLD%}(^)" | |
# Format for git_prompt_long_sha() and git_prompt_short_sha() | |
ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$WHITE_BOLD%}[%{$YELLOW_BOLD%}" | |
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE_BOLD%}]" | |
# Prompt format | |
# Force remove right prompt for theme changes that are tested with | |
# source ~/.zshrc | |
RPROMPT='' | |
PROMPT=' | |
%{$WHITE_BOLD%}[l:%{$RESET_COLOR%}%{$GRAY%}%?, %{$WHITE_BOLD%}a:%{$RESET_COLOR%}%{$GRAY%}%j%{$WHITE_BOLD%}] %~ %{$GREEN_BOLD%}$(git_current_branch)$(git_prompt_short_sha)$(git_prompt_status)$(parse_git_dirty) | |
%{$WHITE_BOLD%}%#%{$RESET_COLOR%} ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment