refactor: immprove directory structure

This commit is contained in:
Price Hiller 2022-07-31 22:29:48 -05:00
parent 442453eea7
commit 840d64b6aa
848 changed files with 25 additions and 47 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env zsh
init() {
local wkdir="${BASE_ZSH_CONFIG_DIR}/config/completions"
local wkdir="${BASE_ZSH_CONFIG_DIR}/completions"
FPATH="${FPATH}:${wkdir}/completions"
autoload -Uz compinit

View File

@ -1,37 +0,0 @@
#!/usr/bin/env zsh
configure() {
autoload -U +X bashcompinit && bashcompinit
}
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
}
init() {
set-xdg-vars
local wkdir="${BASE_ZSH_CONFIG_DIR}/config"
source "${wkdir}/themes/init.zsh"
source "${wkdir}/profile/init.zsh"
source "${wkdir}/style/init.zsh"
source "${wkdir}/omz/init.zsh"
source "${wkdir}/plugins/init.zsh"
source "${wkdir}/completions/init.zsh"
configure
}
init

19
dots/.config/zsh/init.zsh Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env zsh
configure() {
autoload -U +X bashcompinit && bashcompinit
}
init() {
local wkdir="${BASE_ZSH_CONFIG_DIR}"
source "${wkdir}/themes/init.zsh"
source "${wkdir}/profile/init.zsh"
source "${wkdir}/style/init.zsh"
source "${wkdir}/omz/init.zsh"
source "${wkdir}/plugins/init.zsh"
source "${wkdir}/completions/init.zsh"
configure
}
init

View File

@ -35,7 +35,7 @@ configure() {
}
init() {
local wkdir="${BASE_ZSH_CONFIG_DIR}/config/omz"
local wkdir="${BASE_ZSH_CONFIG_DIR}/omz"
export ZSH="${XDG_DATA_HOME}/omz"
export ZSH_CUSTOM="${wkdir}/"

Some files were not shown because too many files have changed in this diff Show More