Completed this round of $HOME cleanup

This commit is contained in:
Andrew Scott 2023-03-29 22:21:02 -04:00
parent d46f86661a
commit cb4da2d488
Signed by: a
GPG key ID: 7CD5A5977E4931C1
4 changed files with 37 additions and 4 deletions

View file

@ -14,6 +14,7 @@ export EDITOR=nvim
alias nv=nvim
alias r="urxvt -name Ranger -e ranger & disown"
alias kssh="/usr/bin/kitty +kitten ssh"
alias wget=wget --hsts-file="$XDG_STATE_HOME/wget-hsts"
neofetch

View file

@ -70,7 +70,7 @@ grep -x sxhkd > /dev/null || sxhkd &
xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
dunst &
xsettingsd &
sh ~/.fehbg &
sh $HOME/.local/bin/fehbg &
dex -a &
redshift -r &
{{- if (or (eq .chezmoi.hostname "helix") (eq .chezmoi.hostname "hydrus")) }}

View file

@ -0,0 +1,17 @@
import os
import atexit
import readline
history = os.path.join(os.environ['XDG_STATE_HOME'], 'python_history')
try:
readline.read_history_file(history)
except OSError:
pass
def write_history():
try:
readline.write_history_file(history)
except OSError:
pass
atexit.register(write_history)

View file

@ -1,3 +1,7 @@
#
# ~/.profile
#
# Ensure XDG env vars are set correctly
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
@ -31,7 +35,7 @@ export GDK_SCALE=2 GDK_DPI_SCALE=0.50 ghex
## No littering in $HOME!
# bash
export HISTFILE="${XDG_STATE_HOME}"/bash_history
export HISTFILE="$XDG_STATE_HOME"/bash_history
# cargo
export CARGO_HOME="$XDG_DATA_HOME"/cargo
@ -40,12 +44,23 @@ export CARGO_HOME="$XDG_DATA_HOME"/cargo
export GOPATH="$XDG_DATA_HOME"/go
export GOMODCACHE="$XDG_CACHE_HOME"/go/mod
# GTK2
# gpg
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
# gtk2
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
# Node
# node
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
# python
export PYTHONSTARTUP="$XDG_CONFIG_HOME"/python/pythonrc
export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME"/python
export PYTHONUSERBASE=$XDG_DATA_HOME/python
# wine
export WINEPREFIX="$XDG_DATA_HOME"/wine
# Xorg
export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority