theme-and-appearance.zsh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # ls colors
  2. autoload -U colors && colors
  3. export LSCOLORS="Gxfxcxdxbxegedabagacad"
  4. # Enable ls colors
  5. if [ "$DISABLE_LS_COLORS" != "true" ]
  6. then
  7. # Find the option for using colors in ls, depending on the version: Linux or BSD
  8. if [[ "$(uname -s)" == "NetBSD" ]]; then
  9. # On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors);
  10. # otherwise, leave ls as is, because NetBSD's ls doesn't support -G
  11. gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty'
  12. elif [[ "$(uname -s)" == "OpenBSD" ]]; then
  13. # On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base,
  14. # with color and multibyte support) are available from ports. "colorls"
  15. # will be installed on purpose and can't be pulled in by installing
  16. # coreutils, so prefer it to "gls".
  17. gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty'
  18. colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G'
  19. else
  20. ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
  21. fi
  22. fi
  23. #setopt no_beep
  24. setopt auto_cd
  25. setopt multios
  26. setopt cdablevars
  27. if [[ x$WINDOW != x ]]
  28. then
  29. SCREEN_NO="%B$WINDOW%b "
  30. else
  31. SCREEN_NO=""
  32. fi
  33. # Apply theming defaults
  34. PS1="%n@%m:%~%# "
  35. # git theming default: Variables for theming the git info prompt
  36. ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of the prompt, before the branch name
  37. ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt
  38. ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty
  39. ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean
  40. # Setup the prompt with pretty colors
  41. setopt prompt_subst