-
Notifications
You must be signed in to change notification settings - Fork 3
/
dot_bash_profile
99 lines (83 loc) · 3.99 KB
/
dot_bash_profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# 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 Neovim as the default editor and diff viewer.
export EDITOR="nvim"
export VISUAL="$EDITOR"
export DIFFPROG="nvim -d"
# Enable incremental search with smart case and decrease the tab size in less.
export LESS="-R --incsearch --ignore-case --tabs=2"
if [[ "$(uname -n)" != "yggdrasill" ]]; then
# Direct programs that expect a Docker daemon socket to Podman's compatibile
# 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
if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then
# Force GTK 3 and 4 to use a file dialog (and other things) that is native to
# the current desktop environment. Note that this doesn't necessarily mean
# that a GTK application will use native file dialogs unless it uses the
# FileChooserNative API (or FileDialog in GTK 4.10 or greater). For more
# information, see the GTK documentation and the XDG Portals specification.
export GTK_USE_PORTAL=1
# The above environment variable was replaced by the below in GTK 4.7.1, but I
# keep the old one set (for now) for any software using GTK 3 or an older
# version of GTK 4. See: https://docs.gtk.org/gtk4/running.html#gdk_debug
export GDK_DEBUG=portals
# Force Firefox to use Wayland.
export MOZ_ENABLE_WAYLAND=1
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