diff --git a/home/.zsh/plugins/autoupdate.zsh b/home/.zsh/plugins/autoupdate.zsh deleted file mode 100755 index 2fdaf4f..0000000 --- a/home/.zsh/plugins/autoupdate.zsh +++ /dev/null @@ -1,41 +0,0 @@ -_zplug-check-interval() { - now=$(date +%s) - if [ -f "${1}" ]; then - last_update=$(cat "${1}") - else - last_update=0 - fi - interval=$(expr ${now} - ${last_update}) - echo "${interval}" -} - -_zplug-check-for-updates() { - if [ -z "${ZPLUG_PLUGIN_UPDATE_DAYS}" ]; then - ZPLUG_PLUGIN_UPDATE_DAYS=14 - fi - - if [ -z "${ZPLUG_PLUGIN_UPDATE_FILE}" ]; then - ZPLUG_PLUGIN_UPDATE_FILE="${ZPLUG_HOME:-}/.zplug_plugin_lastupdate" - fi - - local day_seconds=$(expr 24 \* 60 \* 60) - local plugins_seconds=$(expr ${day_seconds} \* ${ZPLUG_PLUGIN_UPDATE_DAYS}) - - local last_plugin=$(_zplug-check-interval ${ZPLUG_PLUGIN_UPDATE_FILE}) - - if [ ${last_plugin} -gt ${plugins_seconds} ]; then - echo "It has been $(expr ${last_plugin} / $day_seconds) days since your zplug plugins were updated" - zplug update - - date +%s >! ${ZPLUG_PLUGIN_UPDATE_FILE} - zplug clean --force - fi -} - -zmodload zsh/system -lockfile=${ZPLUG_HOME:-~}/.zplug_autoupdate_lock -touch $lockfile -if ! which zsystem &> /dev/null || zsystem flock -t 1 $lockfile; then - _zplug-check-for-updates - command rm -f $lockfile -fi diff --git a/home/.zshrc b/home/.zshrc index 5d9b09d..e9bd217 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -9,14 +9,11 @@ fi zplug "zplug/zplug", hook-build:'zplug --self-manage' -zplug "BurntSushi/ripgrep", from:gh-r, as:command, rename-to:rg -zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf -zplug "r-darwish/topgrade", from:gh-r, as:command, rename-to:topgrade -zplug "regclient/regclient", from:gh-r, as:command, rename-to:regctl -zplug "sharkdp/bat", from:gh-r, as:command, rename-to:bat -zplug "sharkdp/hexyl", from:gh-r, as:command, rename-to:hexyl -zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq -zplug "wagoodman/dive", from:gh-r, as:command, rename-to:dive +zplug "BurntSushi/ripgrep", from:gh-r, as:command, rename-to:rg +zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf +zplug "r-darwish/topgrade", from:gh-r, as:command, rename-to:topgrade +zplug "sharkdp/bat", from:gh-r, as:command, rename-to:bat +zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq zplug "b4b4r07/enhancd", use:init.sh if zplug check "b4b4r07/enhancd"; then