Add dotfile move config

This commit is contained in:
Alexander Rosenberg 2023-05-19 23:39:17 -07:00
parent aadd42198f
commit 2d1a6f69fd
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
3 changed files with 58 additions and 1 deletions

2
.zshrc Normal file
View File

@ -0,0 +1,2 @@
export ZSH_CONFIG_DIR="${ZDOTDIR}"
source "${ZSH_CONFIG_DIR}/init.zsh"

51
clean-home.zsh Normal file
View File

@ -0,0 +1,51 @@
# XDG standard
export XDG_DATA_HOME="${HOME}/.local/share"
export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_STATE_HOME="${HOME}/.local/state"
export XDG_CACHE_HOME="${HOME}/.cache"
# Android studio and cli
export ANDROID_HOME="${XDG_DATA_HOME}/android"
# Cargo
export CARGO_HOME="${XDG_DATA_HOME}/cargo"
# Cuda cache
export CUDA_CACHE_PATH="${XDG_CACHE_HOME}/nv"
# GnuPG
export GNUPGHOME="${XDG_DATA_HOME}/gnupg"
# Go
export GOPATH="${XDG_DATA_HOME}/go"
# Gradle
export GRADLE_USER_HOME="${XDG_DATA_HOME}/gradle"
# GTK2
export GTK2_RC_FILES="${XDG_CONFIG_HOME}/gtk-2.0/gtkrc"
# Less history
[[ -d "${XDG_CACHE_HOME}/less" ]] || mkdir "${XDG_CACHE_HOME}/less"
export LESSHISTFILE="${XDG_CACHE_HOME}/less/history"
# Maxima
export MAXIMA_USERDIR="${XDG_CONFIG_HOME}/maxima"
# NPM
export NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME}/npm/npmrc"
# Pass
export PASSWORD_STORE_DIR="${XDG_DATA_HOME}/pass"
# Python and python history
export PYTHONSTARTUP="${XDG_CONFIG_HOME}/python/pythonrc"
# SQLite history
export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history"
# Wine
export WINEPREFIX="${XDG_DATA_HOME}/wine"
# XAuthority
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority

View File

@ -1,7 +1,8 @@
# Main zsh config file
# Enable completions
autoload -U compinit && compinit
autoload -U compinit
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
# Some utility stuff
ZSH_PLUGIN_DIR="${ZSH_CONFIG_DIR}/plugins"
@ -21,6 +22,9 @@ function source_user_file {
[ -e "${ZSH_USER_DIR}/${1}" ] && source "${ZSH_USER_DIR}/${1}"
}
# Clean up home directory
source "${ZSH_CONFIG_DIR}/clean-home.zsh"
# Load user early init file
source_user_file "early-init.zsh"