diff --git a/.zshrc b/.zshrc index 13dbab4..adcfc29 100644 --- a/.zshrc +++ b/.zshrc @@ -4,14 +4,15 @@ echo '\033[0;35m /w '$(awk -F "=" '/^NAME/ {print $2}' < /etc/os-release ) echo '\033[0;34m @ '$HOST #Install zinit if no zinit is present -if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then +ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" +if [[ ! -f $ZINIT_HOME/zinit.zsh ]]; then print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f" command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit" command git clone https://github.com/zdharma-continuum/zinit "$HOME/.zinit/bin" && \ print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \ print -P "%F{160}▓▒░ The clone has failed.%f%b" fi -source "$HOME/.zinit/bin/zinit.zsh" +source "$ZINIT_HOME/zinit.zsh" zinit ice lucid wait zinit light zdharma-continuum/fast-syntax-highlighting