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.

100 lines
3.5 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 VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME/.config}/vim/vimrc"
  33. export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history
  34. export TASKDATA="$XDG_DATA_HOME"/task
  35. export TASKRC="$XDG_CONFIG_HOME"/task/taskrc
  36. export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat
  37. export LESSKEY="$XDG_CONFIG_HOME"/less/lesskey
  38. export LESSHISTFILE=-
  39. export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc
  40. export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug
  41. export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
  42. export IPYTHONDIR="$XDG_CONFIG_HOME"/jupyter
  43. export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter
  44. export PYLINTHOME="$XDG_CACHE_HOME"/pylint
  45. export WGETRC="$XDG_CONFIG_HOME/wgetrc"
  46. export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
  47. export RANDFILE="$XDG_DATA_HOME"/openssl/rnd
  48. export _Z_DATA="$XDG_DATA_HOME/z"
  49. export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
  50. export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime"
  51. export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc
  52. export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
  53. export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
  54. export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
  55. export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
  56. export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
  57. export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
  58. # Setup PATH
  59. export PATH=$ANDROID_HOME/tools:$PATH
  60. export PATH=$ANDROID_HOME/platform-tools:$PATH
  61. export PATH=$FLUTTER_HOME/bin:$PATH
  62. export PATH="$PATH:/usr/lib/w3m:$HOME/.local/bin:$HOME/.gem/ruby/2.7.0/bin:$GOPATH/bin:$GOPATH/binexport"
  63. export CPATH=/usr/include/opencv4
  64. # Setup LF Icons (Doing this everytime lf start might cause some overhead)
  65. LF_ICONS=$(sed ~/.config/lf/diricons \
  66. -e '/^[ \t]*#/d' \
  67. -e '/^[ \t]*$/d' \
  68. -e 's/[ \t]\+/=/g' \
  69. -e 's/$/ /')
  70. LF_ICONS=${LF_ICONS//$'\n'/:}
  71. export LF_ICONS
  72. # Setup dbus
  73. case "$(readlink -f /sbin/init)" in
  74. *systemd*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
  75. esac
  76. # Setup SSH
  77. if [ ! "$SSH_AUTH_SOCK" ]; then
  78. eval "$(ssh-agent | head -n 2)"
  79. grep -slR "PRIVATE" ~/.ssh/ | xargs ssh-add > /dev/null 2> /dev/null
  80. fi
  81. # Start xinit if logged in from tty1
  82. if [ "$DISPLAY" = "" ] && [ "$(tty)" = /dev/tty1 ]; then
  83. if [ "$DBUS_SESSION_BUS_ADDRESS" = "" ] && [ ! $(command -v dbus-run-session) = "" ]; then
  84. exec dbus-run-session xinit 2> $XDG_RUNTIME_DIR/xinit.err > $XDG_RUNTIME_DIR/xinit
  85. else
  86. exec xinit 2> $XDG_RUNTIME_DIR/xinit.err > $XDG_RUNTIME_DIR/xinit
  87. fi
  88. exit
  89. fi