.zshenv 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. typeset -U path
  2. path=(~/.cargo/bin ~/.perl5/bin ~/.gem/ruby/2.7.0/bin ~/.local/bin ~/.local/lib ~/.pyenv/bin /usr/sbin /usr/bin/vendor_perl /sbin $path[@])
  3. BROWSER=$(which google-chrome-stable)
  4. # Set Terminal
  5. if [ -z "$TERMINAL" ]; then
  6. if (( $+commands[alacritty] )); then
  7. TERMINAL=alacritty
  8. fi
  9. fi
  10. TERMCMD=$TERMINAL
  11. if [ -d ~/git/mysite ]; then
  12. export SITE="$HOME/git/mysite"
  13. export post="$SITE/content/posts"
  14. fi
  15. if [ -d ~/.local/bin ]; then
  16. export mpath="$HOME/.local/bin/"
  17. fi
  18. if [ -d ~/.perl5 ]; then
  19. export PERL5LIB="~/.perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"
  20. export PERL_LOCAL_LIB_ROOT="~/.perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"
  21. export PERL_MB_OPT="--install_base \"~/.perl5\""
  22. export PERL_MM_OPT="INSTALL_BASE=~/.perl5"
  23. fi
  24. # Set editor
  25. set_editor() {
  26. export EDITOR="$@"
  27. export GIT_EDITOR="$@"
  28. export VISUAL="$@"
  29. alias v="$@"
  30. }
  31. # Get editor
  32. get_editor()
  33. {
  34. if (( $+commands[nvim] )); then
  35. set_editor $(which nvim)
  36. elif
  37. (( $+commands[vim] )); then
  38. set_editor $(which vim)
  39. elif (( $+commands[vi] )); then
  40. set_editor $(which vi)
  41. fi
  42. }
  43. get_editor
  44. XDG_DATA_HOME=$HOME/.local/share
  45. XDG_CONFIG_HOME=$HOME/.config
  46. XDG_CACHE_HOME=$HOME/.cache
  47. if command -v pyenv 1>/dev/null 2>&1; then
  48. eval "$(pyenv init -)"
  49. fi
  50. #if [ "$TERM" = "linux" ]; then
  51. # echo -en "\e]P0000000" #black
  52. # echo -en "\e]P85e5e5e" #darkgrey
  53. # echo -en "\e]P18a2f58" #darkred
  54. # echo -en "\e]P9cf4f88" #red
  55. # echo -en "\e]P2287373" #darkgreen
  56. # echo -en "\e]PA53a6a6" #green
  57. # echo -en "\e]P3914e89" #darkyellow
  58. # echo -en "\e]PBbf85cc" #yellow
  59. # echo -en "\e]P4395573" #darkblue
  60. # echo -en "\e]PC4779b3" #blue
  61. # echo -en "\e]P55e468c" #darkmagenta
  62. # echo -en "\e]PD7f62b3" #magenta
  63. # echo -en "\e]P62b7694" #darkcyan
  64. # echo -en "\e]PE47959e" #cyan
  65. # echo -en "\e]P7899ca1" #lightgrey
  66. # echo -en "\e]PFc0c0c0" #white
  67. # clear
  68. #fi
  69. export GPG_TTY=$(tty)
  70. export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
  71. export PYENV_ROOT="$HOME/.pyenv"
  72. export _JAVA_AWT_WM_NONREPARENTING=1
  73. export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel ${_JAVA_OPTIONS}"
  74. export GIT_DISCOVERY_ACROSS_FILESYSTEM=true