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.

28 lines
945 B

3 years ago
  1. autoload -Uz colors && colors
  2. autoload -Uz vcs_info
  3. zstyle ':vcs_info:*' check-for-changes true
  4. zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
  5. zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
  6. zstyle ':vcs_info:*' actionformats '%F{5}(%F{2}%b%F{3}|%F{1}%a%c%u%m%F{5})%f '
  7. zstyle ':vcs_info:*' formats '%F{5}(%F{2}%b%c%u%m%F{5})%f '
  8. zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
  9. zstyle ':vcs_info:*' enable git cvs svn
  10. zstyle ':vcs_info:git*+set-message:*' hooks untracked-git
  11. +vi-untracked-git() {
  12. if command git status --porcelain 2>/dev/null | command grep -q '??'; then
  13. hook_com[misc]='%F{red}?'
  14. else
  15. hook_com[misc]=''
  16. fi
  17. }
  18. gentoo_precmd() {
  19. vcs_info
  20. }
  21. autoload -U add-zsh-hook
  22. add-zsh-hook precmd gentoo_precmd
  23. PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%F{blue}%(!.#.$)%k%b%f '