Skip to content

Instantly share code, notes, and snippets.

@fusion27
Last active January 1, 2024 16:18
Show Gist options
  • Save fusion27/6167ee4e787fe43a8a311bc983bd3dec to your computer and use it in GitHub Desktop.
Save fusion27/6167ee4e787fe43a8a311bc983bd3dec to your computer and use it in GitHub Desktop.
# Add this line at the beginning of your theme file to define the parse_git_dirty function if it's not already defined
autoload -Uz vcs_info
precmd() { vcs_info }
# Personalized Zsh Theme
DALLAS_CURRENT_TIME_="%{$fg[red]%}%D{%Y-%m-%d} %D{%H:%M:%S}%{$reset_color%} "
DALLAS_CURRENT_LOCA_="%{$fg[green]%}%~ %{$fg[yellow]%}%B\$(git_prompt_info)%b%{$fg[white]%}$(parse_git_dirty)%{$reset_color%}"
DALLAS_PROMPT_CHAR_=" %(!.#.%%)%{$fg[white]%} "
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}@%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="🚨"
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[white]%}[%{$fg[magenta]%}"
ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$fg[white]%}]%{$reset_color%}"
# Put it all together
PROMPT="%{$fg[green]%}%n%{$fg[white]%}@%{$fg[yellow]%}%m%{$reset_color%} $DALLAS_CURRENT_TIME_$DALLAS_CURRENT_LOCA_$DALLAS_PROMPT_CHAR_"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment