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.

21 lines
789 B

3 years ago
  1. # name in folder (github)
  2. # ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right.
  3. function collapse_pwd {
  4. echo $(pwd | sed -e "s,^$HOME,~,")
  5. }
  6. function prompt_char {
  7. echo -n "%{$bg[white]%}%{$fg[red]%}"
  8. git branch >/dev/null 2>/dev/null && echo "±%{$reset_color%}" && return
  9. echo "≥%{$reset_color%}"
  10. }
  11. RIXIUS_PRE="%{$bg[white]%}%{$fg[red]%}"
  12. PROMPT='
  13. %{$RIXIUS_PRE%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info)
  14. $(prompt_char) '
  15. RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}'
  16. ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
  17. ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
  18. ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RIXIUS_PRE%}!%{$reset_color%}"
  19. ZSH_THEME_GIT_PROMPT_CLEAN=" %{$RIXIUS_PRE%}√%{$reset_color%}"