Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.7 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #!/bin/bash
  2. # Vars for some bugs and applications
  3. export QT_QPA_PLATFORMTHEME="qt5ct"
  4. export _JAVA_AWT_WM_NONREPARENTING=1
  5. export AWT_TOOLKIT=MToolkit
  6. # Environment variables
  7. export SHELL=/bin/zsh
  8. export TERMINAL=/usr/local/bin/st
  9. export BROWSER=firefox
  10. export EDITOR=nvim
  11. export OPENER=xdg-open
  12. export DEFAULT_RECIPIENT="yigitcolakoglu@hotmail.com"
  13. # Set XDG Directories
  14. export XDG_DATA_HOME="$HOME"/.local/share
  15. export XDG_CONFIG_HOME="$HOME"/.config
  16. export XDG_CACHE_HOME="$HOME"/.cache
  17. export XDG_DATA_DIRS="/usr/local/share:/usr/share"
  18. export XDG_CONFIG_DIRS="/etc/xdg"
  19. # Cleanup Home Directory
  20. export HISTFILE="$XDG_DATA_HOME"/history
  21. export TMUX_PLUGIN_MANAGER_PATH="$XDG_DATA_HOME"/tmux/plugins
  22. export BORG_KEYS_DIR="$XDG_DATA_HOME"/keys/borg
  23. export CARGO_HOME="$XDG_DATA_HOME"/cargo
  24. export GOPATH="$XDG_DATA_HOME"/go
  25. export ANDROID_HOME="$XDG_DATA_HOME"/Sdk
  26. export FLUTTER_HOME="$XDG_DATA_HOME"/flutter
  27. export LEIN_HOME="$XDG_DATA_HOME"/lein
  28. export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
  29. export NVM_DIR="$XDG_DATA_HOME"/nvm
  30. export GNUPGHOME="$XDG_DATA_HOME"/gnupg
  31. export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc
  32. export IMAPFILTER_CONFIG="$XDG_CONFIG_HOME/imapfilter/config.lua"
  33. export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME/.config}/vim/vimrc"
  34. export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history
  35. export TASKDATA="$XDG_DATA_HOME"/task
  36. export TASKRC="$XDG_CONFIG_HOME"/task/taskrc
  37. export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat
  38. export LESSKEY="$XDG_CONFIG_HOME"/less/lesskey
  39. export LESSHISTFILE=-
  40. export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc
  41. export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug
  42. export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
  43. export IPYTHONDIR="$XDG_CONFIG_HOME"/jupyter
  44. export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter
  45. export PYLINTHOME="$XDG_CACHE_HOME"/pylint
  46. export WGETRC="$XDG_CONFIG_HOME/wgetrc"
  47. export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
  48. export RANDFILE="$XDG_DATA_HOME"/openssl/rnd
  49. export _Z_DATA="$XDG_DATA_HOME/z"
  50. export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
  51. export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime"
  52. export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc
  53. export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
  54. export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
  55. export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
  56. export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
  57. export PASSWORD_STORE_ENABLE_EXTENSIONS=true
  58. export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
  59. export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
  60. # Setup PATH
  61. export PATH=$ANDROID_HOME/tools:$PATH
  62. export PATH=$ANDROID_HOME/platform-tools:$PATH
  63. export PATH=$FLUTTER_HOME/bin:$PATH
  64. export PATH="$PATH:/usr/lib/w3m:$HOME/.local/bin:$HOME/.gem/ruby/2.7.0/bin:$GOPATH/bin:$GOPATH/binexport"
  65. export CPATH=/usr/include/opencv4
  66. # Setup LF Icons (Doing this everytime lf start might cause some overhead)
  67. LF_ICONS=$(sed ~/.config/lf/diricons \
  68. -e '/^[ \t]*#/d' \
  69. -e '/^[ \t]*$/d' \
  70. -e 's/[ \t]\+/=/g' \
  71. -e 's/$/ /')
  72. LF_ICONS=${LF_ICONS//$'\n'/:}
  73. export LF_ICONS
  74. # Setup dbus
  75. case "$(readlink -f /sbin/init)" in
  76. *systemd*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
  77. esac
  78. # Setup SSH
  79. if [ ! "$SSH_AUTH_SOCK" ]; then
  80. eval "$(ssh-agent | head -n 2)"
  81. grep -slR "PRIVATE" ~/.ssh/ | xargs ssh-add > /dev/null 2> /dev/null
  82. fi
  83. # Start xinit if logged in from tty1
  84. if [ "$DISPLAY" = "" ] && [ "$(tty)" = /dev/tty1 ]; then
  85. if [ "$DBUS_SESSION_BUS_ADDRESS" = "" ] && [ ! $(command -v dbus-run-session) = "" ]; then
  86. # exec dbus-run-session xinit 2> $XDG_RUNTIME_DIR/xinit.err > $XDG_RUNTIME_DIR/xinit
  87. exec xinit 2> $XDG_RUNTIME_DIR/xinit.err > $XDG_RUNTIME_DIR/xinit
  88. else
  89. exec xinit 2> $XDG_RUNTIME_DIR/xinit.err > $XDG_RUNTIME_DIR/xinit
  90. fi
  91. exit
  92. fi