feat(zsh): use XDG spec
This commit is contained in:
parent
1dc492dbab
commit
22f690b4bf
@ -1,18 +1,23 @@
|
|||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
configure() {
|
configure() {
|
||||||
autoload -U +X bashcompinit && bashcompinit
|
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||||
|
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
configure
|
||||||
local wkdir="${BASE_ZSH_CONFIG_DIR}/config"
|
local wkdir="${BASE_ZSH_CONFIG_DIR}/config"
|
||||||
source "${wkdir}/themes/init.zsh"
|
source "${wkdir}/themes/init.zsh"
|
||||||
source "${wkdir}/profile/init.zsh"
|
|
||||||
source "${wkdir}/style/init.zsh"
|
source "${wkdir}/style/init.zsh"
|
||||||
source "${wkdir}/omz/init.zsh"
|
source "${wkdir}/omz/init.zsh"
|
||||||
source "${wkdir}/plugins/init.zsh"
|
source "${wkdir}/plugins/init.zsh"
|
||||||
|
source "${wkdir}/profile/init.zsh"
|
||||||
source "${wkdir}/completions/init.zsh"
|
source "${wkdir}/completions/init.zsh"
|
||||||
configure
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init
|
init
|
||||||
|
@ -11,8 +11,9 @@ export ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
|||||||
|
|
||||||
### FZF ###
|
### FZF ###
|
||||||
function zvm_after_init() {
|
function zvm_after_init() {
|
||||||
[[ -r "${XDG_DATA_CONFIG}/fzf/fzf.zsh" ]] && source "${XDG_DATA_CONFIG}fzf/fzf.zsh"
|
[[ -r "${XDG_CONFIG_HOME}/fzf/fzf.zsh" ]] && source "${XDG_CONFIG_HOME}fzf/fzf.zsh"
|
||||||
}
|
}
|
||||||
|
[[ -r "${XDG_CONFIG_HOME}/fzf/fzf.zsh" ]] && source "${XDG_CONFIG_HOME}fzf/fzf.zsh"
|
||||||
export FZF_DEFAULT_COMMAND='fd --hidden --exclude .git --color=always'
|
export FZF_DEFAULT_COMMAND='fd --hidden --exclude .git --color=always'
|
||||||
export FZF_DEFAULT_OPTS="--height=80% --layout=reverse --info=inline --border --margin=1 --ansi"
|
export FZF_DEFAULT_OPTS="--height=80% --layout=reverse --info=inline --border --margin=1 --ansi"
|
||||||
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
||||||
|
Loading…
Reference in New Issue
Block a user