From 96c477972efc508b7f5e9e682feeb1a446083496 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 18 Apr 2024 20:47:16 +0200 Subject: [PATCH] zsh: switch to antidote --- .config/zsh/plugins.zsh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.config/zsh/plugins.zsh b/.config/zsh/plugins.zsh index aaa03c9..8488bc3 100644 --- a/.config/zsh/plugins.zsh +++ b/.config/zsh/plugins.zsh @@ -68,13 +68,14 @@ if [[ -n ${_my_plugins_dist} ]]; then fi [[ -z ${_my_plugins} ]] && return -# If there are plugins not handled by the package manager, use antibody -if command -v antibody > /dev/null; then +# If there are plugins not handled by the package manager, use antidote +zstyle ':antidote:compatibility-mode' 'antibody' # TODO: switch to native mode +if command -v antidote > /dev/null; then zmodload zsh/stat zmodload zsh/datetime - local plugin_cache_dir="$(antibody home)" - export ZSH_PLUGIN_SOURCE="${plugin_cache_dir}/antibody-plugins.zsh" + local plugin_cache_dir="$(antidote home)" + export ZSH_PLUGIN_SOURCE="${plugin_cache_dir}/antidote-plugins.zsh" if [[ -f "${ZSH_PLUGIN_SOURCE}" ]] \ && [[ $(zstat +size "${ZSH_PLUGIN_SOURCE}") -ne 0 ]]; then @@ -83,17 +84,17 @@ if command -v antibody > /dev/null; then # Update plugins every 10 days if [[ $(( ${_now} - ${_plugins_modified} - 60 * 60 * 24 * 10)) -gt 0 ]]; then print "\e[3;95mUpdating plugins…\e[0m" - antibody update --parallelism=$(nproc --ignore=1) \ + antidote update --parallelism=$(nproc --ignore=1) \ && touch "${ZSH_PLUGIN_SOURCE}" fi else print "\e[3;95mInstalling plugins…\e[0m" mkdir -p "${plugin_cache_dir}" - antibody bundle --parallelism=$(nproc --ignore=1) \ + antidote bundle --parallelism=$(nproc --ignore=1) \ <<<$(print -l ${_my_plugins}) > "${ZSH_PLUGIN_SOURCE}" fi else - print -u 2 "\e[7;95mantibody not found.\e[0m" + print -u 2 "\e[7;95mantidote not found.\e[0m" fi }