.zshenv 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. TERMINAL=alacritty
  6. #if [ -S ~/.urxvt/urxvtd-x1c ]; then
  7. # TERMINAL=urxvtc
  8. #fi
  9. TERMCMD=$TERMINAL
  10. if [ -d ~/git/mysite ]; then
  11. export SITE="$HOME/git/mysite"
  12. export post="$SITE/content/posts"
  13. fi
  14. if [ -d ~/.local/bin ]; then
  15. export mpath="$HOME/.local/bin/"
  16. fi
  17. if [ -d ~/.perl5 ]; then
  18. export PERL5LIB="~/.perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"
  19. export PERL_LOCAL_LIB_ROOT="~/.perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"
  20. export PERL_MB_OPT="--install_base \"~/.perl5\""
  21. export PERL_MM_OPT="INSTALL_BASE=~/.perl5"
  22. fi
  23. # Set editor
  24. set_editor() {
  25. export EDITOR="$@"
  26. export GIT_EDITOR="$@"
  27. export VISUAL="$@"
  28. alias v="$@"
  29. }
  30. # Get editor
  31. get_editor()
  32. {
  33. if (( $+commands[nvim] )); then
  34. set_editor $(which nvim)
  35. elif
  36. (( $+commands[vim] )); then
  37. set_editor $(which vim)
  38. elif (( $+commands[vi] )); then
  39. set_editor $(which vi)
  40. fi
  41. }
  42. get_editor
  43. XDG_DATA_HOME=$HOME/.local/share
  44. XDG_CONFIG_HOME=$HOME/.config
  45. XDG_CACHE_HOME=$HOME/.cache
  46. XDG_RUNTIME_DIR=/run/user/`id -u`
  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="$XDG_RUNTIME_DIR/ssh-agent.socket"
  71. #gpg-connect-agent updatestartuptty /bye >/dev/null
  72. export PYENV_ROOT="$HOME/.pyenv"
  73. export _JAVA_AWT_WM_NONREPARENTING=1
  74. 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}"
  75. export GIT_DISCOVERY_ACROSS_FILESYSTEM=true