# shellcheck shell=bash # These do not need to be explicitly set, but they are useful to reference here # and in scripts. export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" export XDG_STATE_HOME="$HOME/.local/state" export XDG_CACHE_HOME="$HOME/.cache" # Here I try to wrangle misbehaving programs into complying with the XDG base # directories standard. A lot of these environment variables simply move the # program's catch-all directories from $HOME to $XDG_DATA_HOME, which while not # _entirely_ standards compliant, at least cleans up $HOME. export RUSTUP_HOME="$XDG_DATA_HOME/rustup" export CARGO_HOME="$XDG_DATA_HOME/cargo" export GHCUP_USE_XDG_DIRS="yes" export STACK_ROOT="$XDG_DATA_HOME/stack" export MIX_XDG="true" export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle" export GOPATH="$XDG_DATA_HOME/go" export GOMODCACHE="$XDG_CACHE_HOME/go/mod" export IPYTHONDIR="$XDG_CONFIG_HOME/jupyter" export RUFF_CACHE_DIR="$XDG_CACHE_HOME/ruff" export PYLINTHOME="$XDG_CACHE_HOME/pylint" export TEXMFHOME="$XDG_DATA_HOME/texlive" export TEXMFCONFIG="$XDG_CONFIG_HOME/texlive" export TEXMFVAR="$XDG_CACHE_HOME/texlive" export GDBHISTORY="$XDG_DATA_HOME/gdb/history" export NODE_REPL_HISTORY="$XDG_DATA_HOME/node/history" export WGETRC="$XDG_CONFIG_HOME/wgetrc" export PARALLEL_HOME="$XDG_DATA_HOME/parallel" export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc" # One could argue that this should be in $XDG_CONFIG_HOME, but as far as I can # tell, these files are generated in a machine-specific way. export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$XDG_DATA_HOME/java" # Prevent Go from automatically downloading a newer toolchain. export GOTOOLCHAIN="local" # Set the QMK repository location. export QMK_HOME="$HOME/Documents/Code/qmk" # Add the XDG BaseDir bin directory and the Cargo bin directory to $PATH. export PATH="$HOME/.local/bin:$CARGO_HOME/bin:$GOPATH/bin:$PATH" # Add the Rust toolchain man pages to $MANPATH. export MANPATH="$RUSTUP_HOME/toolchains/stable-x86_64-unknown-linux-gnu/share/man:$(manpath)" # Set default programs. export EDITOR="nvim" export VISUAL="$EDITOR" export DIFFPROG="nvim -d" export PAGER="less" # Configure less to use incremental search with smart case, decrease the tab # size, and quit if the content fits on one screen. export LESS="-R --incsearch --ignore-case --tabs=2 --quit-if-one-screen" if [[ "$(uname -n)" != "yggdrasill" ]]; then # Direct programs that expect a Docker daemon socket to Podman's compatible # stand-in. export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock" else # On my work laptop, I use Docker instead of Podman. Because of code of ours # that relies on Docker Compose's old container naming scheme, the following # needs to be set to revert to the old scheme. export COMPOSE_COMPATIBILITY=1 export GL_HOST="gitlab.sitehost.co.nz" fi # This is not needed on GNOME as it includes its own agent. if [[ "$XDG_SESSION_DESKTOP" != "gnome" ]]; then # Wire up the SSH agent for persisting SSH credentials. export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" fi # Improve font rendering in Java applications. export _JAVA_OPTIONS="$_JAVA_OPTIONS -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true" # Source ~/.bashrc if it exists. # shellcheck source=/home/severen/.bashrc [[ -f ~/.bashrc ]] && . ~/.bashrc # vim: ft=bash