refactor: zshrc now sets xdg-vars
This commit is contained in:
parent
840d64b6aa
commit
49cb10b4c4
22
dots/.zshrc
22
dots/.zshrc
@ -1,3 +1,23 @@
|
||||
#!/bin/zsh
|
||||
|
||||
source ~/.config/zsh/zsh
|
||||
set-xdg-vars() {
|
||||
# Based on https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
# and https://wiki.archlinux.org/title/XDG_Base_Directory
|
||||
|
||||
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||
export XDG_BIN_HOME="${HOME}/.local/bin"
|
||||
export XDG_CACHE_HOME="${HOME}/.cache"
|
||||
export XDG_DATA_HOME="${HOME}/.local/share"
|
||||
export XDG_STATE_HOME="${HOME}/.local/state"
|
||||
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
|
||||
export XDG_CONFIG_DIRS="/etc/xdg"
|
||||
|
||||
# XDG_RUNTIME_DIR
|
||||
# Not set because this is generally resolved by the underlying system,
|
||||
# AKA shit can break bad if this is set wrong
|
||||
}
|
||||
|
||||
set-xdg-vars
|
||||
|
||||
export BASE_ZSH_CONFIG_DIR="${XDG_CONFIG_HOME}/zsh"
|
||||
source "${BASE_ZSH_CONFIG_DIR}/init.zsh"
|
||||
|
Loading…
Reference in New Issue
Block a user