Compare commits
4 Commits
main
...
559012b3fe
Author | SHA1 | Date | |
---|---|---|---|
559012b3fe
|
|||
259a576d7e
|
|||
ab0ce2f188
|
|||
2d1a6f69fd
|
54
clean-home.zsh
Normal file
54
clean-home.zsh
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# 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"
|
||||||
|
|
||||||
|
# Minetest
|
||||||
|
export MINETEST_USER_PATH="${XDG_DATA_HOME}/minetest"
|
8
init.zsh
8
init.zsh
@ -1,7 +1,8 @@
|
|||||||
# Main zsh config file
|
# Main zsh config file
|
||||||
|
|
||||||
# Enable completions
|
# Enable completions
|
||||||
autoload -U compinit && compinit
|
autoload -U compinit
|
||||||
|
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
||||||
|
|
||||||
# Some utility stuff
|
# Some utility stuff
|
||||||
ZSH_PLUGIN_DIR="${ZSH_CONFIG_DIR}/plugins"
|
ZSH_PLUGIN_DIR="${ZSH_CONFIG_DIR}/plugins"
|
||||||
@ -15,12 +16,15 @@ function cmd_exists {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# User configuration file
|
# User configuration file
|
||||||
[[ -v ZSH_USER_DIR ]] || ZSH_USER_DIR="${HOME}/.zsh.d"
|
[[ -v ZSH_USER_DIR ]] || ZSH_USER_DIR="${HOME}/.config/zsh"
|
||||||
# source_user_file <name>
|
# source_user_file <name>
|
||||||
function source_user_file {
|
function source_user_file {
|
||||||
[ -e "${ZSH_USER_DIR}/${1}" ] && source "${ZSH_USER_DIR}/${1}"
|
[ -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
|
# Load user early init file
|
||||||
source_user_file "early-init.zsh"
|
source_user_file "early-init.zsh"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user