From 3a87b8a0943f78729f0d9757769e4ea6b27a5807 Mon Sep 17 00:00:00 2001
From: PowerUser64 <blakelysnorth@gmail.com>
Date: Tue, 7 Dec 2021 15:17:17 -0800
Subject: [PATCH] zsh: moved zinit to .local/share

Maybe it should be moved to .cache?
---
 .zshrc | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/.zshrc b/.zshrc
index 83f026e..226bb3d 100644
--- a/.zshrc
+++ b/.zshrc
@@ -19,7 +19,7 @@
    export LSCOLORS="Gxfxcxdxbxegedabagacad"
    export ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/zsh"
 
-   export ZINIT_HOME_DIR=""
+   export ZINIT_HOME_DIR="$HOME/.local/share/zinit"
 
    WORKING_DIR_SAVE_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/last-working-dir"
    # make the dir for the file if needed
@@ -503,16 +503,16 @@
    # Load zinit >>>
    {
       # Install zinit if not installed
-      if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
+      if [[ ! -f "$ZINIT_HOME_DIR/bin/zinit.zsh" ]]; then
          print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/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" && \
+         command mkdir -p "$ZINIT_HOME_DIR" && command chmod g-rwX "$ZINIT_HOME_DIR"
+         command git clone https://github.com/zdharma-continuum/zinit "$ZINIT_HOME_DIR/bin" && \
             print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
             print -P "%F{160}▓▒░ The clone has failed.%f%b"
       fi
 
       # Source zinit
-      source "$HOME/.zinit/bin/zinit.zsh"
+      source "$ZINIT_HOME_DIR/bin/zinit.zsh"
       autoload -Uz _zinit
       (( ${+_comps} )) && _comps[zinit]=_zinit
 
@@ -536,7 +536,6 @@
       # Quality of life
       zinit load "zsh-users/zsh-autosuggestions"
       zinit load "zdharma-continuum/fast-syntax-highlighting"
-      # zinit load "softmoth/zsh-vim-mode"
       zinit load "jeffreytse/zsh-vi-mode"
       zinit load "zsh-users/zsh-history-substring-search"
       zinit load "zsh-users/zsh-completions"