my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
904 B

3 years ago
  1. # ZSH Theme - Preview: https://cl.ly/f701d00760f8059e06dc
  2. # Thanks to gallifrey, upon whose theme this is based
  3. local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
  4. function my_git_prompt_info() {
  5. ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  6. GIT_STATUS=$(git_prompt_status)
  7. [[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS"
  8. echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
  9. }
  10. PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(my_git_prompt_info)%{$reset_color%}%B»%b '
  11. RPS1="${return_code}"
  12. ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
  13. ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
  14. ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
  15. ZSH_THEME_GIT_PROMPT_ADDED="+"
  16. ZSH_THEME_GIT_PROMPT_MODIFIED="*"
  17. ZSH_THEME_GIT_PROMPT_RENAMED="~"
  18. ZSH_THEME_GIT_PROMPT_DELETED="!"
  19. ZSH_THEME_GIT_PROMPT_UNMERGED="?"