theme-and-appearance.zsh 1.5 KB

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