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.

110 lines
3.9 KiB

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