dotfiles/config/zsh/helpers/setup-antigen.zsh

24 lines
585 B
Bash
Raw Normal View History

2022-03-13 23:43:08 +01:00
zsh_dir=${XDG_CONFIG_HOME:-$HOME/.config}/zsh
antigen_dir=${ADOTDIR:-$XDG_DATA_HOME/zsh/antigen}
2022-08-06 21:24:34 +02:00
antigen_git="https://raw.githubusercontent.com/zsh-users/antigen/master/bin/antigen.zsh"
2022-03-13 23:43:08 +01:00
antigen_bin="${ADOTDIR}/antigen.zsh"
# Import angigen if present, or prompt to install if missing
if [[ -f $antigen_bin ]]; then
source $antigen_bin
else
if read -q "choice?Would you like to install Antigen now? (y/N)"; then
echo
mkdir -p $antigen_dir
2022-08-06 21:24:34 +02:00
curl -L $antigen_git > $antigen_bin
2022-03-13 23:43:08 +01:00
source $antigen_bin
fi
fi
# Set the ZSH prompt
antigen theme romkatv/powerlevel10k