24 lines
731 B
Bash
24 lines
731 B
Bash
#!/bin/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"
|