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.

116 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. # Environment variables
  13. export SHELL=/bin/zsh
  14. export TERMINAL=/usr/local/bin/st
  15. export BROWSER=chromium
  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/:$XDG_DATA_HOME/questasim/questasim/linux_x86_64"
  73. export CPATH=/usr/include/opencv4
  74. export LM_LICENSE_FILE=27017@flexserv1.tudelft.nl
  75. # Set zettelkasten directory
  76. export ZK_NOTEBOOK_DIR=~/Projects/Neocortex/content
  77. # Setup LF Icons (Doing this everytime lf start might cause some overhead)
  78. LF_ICONS=$(sed ~/.config/lf/diricons \
  79. -e '/^[ \t]*#/d' \
  80. -e '/^[ \t]*$/d' \
  81. -e 's/[ \t]\+/=/g' \
  82. -e 's/$/ /')
  83. LF_ICONS=${LF_ICONS//$'\n'/:}
  84. export LF_ICONS
  85. # Setup dbus
  86. case "$(readlink -f /sbin/init)" in
  87. *systemd*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
  88. esac
  89. # Setup SSH
  90. if [ ! "$SSH_AUTH_SOCK" ]; then
  91. eval "$(ssh-agent | head -n 2)"
  92. grep -slR "PRIVATE" ~/.ssh/ | xargs ssh-add > /dev/null 2> /dev/null
  93. fi
  94. # Start xinit if logged in from tty1
  95. if [ "$DISPLAY" = "" ] && [ "$(tty)" = /dev/tty1 ]; then
  96. if [ "$DBUS_SESSION_BUS_ADDRESS" = "" ] && [ ! $(command -v dbus-run-session) = "" ]; then
  97. exec dbus-run-session xinit 2> $XDG_RUNTIME_DIR/xinit.err > $XDG_RUNTIME_DIR/xinit
  98. else
  99. exec xinit 2> $XDG_RUNTIME_DIR/xinit.err > $XDG_RUNTIME_DIR/xinit
  100. fi
  101. exit
  102. fi