theme-and-appearance.zsh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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, test if "colorls" is installed (this one supports colors);
  14. # otherwise, leave ls as is, because OpenBSD's ls doesn't support -G
  15. colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G'
  16. else
  17. ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
  18. fi
  19. fi
  20. #setopt no_beep
  21. setopt auto_cd
  22. setopt multios
  23. setopt cdablevars
  24. if [[ x$WINDOW != x ]]
  25. then
  26. SCREEN_NO="%B$WINDOW%b "
  27. else
  28. SCREEN_NO=""
  29. fi
  30. # Apply theming defaults
  31. PS1="%n@%m:%~%# "
  32. # git theming default: Variables for theming the git info prompt
  33. ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of the prompt, before the branch name
  34. ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt
  35. ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty
  36. ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean
  37. # Setup the prompt with pretty colors
  38. setopt prompt_subst