#!/bin/sh ##--Environment variables--## ## Modified env vars. export PATH="$PATH:$(du -L "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')" ## Default programs. export EDITOR="nvim" export TERMINAL="alacritty" export BROWSER="firefox" export READER="zathura" export FILE="ranger" export STATUSBAR="i3blocks" export MUSIC="spotify" export MAILMGR="thunderbird" export MSGCHAT="telegram-desktop" export SSMGR="flameshot" ## ~/ cleanup. # XDG base directory specification found in: # https://wiki.archlinux.org/index.php/XDG_Base_Directory export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" export XDG_DATA_HOME="$HOME/.local/share" # Ruby/gem. export GEM_HOME="$XDG_CONFIG_HOME/gem" export GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem" export PATH="$PATH:$GEM_HOME/bin" # Node.js. export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" export NVM_DIR="$XDG_DATA_HOME/nvm" # Ncurses. export TERMINFO="$XDG_DATA_HOME/terminfo" export TERMINFO_DIRS="$XDG_DATA_HOME/terminfo:/usr/share/terminfo" # GTK. export GTK_RC_FILES="$XDG_CONFIG_HOME/gtk-1.0/gtkrc" export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc" # Other. export ZDOTDIR="$XDG_CONFIG_HOME/zsh" export CARGO_HOME="$XDG_DATA_HOME/cargo" export GOPATH="$XDG_DATA_HOME/go" export LESSHISTFILE="-" export HISTFILE="$XDG_DATA_HOME/history" export WGETRC="$XDG_CONFIG_HOME/wgetrc" # export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" # export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config" # export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc" # export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc" # export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg" # export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default" # export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi" # export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store" # export TMUX_TMPDIR="$XDG_RUNTIME_DIR" # export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android" # export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg" # export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison" # export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat" ## Ranger. export RANGER_LOAD_DEFAULT_RC=FALSE ## CUDA. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/cuda/lib64" ## Tensorflow. export TF_CPP_MIN_LOG_LEVEL="0" # 0 = all messages are logged (default behavior) # 1 = INFO messages are not printed # 2 = INFO and WARNING messages are not printed # 3 = INFO, WARNING, and ERROR messages are not printed ## Ruby if command -v ruby >/dev/null 2>&1; then export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin" fi ## Jupyter lab. export JUPYTER_CONFIG_DIR=$HOME/.config/jupyter export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab ## iPython. export IPYTHONDIR=$HOME/.config/ipython ## TexLive. export TEXMFDIST=/usr/share/texmf-dist export TEXMFHOME=$HOME/.local/share/texmf ## qBittorrent. export QT_AUTO_SCREEN_SCALE_FACTOR=0 ##--Start X automatically--## # Following: https://wiki.archlinux.org/index.php/Xinit#Autostart_X_at_login # More on autologin and autostarting x without a DM: # https://forums.bunsenlabs.org/viewtopic.php?id=5544 # Also LS's config could be important here: # ttps://github.com/LukeSmithxyz/voidrice/blob/master/.config/shell/profile if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then exec startx fi