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.

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