diff --git a/.github/ISSUE_TEMPLATE/request-to-add-zshrc.md b/.github/ISSUE_TEMPLATE/request-to-add-zshrc.md index 86f1820..93bbe55 100644 --- a/.github/ISSUE_TEMPLATE/request-to-add-zshrc.md +++ b/.github/ISSUE_TEMPLATE/request-to-add-zshrc.md @@ -1,14 +1,10 @@ - - - - [URL](#url) - [Username](#username) - [Zshrc body](#zshrc-body) - - --- -name: Request to add zshrc to the zplugin-configs repo + +name: Request to add zshrc to the playground repo about: Use this to submit a zshrc to the repo title: '' labels: '' diff --git a/Dockerfile b/Dockerfile index 26b27d8..d55cfd4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,9 @@ FROM ubuntu:impish-20211102 # Update && install common dependencies ARG DEBIAN_FRONTEND=noninteractive -RUN apt update && \ - apt install -yq \ +RUN apt update && apt install -yq \ ncurses-dev man telnet unzip zsh git subversion curl make sudo locales \ - autoconf automake python golang-go \ - vim htop + autoconf automake python3 golang-go vim htop # Set the locale RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen @@ -22,7 +20,7 @@ RUN adduser --disabled-password --gecos '' user && \ USER user # Install -RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ss-o/zi-src/main/lib/sh/install.sh)" +RUN bash <(curl -fsSL https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh) # Copy configs into home directory ARG FOLDER @@ -43,6 +41,6 @@ RUN if [ -f /home/user/bootstrap.sh ]; then \ # Install all plugins ARG TERM ENV TERM ${TERM} -RUN SHELL=/bin/zsh zsh -i -c -- 'zi module build; @zi-scheduler burst || true ' +RUN SHELL=/bin/zsh zsh -i -c -- '@zi-scheduler burst || true ' CMD zsh -i -l diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/LICENSE b/NICHOLAS85/.zi/plugins/_local---config-files/LICENSE similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/LICENSE rename to NICHOLAS85/.zi/plugins/_local---config-files/LICENSE diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/README.md b/NICHOLAS85/.zi/plugins/_local---config-files/README.md similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/README.md rename to NICHOLAS85/.zi/plugins/_local---config-files/README.md diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_clight b/NICHOLAS85/.zi/plugins/_local---config-files/completions/_clight similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_clight rename to NICHOLAS85/.zi/plugins/_local---config-files/completions/_clight diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_colorls b/NICHOLAS85/.zi/plugins/_local---config-files/completions/_colorls similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_colorls rename to NICHOLAS85/.zi/plugins/_local---config-files/completions/_colorls diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_dynamicwall b/NICHOLAS85/.zi/plugins/_local---config-files/completions/_dynamicwall similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_dynamicwall rename to NICHOLAS85/.zi/plugins/_local---config-files/completions/_dynamicwall diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_gebaard b/NICHOLAS85/.zi/plugins/_local---config-files/completions/_gebaard similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_gebaard rename to NICHOLAS85/.zi/plugins/_local---config-files/completions/_gebaard diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_groff b/NICHOLAS85/.zi/plugins/_local---config-files/completions/_groff similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_groff rename to NICHOLAS85/.zi/plugins/_local---config-files/completions/_groff diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_nl b/NICHOLAS85/.zi/plugins/_local---config-files/completions/_nl similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_nl rename to NICHOLAS85/.zi/plugins/_local---config-files/completions/_nl diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_tlp-stat b/NICHOLAS85/.zi/plugins/_local---config-files/completions/_tlp-stat similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_tlp-stat rename to NICHOLAS85/.zi/plugins/_local---config-files/completions/_tlp-stat diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/err_ggrep b/NICHOLAS85/.zi/plugins/_local---config-files/completions/err_ggrep similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/err_ggrep rename to NICHOLAS85/.zi/plugins/_local---config-files/completions/err_ggrep diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh b/NICHOLAS85/.zi/plugins/_local---config-files/config-files.plugin.zsh similarity index 98% rename from NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh rename to NICHOLAS85/.zi/plugins/_local---config-files/config-files.plugin.zsh index af2a925..e874921 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh +++ b/NICHOLAS85/.zi/plugins/_local---config-files/config-files.plugin.zsh @@ -1,7 +1,7 @@ #Let Atom highlight this: -*- shell-script -*- # According to the Zsh Plugin Standard: -# http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html +# https://github.com/z-shell/zi/wiki/Zsh-Plugin-Standard 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" 0="${${(M)0:#/*}:-$PWD/$0}" diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/apt-history b/NICHOLAS85/.zi/plugins/_local---config-files/functions/apt-history similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/apt-history rename to NICHOLAS85/.zi/plugins/_local---config-files/functions/apt-history diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/autoenv-files b/NICHOLAS85/.zi/plugins/_local---config-files/functions/autoenv-files similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/autoenv-files rename to NICHOLAS85/.zi/plugins/_local---config-files/functions/autoenv-files diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/chpwd_ls b/NICHOLAS85/.zi/plugins/_local---config-files/functions/chpwd_ls similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/chpwd_ls rename to NICHOLAS85/.zi/plugins/_local---config-files/functions/chpwd_ls diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck b/NICHOLAS85/.zi/plugins/_local---config-files/functions/dotscheck similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck rename to NICHOLAS85/.zi/plugins/_local---config-files/functions/dotscheck diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/history-stat b/NICHOLAS85/.zi/plugins/_local---config-files/functions/history-stat similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/history-stat rename to NICHOLAS85/.zi/plugins/_local---config-files/functions/history-stat diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate b/NICHOLAS85/.zi/plugins/_local---config-files/functions/kate similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate rename to NICHOLAS85/.zi/plugins/_local---config-files/functions/kate diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/mcsvr b/NICHOLAS85/.zi/plugins/_local---config-files/functions/mcsvr similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/mcsvr rename to NICHOLAS85/.zi/plugins/_local---config-files/functions/mcsvr diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo b/NICHOLAS85/.zi/plugins/_local---config-files/functions/sudo similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo rename to NICHOLAS85/.zi/plugins/_local---config-files/functions/sudo diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/whichedit b/NICHOLAS85/.zi/plugins/_local---config-files/functions/whichedit similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/whichedit rename to NICHOLAS85/.zi/plugins/_local---config-files/functions/whichedit diff --git a/NICHOLAS85/.zi/plugins/_local---config-files/functions/zicompinit_fast b/NICHOLAS85/.zi/plugins/_local---config-files/functions/zicompinit_fast new file mode 100644 index 0000000..2396315 --- /dev/null +++ b/NICHOLAS85/.zi/plugins/_local---config-files/functions/zicompinit_fast @@ -0,0 +1,22 @@ +setopt extendedglob local_options +autoload -Uz compinit +local zcompf="${ZI[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump}" + +# use a separate file to determine when to regenerate, as compinit doesn't always need to modify the compdump +local zcompf_a="${zcompf}.augur" + +if [[ -e "$zcompf_a" && -f "$zcompf_a"(#qN.mh+24) ]]; then + compinit -d "$zcompf" + touch "$zcompf_a" +else + compinit -C -d "$zcompf" +fi + +# if zcompdump exists (and is non-zero), and is older than the .zwc file, then regenerate +if [[ -s "$zcompf" && (! -s "${zcompf}.zwc" || "$zcompf" -nt "${zcompf}.zwc") ]]; then + # since file is mapped, it might be mapped right now (current shells), so rename it then make a new one + [[ -e "$zcompf.zwc" ]] && mv -f "$zcompf.zwc" "$zcompf.zwc.old" + # compile it mapped, so multiple shells can share it (total mem reduction) + # run in background + { zcompile -M "$zcompf" && command rm -f "$zcompf.zwc.old" }&! +fi diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/LS_COLORS.patch b/NICHOLAS85/.zi/plugins/_local---config-files/patches/LS_COLORS.patch similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/patches/LS_COLORS.patch rename to NICHOLAS85/.zi/plugins/_local---config-files/patches/LS_COLORS.patch diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch b/NICHOLAS85/.zi/plugins/_local---config-files/patches/fz.patch similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch rename to NICHOLAS85/.zi/plugins/_local---config-files/patches/fz.patch diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch b/NICHOLAS85/.zi/plugins/_local---config-files/patches/rm-trash.patch similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch rename to NICHOLAS85/.zi/plugins/_local---config-files/patches/rm-trash.patch diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch b/NICHOLAS85/.zi/plugins/_local---config-files/patches/zsh-dircycle.patch similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch rename to NICHOLAS85/.zi/plugins/_local---config-files/patches/zsh-dircycle.patch diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post.zsh b/NICHOLAS85/.zi/plugins/_local---config-files/themes/dolphin-post.zsh similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post.zsh rename to NICHOLAS85/.zi/plugins/_local---config-files/themes/dolphin-post.zsh diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/p10k-post.zsh b/NICHOLAS85/.zi/plugins/_local---config-files/themes/p10k-post.zsh similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/themes/p10k-post.zsh rename to NICHOLAS85/.zi/plugins/_local---config-files/themes/p10k-post.zsh diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zicompinit_fast b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zicompinit_fast deleted file mode 100644 index fd14fa8..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zicompinit_fast +++ /dev/null @@ -1,22 +0,0 @@ -setopt extendedglob local_options -autoload -Uz compinit -local zcompf="${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump}" - -# use a separate file to determine when to regenerate, as compinit doesn't always need to modify the compdump -local zcompf_a="${zcompf}.augur" - -if [[ -e "$zcompf_a" && -f "$zcompf_a"(#qN.mh+24) ]]; then - compinit -d "$zcompf" - touch "$zcompf_a" -else - compinit -C -d "$zcompf" -fi - -# if zcompdump exists (and is non-zero), and is older than the .zwc file, then regenerate -if [[ -s "$zcompf" && (! -s "${zcompf}.zwc" || "$zcompf" -nt "${zcompf}.zwc") ]]; then - # since file is mapped, it might be mapped right now (current shells), so rename it then make a new one - [[ -e "$zcompf.zwc" ]] && mv -f "$zcompf.zwc" "$zcompf.zwc.old" - # compile it mapped, so multiple shells can share it (total mem reduction) - # run in background - { zcompile -M "$zcompf" && command rm -f "$zcompf.zwc.old" }&! -fi diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index e2da149..85bd2e1 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -2,19 +2,19 @@ # Used to programatically disable plugins when opening the terminal view in dolphin if [[ $MYPROMPT = dolphin ]]; then - isdolphin=true + isdolphin=true else - isdolphin=false - autoload -Uz chpwd_recent_dirs add-zsh-hook - add-zsh-hook chpwd chpwd_recent_dirs - zstyle ':chpwd:*' recent-dirs-file "$TMPDIR/chpwd-recent-dirs" - (){ - local chpwdrdf - zstyle -g chpwdrdf ':chpwd:*' recent-dirs-file - dirstack=($(awk -F"'" '{print $2}' "$chpwdrdf" 2>/dev/null)) - [[ $PWD = ~ ]] && { cd ${dirstack[1]} 2>/dev/null || true } - dirstack=("${dirstack[@]:1}") - } + isdolphin=false + autoload -Uz chpwd_recent_dirs add-zsh-hook + add-zsh-hook chpwd chpwd_recent_dirs + zstyle ':chpwd:*' recent-dirs-file "$TMPDIR/chpwd-recent-dirs" + (){ + local chpwdrdf + zstyle -g chpwdrdf ':chpwd:*' recent-dirs-file + dirstack=($(awk -F"'" '{print $2}' "$chpwdrdf" 2>/dev/null)) + [[ $PWD = ~ ]] && { cd ${dirstack[1]} 2>/dev/null || true } + dirstack=("${dirstack[@]:1}") + } fi # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. @@ -24,42 +24,39 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi -ZINIT_HOME="${ZINIT_HOME:-${ZPLG_HOME:-${ZDOTDIR:-$HOME}/.zinit}}" -ZINIT_BIN_DIR_NAME="${${ZINIT_BIN_DIR_NAME:-$ZPLG_BIN_DIR_NAME}:-bin}" -### Added by Zinit's installer -if [[ ! -f $ZINIT_HOME/$ZINIT_BIN_DIR_NAME/zinit.zsh ]]; then - print -P "%F{33}▓▒░ %F{220}Installing DHARMA Initiative Plugin Manager (zdharma/zinit)…%f" - command mkdir -p "$ZINIT_HOME" && command chmod g-rwX "$ZINIT_HOME" - command git clone https://github.com/zdharma/zinit "$ZINIT_HOME/$ZINIT_BIN_DIR_NAME" && \ - print -P "%F{33}▓▒░ %F{34}Installation successful.%f" || \ - print -P "%F{160}▓▒░ The clone has failed.%f" +ZI_HOME="${ZI_HOME:-${ZPLG_HOME:-${ZDOTDIR:-$HOME}/.zi}}" +ZI_BIN_DIR_NAME="${${ZI_BIN_DIR_NAME:-$ZPLG_BIN_DIR_NAME}:-bin}" +### Added by ZI's installer +if [[ ! -f $ZI_HOME/$ZI_BIN_DIR_NAME/zi.zsh ]]; then + print -P "%F{33}▓▒░ %F{220}Installing ZI Initiative Plugin Manager (z-shell/zi)…%f" + command mkdir -p "$ZI_HOME" && command chmod g-rwX "$ZI_HOME" + command git clone https://github.com/z-shell/zi "$ZI_HOME/$ZI_BIN_DIR_NAME" && \ + print -P "%F{33}▓▒░ %F{34}Installation successful.%f" || \ + print -P "%F{160}▓▒░ The clone has failed.%f" fi -source "$ZINIT_HOME/$ZINIT_BIN_DIR_NAME/zinit.zsh" -autoload -Uz _zinit -(( ${+_comps} )) && _comps[zinit]=_zinit -### End of Zinit installer's chunk - -#module_path+=( "${HOME}/.zinit/bin/zmodules/Src" ) -#zmodload zdharma/zplugin &>/dev/null - -if [[ ! -d "${ZINIT[PLUGINS_DIR]}/_local---config-files" ]]; then - print -P "%F{33}▓▒░ %F{220}Installing local config-files…%f" - curl https://codeload.github.com/NICHOLAS85/dotfiles/tar.gz/xps_13_9365_refresh | \ - tar -xz --strip=3 dotfiles-xps_13_9365/.zinit/plugins/_local---config-files - mv _local---config-files "${ZINIT[PLUGINS_DIR]}/" +source "$ZI_HOME/$ZI_BIN_DIR_NAME/zi.zsh" +autoload -Uz _zi +(( ${+_comps} )) && _comps[zi]=_zi +### End of ZI installer's chunk + +if [[ ! -d "${ZI[PLUGINS_DIR]}/_local---config-files" ]]; then + print -P "%F{33}▓▒░ %F{220}Installing local config-files…%f" + curl https://codeload.github.com/NICHOLAS85/dotfiles/tar.gz/xps_13_9365_refresh | \ + tar -xz --strip=3 dotfiles-xps_13_9365/.zi/plugins/_local---config-files + mv _local---config-files "${ZI[PLUGINS_DIR]}/" fi # Functions to make configuration less verbose # zt() : First argument is a wait time and suffix, ie "0a". Anything that doesn't match will be passed as if it were an ice mod. Default ices depth'3' and lucid # zct(): First argument provides $MYPROMPT value used in load'' and unload'' ices. Sources a config file with tracking for easy unloading using $MYPROMPT value. Small hack to function in for-syntax -zt() { zinit depth'3' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } +zt() { zi depth'3' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } zct() { - thmf="${ZINIT[PLUGINS_DIR]}/_local---config-files/themes" - if [[ ${1} != ${MYPROMPT=p10k} ]] && { ___turbo=1; .zinit-ice \ - load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" } - .zinit-ice atload'! [[ -f "${thmf}/${MYPROMPT}-post.zsh" ]] && source "${thmf}/${MYPROMPT}-post.zsh"' \ - nocd id-as"${1}-theme"; - ICE+=("${(kv)ZINIT_ICES[@]}"); ZINIT_ICES=(); + thmf="${ZI[PLUGINS_DIR]}/_local---config-files/themes" + if [[ ${1} != ${MYPROMPT=p10k} ]] && { ___turbo=1; .zi-ice \ + load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" } + .zi-ice atload'! [[ -f "${thmf}/${MYPROMPT}-post.zsh" ]] && source "${thmf}/${MYPROMPT}-post.zsh"' \ + nocd id-as"${1}-theme"; + ICE+=("${(kv)ZI_ICES[@]}"); ZI_ICES=(); } ################## @@ -69,122 +66,122 @@ zct() { ################## zt light-mode for \ - pick'async.zsh' \ - mafredri/zsh-async \ - romkatv/powerlevel10k \ +pick'async.zsh' \ + mafredri/zsh-async \ + romkatv/powerlevel10k \ zt for if'zct dolphin' \ - zdharma/null \ - if'zct p10k' \ - zdharma/null + z-shell/null \ +if'zct p10k' \ + z-shell/null zt light-mode compile'*handler' for \ - zinit-zsh/z-a-patch-dl \ - zinit-zsh/z-a-bin-gem-node \ - zinit-zsh/z-a-submods +z-shell/z-a-patch-dl \ +z-shell/z-a-bin-gem-node \ +z-shell/z-a-submods zt light-mode blockf for \ - _local/config-files +_local/config-files ########### # Plugins # ########### zt atinit'HISTFILE="${HOME}/.histfile"' for \ - OMZL::history.zsh + OMZL::history.zsh ###################### # Trigger-load block # ###################### zt light-mode for \ - trigger-load'!x' \ - OMZ::plugins/extract/extract.plugin.zsh \ - trigger-load'!man' \ - ael-code/zsh-colored-man-pages \ - trigger-load'!ga;!gcf;!gclean;!gd;!glo;!grh;!gss' \ - wfxr/forgit \ - trigger-load'!zshz' blockf \ - agkozak/zsh-z \ - trigger-load'!updatelocal' blockf \ - NICHOLAS85/updatelocal \ - trigger-load'!gencomp' pick'zsh-completion-generator.plugin.zsh' blockf \ - atload'alias gencomp="zinit silent nocd as\"null\" wait\"2\" atload\"zinit creinstall -q _local/config-files; zicompinit\" for /dev/null; gencomp"' \ - RobSis/zsh-completion-generator +trigger-load'!x' \ + OMZ::plugins/extract/extract.plugin.zsh \ +trigger-load'!man' \ + ael-code/zsh-colored-man-pages \ +trigger-load'!ga;!gcf;!gclean;!gd;!glo;!grh;!gss' \ + wfxr/forgit \ +trigger-load'!zshz' blockf \ + agkozak/zsh-z \ +trigger-load'!updatelocal' blockf \ + NICHOLAS85/updatelocal \ +trigger-load'!gencomp' pick'zsh-completion-generator.plugin.zsh' blockf \ +atload'alias gencomp="zi silent nocd as\"null\" wait\"2\" atload\"zi creinstall -q _local/config-files; zicompinit\" for /dev/null; gencomp"' \ + RobSis/zsh-completion-generator ################## # Wait'0a' block # ################## zt 0a light-mode for \ - OMZL::completion.zsh \ - if'false' ver'dev' \ - marlonrichert/zsh-autocomplete \ - has'systemctl' \ - OMZP::systemd/systemd.plugin.zsh \ - OMZP::sudo/sudo.plugin.zsh \ - blockf \ - zsh-users/zsh-completions \ - compile'{src/*.zsh,src/strategies/*}' pick'zsh-autosuggestions.zsh' \ - atload'_zsh_autosuggest_start' \ - zsh-users/zsh-autosuggestions \ - pick'fz.sh' atload'ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(autopair-insert __fz_zsh_completion)' \ - changyuheng/fz + OMZL::completion.zsh \ +if'false' ver'dev' \ + marlonrichert/zsh-autocomplete \ +has'systemctl' \ + OMZP::systemd/systemd.plugin.zsh \ + OMZP::sudo/sudo.plugin.zsh \ +blockf \ + zsh-users/zsh-completions \ +compile'{src/*.zsh,src/strategies/*}' pick'zsh-autosuggestions.zsh' \ +atload'_zsh_autosuggest_start' \ + zsh-users/zsh-autosuggestions \ +pick'fz.sh' atload'ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(autopair-insert __fz_zsh_completion)' \ + changyuheng/fz ################## # Wait'0b' block # ################## zt 0b light-mode for \ - pack'no-dir-color-swap' patch"$pchf/%PLUGIN%.patch" reset \ - trapd00r/LS_COLORS \ - compile'{hsmw-*,test/*}' \ - zdharma/history-search-multi-word \ - OMZP::command-not-found/command-not-found.plugin.zsh \ - pick'autopair.zsh' nocompletions atload'bindkey "^H" backward-kill-word; ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(autopair-insert)' \ - hlissner/zsh-autopair \ - trackbinds bindmap'\e[1\;6D -> ^[[1\;5B; \e[1\;6C -> ^[[1\;5A' patch"$pchf/%PLUGIN%.patch" \ - reset pick'dircycle.zsh' \ - michaelxmcbride/zsh-dircycle \ - autoload'#manydots-magic' \ - knu/zsh-manydots-magic \ - pick'autoenv.zsh' nocompletions \ - Tarrasch/zsh-autoenv \ - atinit'zicompinit_fast; zicdreplay' atload'FAST_HIGHLIGHT[chroma-man]=' \ - zdharma/fast-syntax-highlighting \ - atload'bindkey "$terminfo[kcuu1]" history-substring-search-up; - bindkey "$terminfo[kcud1]" history-substring-search-down' \ - zsh-users/zsh-history-substring-search \ - as'completion' mv'*.zsh -> _git' \ - felipec/git-completion \ +pack'no-dir-color-swap' patch"$pchf/%PLUGIN%.patch" reset \ + trapd00r/LS_COLORS \ +compile'{hsmw-*,test/*}' \ + z-shell/H-S-MW \ + OMZP::command-not-found/command-not-found.plugin.zsh \ +pick'autopair.zsh' nocompletions atload'bindkey "^H" backward-kill-word; ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(autopair-insert)' \ + hlissner/zsh-autopair \ +trackbinds bindmap'\e[1\;6D -> ^[[1\;5B; \e[1\;6C -> ^[[1\;5A' patch"$pchf/%PLUGIN%.patch" \ +reset pick'dircycle.zsh' \ + michaelxmcbride/zsh-dircycle \ +autoload'#manydots-magic' \ + knu/zsh-manydots-magic \ +pick'autoenv.zsh' nocompletions \ + Tarrasch/zsh-autoenv \ +atinit'zicompinit_fast; zicdreplay' atload'FAST_HIGHLIGHT[chroma-man]=' \ + z-shell/F-Sy-H \ +atload'bindkey "$terminfo[kcuu1]" history-substring-search-up; +bindkey "$terminfo[kcud1]" history-substring-search-down' \ + zsh-users/zsh-history-substring-search \ +as'completion' mv'*.zsh -> _git' \ + felipec/git-completion \ ################## # Wait'0c' block # ################## zt 0c light-mode for \ - pack'bgn-binary' \ - junegunn/fzf \ - sbin from'gh-r' submods'NICHOLAS85/zsh-fast-alias-tips -> plugin' pick'plugin/*.zsh' \ - sei40kr/fast-alias-tips-bin +pack'bgn-binary' \ + junegunn/fzf \ +sbin from'gh-r' submods'NICHOLAS85/zsh-fast-alias-tips -> plugin' pick'plugin/*.zsh' \ + sei40kr/fast-alias-tips-bin zt 0c light-mode binary for \ - sbin'fd*/fd;fd*/fd -> fdfind' from"gh-r" \ - @sharkdp/fd \ - sbin'bin/git-ignore' atload'export GI_TEMPLATE="$PWD/.git-ignore"; alias gi="git-ignore"' \ - laggardkernel/git-ignore +sbin'fd*/fd;fd*/fd -> fdfind' from"gh-r" \ + @sharkdp/fd \ +sbin'bin/git-ignore' atload'export GI_TEMPLATE="$PWD/.git-ignore"; alias gi="git-ignore"' \ + laggardkernel/git-ignore zt 0c light-mode null for \ - sbin"bin/git-dsf;bin/diff-so-fancy" \ - zdharma/zsh-diff-so-fancy \ - sbin \ - paulirish/git-open \ - sbin'm*/micro' from"gh-r" ver'nightly' bpick'*linux64*' reset \ - zyedidia/micro \ - sbin'*/rm-trash' atload'alias rm="rm-trash ${rm_opts}"' reset \ - patch"$pchf/%PLUGIN%.patch" \ - nateshmbhat/rm-trash \ - sbin \ - kazhala/dotbare \ - id-as'Cleanup' nocd atinit'unset -f zct zt; SPACESHIP_PROMPT_ADD_NEWLINE=true; _zsh_autosuggest_bind_widgets' \ - zdharma/null +sbin"bin/git-dsf;bin/diff-so-fancy" \ + z-shell/zsh-diff-so-fancy \ +sbin \ + paulirish/git-open \ +sbin'm*/micro' from"gh-r" ver'nightly' bpick'*linux64*' reset \ + zyedidia/micro \ +sbin'*/rm-trash' atload'alias rm="rm-trash ${rm_opts}"' reset \ +patch"$pchf/%PLUGIN%.patch" \ + nateshmbhat/rm-trash \ +sbin \ + kazhala/dotbare \ +id-as'Cleanup' nocd atinit'unset -f zct zt; SPACESHIP_PROMPT_ADD_NEWLINE=true; _zsh_autosuggest_bind_widgets' \ + z-shell/null diff --git a/agkozak/.profile b/agkozak/.profile index 3c418b4..36b340a 100644 --- a/agkozak/.profile +++ b/agkozak/.profile @@ -15,7 +15,7 @@ AGKDOT_SYSTEMINFO=$(uname -a) # Environment variables {{{1 export EDITOR VISUAL -if command -v vim > /dev/null 2>&1; then +if command -v vim >/dev/null 2>&1; then EDITOR='vim' else EDITOR='vi' @@ -26,15 +26,16 @@ export ENV ENV="$HOME/.shrc" case $(ls -l "$(command -v less)") in - *busybox*) ;; +*busybox*) ;; +*) + case $AGKDOT_SYSTEMINFO in + UWIN*) ;; *) - case $AGKDOT_SYSTEMINFO in - UWIN*) ;; - *) - export LESS - LESS='-R' - ;; - esac + export LESS + LESS='-R' + ;; + esac + ;; esac # if command -v lesspipe > /dev/null 2>&1; then @@ -68,22 +69,22 @@ PAGER=less export PATH # Construct $PATH -for i in "$HOME/.gem/ruby/2.4.0/bin" \ +for i in "$HOME/.gem/ruby/3.0.0/bin" \ "$HOME/.local/bin" \ "$HOME/go/bin" \ - "$HOME/.cabal/bin" \ - "$HOME/.config/composer/vendor/bin" \ - "$HOME/.composer/vendor/bin" \ + "$HOME/.cabal/bin" \ + "$HOME/.config/composer/vendor/bin" \ + "$HOME/.composer/vendor/bin" \ "$HOME/.luarocks/bin" \ - "$HOME/ruby/gems/bin" \ - "$HOME/.rvim/bin" \ - "$HOME/bin"; do + "$HOME/ruby/gems/bin" \ + "$HOME/.rvim/bin" \ + "$HOME/bin"; do if [ -d "$i" ]; then case :$PATH: in - *:$i:*) ;; - *) - PATH="$i:$PATH" - ;; + *:$i:*) ;; + *) + PATH="$i:$PATH" + ;; esac fi done @@ -91,7 +92,7 @@ done unset i case $AGKDOT_SYSTEMINFO in - *Msys) [ -d /mingw64/bin ] && PATH="$PATH:/mingw64/bin" ;; +*Msys) [ -d /mingw64/bin ] && PATH="$PATH:/mingw64/bin" ;; esac # Load RVM into a shell session *as a function* @@ -99,38 +100,38 @@ esac [ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm" case $AGKDOT_SYSTEMINFO in - Darwin*|FreeBSD*) - export CLICOLOR LSCOLORS SSL_CERT_DIR SSL_CERT_FILE - CLICOLOR=1 - LSCOLORS='ExfxcxdxBxegedAbagacad' - SSL_CERT_DIR=/etc/ssl/certs - SSL_CERT_FILE=/etc/ssl/cert.pem - ;; - *Msys) - export MSYS SSL_CERT_DIR SSL_CERT_FILE - # `ln` creates native symlinks in Windows -- only works for administrator - MSYS="winsymlinks:nativestrict" - unset PYTHONHOME - [ ! -f /usr/bin/zsh ] && SHELL=/usr/bin/bash - SSL_CERT_DIR=/mingw64/ssl/certs - SSL_CERT_FILE=/mingw64/ssl/cert.pem - ;; - *Cygwin) - export CYGWIN - # `ln` creates native symlinks in Windows -- only works for administrator - CYGWIN="winsymlinks:native" - unset PYTHONHOME SSL_CERT_DIR SSL_CERT_FILE - ;; - *raspberrypi*) - command -v chromium-browser > /dev/null 2>&1 && BROWSER='chromium-browser' - ;; +Darwin* | FreeBSD*) + export CLICOLOR LSCOLORS SSL_CERT_DIR SSL_CERT_FILE + CLICOLOR=1 + LSCOLORS='ExfxcxdxBxegedAbagacad' + SSL_CERT_DIR=/etc/ssl/certs + SSL_CERT_FILE=/etc/ssl/cert.pem + ;; +*Msys) + export MSYS SSL_CERT_DIR SSL_CERT_FILE + # `ln` creates native symlinks in Windows -- only works for administrator + MSYS="winsymlinks:nativestrict" + unset PYTHONHOME + [ ! -f /usr/bin/zsh ] && SHELL=/usr/bin/bash + SSL_CERT_DIR=/mingw64/ssl/certs + SSL_CERT_FILE=/mingw64/ssl/cert.pem + ;; +*Cygwin) + export CYGWIN + # `ln` creates native symlinks in Windows -- only works for administrator + CYGWIN="winsymlinks:native" + unset PYTHONHOME SSL_CERT_DIR SSL_CERT_FILE + ;; +*raspberrypi*) + command -v chromium-browser >/dev/null 2>&1 && BROWSER='chromium-browser' + ;; esac # }}}1 # umask {{{1 -if [ "$(umask)" = "000" ]; then # For WSL +if [ "$(umask)" = "000" ]; then # For WSL umask 022 fi @@ -139,8 +140,8 @@ fi # Source ~/.profile.local {{{1 if [ -f "$HOME/.profile.local" ]; then - # shellcheck source=/dev/null - . "$HOME/.profile.local" + # shellcheck source=/dev/null + . "$HOME/.profile.local" fi # }}}1 diff --git a/agkozak/.zshrc b/agkozak/.zshrc index 306f0d0..d62d32b 100644 --- a/agkozak/.zshrc +++ b/agkozak/.zshrc @@ -1,8 +1,6 @@ # ~/.zshrc # # https://github.com/agkozak/dotfiles -# -# shellcheck disable=SC1090,SC2034,SC2128,SC2148,SC2154 # If zsh is emulating another shell {{{1 @@ -269,23 +267,23 @@ fi # }}}1 -# zinit {{{1 +# zi {{{1 if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then # Optional binary module - if [[ -f "$HOME/.zinit/bin/zmodules/Src/zdharma/zplugin.so" ]]; then - module_path+=( "$HOME/.zinit/bin/zmodules/Src" ) - zmodload zdharma/zplugin + if [[ -f "$HOME/.zi/zmodules/zpmod/Src/zi/zpmod.so" ]]; then + module_path+=( $HOME/.zi/zmodules/zpmod/Src ) + zmodload zi/zpmod fi if whence -w git &> /dev/null; then - if [[ ! -d ${HOME}/.zinit/bin ]]; then - print 'Installing zinit...' - mkdir -p "${HOME}/.zinit" - git clone https://github.com/zdharma/zinit.git "${HOME}/.zinit/bin" - compile_or_recompile "${HOME}/.zinit/bin/zinit.zsh" + if [[ ! -d ${HOME}/.zi/bin ]]; then + print 'Installing zi...' + mkdir -p "${HOME}/.zi" + git clone https://github.com/z-shell/zi.git "${HOME}/.zi/bin" + compile_or_recompile "${HOME}/.zi/bin/zi.zsh" fi # Configuration hash @@ -294,8 +292,8 @@ if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then # Location of .zcompdump file ZINIT[ZCOMPDUMP_PATH]="${HOME}/.zcompdump_${ZSH_VERSION}" - # zinit and its plugins and snippets - source "${HOME}/.zinit/bin/zinit.zsh" + # zi and its plugins and snippets + source "${HOME}/.zi/bin/zi.zsh" # Load plugins and snippets {{{2 @@ -305,12 +303,12 @@ if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then # AGKOZAK_MULTILINE=0 # AGKOZAK_PROMPT_CHAR=( '❯' '❯' '❮' ) # AGKOZAK_PROMPT_DEBUG=1 - zinit ver"develop" for agkozak/agkozak-zsh-prompt + zi ver"develop" for agkozak/agkozak-zsh-prompt - # zinit light agkozak/polyglot + # zi light agkozak/polyglot # if which kubectl &> /dev/null; then - # zinit light jonmosco/kube-ps1 - # zinit light agkozak/polyglot-kube-ps1 + # zi light jonmosco/kube-ps1 + # zi light agkozak/polyglot-kube-ps1 # fi # agkozak/zsh-z @@ -318,23 +316,23 @@ if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then ZSHZ_DEBUG=1 [[ $OSTYPE == freebsd* ]] && typeset -g ZSHZ_NO_RESOLVE_SYMLINKS=1 - zinit ver"develop" lucid wait for \ + zi ver"develop" lucid wait for \ agkozak/zhooks \ agkozak/zsh-z # zsh-titles causes dittography in Emacs shell and Vim terminal if (( ! $+EMACS )) && [[ $TERM != 'dumb' ]] && (( ! $+VIM_TERMINAL )); then - zinit lucid wait for jreese/zsh-titles + zi lucid wait for jreese/zsh-titles fi if [[ $AGKDOT_SYSTEMINFO != *ish* ]]; then - zinit lucid wait for zdharma/zui - zinit lucid wait'1' for zdharma/zbrowse + zi lucid wait for z-shell/zui + zi lucid wait'1' for z-shell/zbrowse fi - zinit snippet OMZ::plugins/extract/extract.plugin.zsh + zi snippet OMZ::plugins/extract/extract.plugin.zsh - zinit lucid wait for zsh-users/zsh-history-substring-search + zi lucid wait for zsh-users/zsh-history-substring-search HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='underline' HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='' zle -N history-substring-search-up @@ -348,13 +346,13 @@ if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then if [[ $OSTYPE == (msys|cygwin) ]] \ || [[ $AGKDOT_SYSTEMINFO == *Microsoft* ]]; then # Git highlighting can be very slow on Windows - zinit ice \ + zi ice \ atload'unset "FAST_HIGHLIGHT[chroma-git]"; fast-theme free &> /dev/null' \ lucid wait else - zinit ice atload'fast-theme free &> /dev/null' lucid wait + zi ice atload'fast-theme free &> /dev/null' lucid wait fi - zinit load zdharma/fast-syntax-highlighting + zi load z-shell/F-Sy-H else print 'Please install git.' @@ -380,7 +378,7 @@ fi autoload -Uz compinit compinit -u -d "${HOME}/.zcompdump_${ZSH_VERSION}" -(( ! AGKDOT_NO_ZPLUGIN )) && is-at-least 5 && zinit cdreplay -q +(( ! AGKDOT_NO_ZPLUGIN )) && is-at-least 5 && zi cdreplay -q # https://www.zsh.org/mla/users/2015/msg00467.html # shellcheck disable=SC2016 @@ -488,10 +486,10 @@ KEYTIMEOUT=1 # Static named directories [[ -d ${HOME}/public_html/wp-content ]] \ && hash -d wp-content="$HOME/public_html/wp-content" -[[ -d ${HOME}/.zinit/plugins/agkozak---agkozak-zsh-prompt ]] \ - && hash -d agk="$HOME/.zinit/plugins/agkozak---agkozak-zsh-prompt" -[[ -d ${HOME}/.zinit/plugins/agkozak---zsh-z ]] \ - && hash -d z="$HOME/.zinit/plugins/agkozak---zsh-z" +[[ -d ${HOME}/.zi/plugins/agkozak---agkozak-zsh-prompt ]] \ + && hash -d agk="$HOME/.zi/plugins/agkozak---agkozak-zsh-prompt" +[[ -d ${HOME}/.zi/plugins/agkozak---zsh-z ]] \ + && hash -d z="$HOME/.zi/plugins/agkozak---zsh-z" # Dynamic named directories # https://superuser.com/questions/751523/dynamic-directory-hash diff --git a/brucebentley/zshrc.zsh b/brucebentley/zshrc.zsh index 9f66c9e..d1fff91 100644 --- a/brucebentley/zshrc.zsh +++ b/brucebentley/zshrc.zsh @@ -6,11 +6,11 @@ PROFILE_STARTUP=false if [[ "$PROFILE_STARTUP" == true ]]; then - zmodload zsh/zprof - # http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html - PS4=$'%D{%M%S%.} %N:%i> ' - exec 3>&2 2>$HOME/startlog.$$ - setopt xtrace prompt_subst + zmodload zsh/zprof + # http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html + PS4=$'%D{%M%S%.} %N:%i> ' + exec 3>&2 2>$HOME/startlog.$$ + setopt xtrace prompt_subst fi @@ -22,7 +22,7 @@ fi # Initialization code that may require console input ( password prompts, [y/n] # confirmations, etc. ) must go above this block, everything else may go below. if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi @@ -154,22 +154,22 @@ setopt extended_history # Show Timestamp In History. # - - - - - - - - - - - - - - - - - - - - -# Zinit Configuration +# ZI Configuration # - - - - - - - - - - - - - - - - - - - - -__ZINIT="${ZDOTDIR:-$HOME}/.zinit/bin/zinit.zsh" +__ZI="${ZDOTDIR:-$HOME}/.zi/bin/zi.zsh" -if [[ ! -f "$__ZINIT" ]]; then - print -P "%F{33}▓▒░ %F{220}Installing DHARMA Initiative Plugin Manager (zdharma/zinit)…%f" - command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit" - command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \ - print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \ - print -P "%F{160}▓▒░ The clone has failed.%f%b" +if [[ ! -f "$__ZI" ]]; then + print -P "%F{33}▓▒░ %F{220}Installing ZI Initiative Plugin Manager (z-shell/zi)…%f" + command mkdir -p "$HOME/.zi" && command chmod g-rwX "$HOME/.zi" + command git clone https://github.com/z-shell/zi "$HOME/.zi/bin" && \ + print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \ + print -P "%F{160}▓▒░ The clone has failed.%f%b" fi -. "$__ZINIT" -autoload -Uz _zinit -(( ${+_comps} )) && _comps[zinit]=_zinit +. "$__ZI" +autoload -Uz _zi +(( ${+_comps} )) && _comps[zi]=_zi # - - - - - - - - - - - - - - - - - - - - @@ -180,77 +180,77 @@ autoload -Uz _zinit setopt promptsubst # These plugins provide many aliases - atload'' -zinit wait lucid for \ - OMZ::lib/git.zsh \ - atload"unalias grv" \ - OMZ::plugins/git/git.plugin.zsh +zi wait lucid for \ + OMZ::lib/git.zsh \ +atload"unalias grv" \ + OMZ::plugins/git/git.plugin.zsh # Provide A Simple Prompt Till The Theme Loads PS1="READY >" -zinit ice wait'!' lucid -zinit ice depth=1; zinit light romkatv/powerlevel10k +zi ice wait'!' lucid +zi ice depth=1; zi light romkatv/powerlevel10k # - - - - - - - - - - - - - - - - - - - - # Annexes # - - - - - - - - - - - - - - - - - - - - -# Load a few important annexes, without Turbo (this is currently required for annexes) -zinit light-mode compile"handler" for \ - zinit-zsh/z-a-patch-dl \ - zinit-zsh/z-a-as-monitor \ - zinit-zsh/z-a-bin-gem-node \ - zinit-zsh/z-a-submods \ - zdharma/declare-zsh +# Load a few important annexes, without Turbo. +zi light-mode compile"handler" for \ +z-shell/z-a-patch-dl \ +z-shell/z-a-readurl \ +z-shell/z-a-bin-gem-node \ +z-shell/z-a-submods \ +z-shell/declare-zsh # - - - - - - - - - - - - - - - - - - - - # Plugins # - - - - - - - - - - - - - - - - - - - - -zinit wait lucid light-mode for \ - OMZ::lib/compfix.zsh \ - OMZ::lib/completion.zsh \ - OMZ::lib/functions.zsh \ - OMZ::lib/diagnostics.zsh \ - OMZ::lib/git.zsh \ - OMZ::lib/grep.zsh \ - OMZ::lib/key-bindings.zsh \ - OMZ::lib/misc.zsh \ - OMZ::lib/spectrum.zsh \ - OMZ::lib/termsupport.zsh \ - OMZ::plugins/git-auto-fetch/git-auto-fetch.plugin.zsh \ - atinit"zicompinit; zicdreplay" \ - zdharma/fast-syntax-highlighting \ - OMZ::plugins/colored-man-pages/colored-man-pages.plugin.zsh \ - OMZ::plugins/command-not-found/command-not-found.plugin.zsh \ - atload"_zsh_autosuggest_start" \ - zsh-users/zsh-autosuggestions \ - as"completion" \ - OMZ::plugins/docker/_docker \ - OMZ::plugins/composer/composer.plugin.zsh \ - OMZ::plugins/thefuck/thefuck.plugin.zsh \ - htlsne/zplugin-rbenv \ - OMZ::plugins/pyenv/pyenv.plugin.zsh +zi wait lucid light-mode for \ + OMZ::lib/compfix.zsh \ + OMZ::lib/completion.zsh \ + OMZ::lib/functions.zsh \ + OMZ::lib/diagnostics.zsh \ + OMZ::lib/git.zsh \ + OMZ::lib/grep.zsh \ + OMZ::lib/key-bindings.zsh \ + OMZ::lib/misc.zsh \ + OMZ::lib/spectrum.zsh \ + OMZ::lib/termsupport.zsh \ + OMZ::plugins/git-auto-fetch/git-auto-fetch.plugin.zsh \ +atinit"zicompinit; zicdreplay" \ + z-shell/F-Sy-H \ + OMZ::plugins/colored-man-pages/colored-man-pages.plugin.zsh \ + OMZ::plugins/command-not-found/command-not-found.plugin.zsh \ +atload"_zsh_autosuggest_start" \ + zsh-users/zsh-autosuggestions \ +as"completion" \ + OMZ::plugins/docker/_docker \ + OMZ::plugins/composer/composer.plugin.zsh \ + OMZ::plugins/thefuck/thefuck.plugin.zsh \ + htlsne/zplugin-rbenv \ + OMZ::plugins/pyenv/pyenv.plugin.zsh # Recommended Be Loaded Last. -zinit ice wait blockf lucid atpull'zinit creinstall -q .' -zinit load zsh-users/zsh-completions +zi ice wait blockf lucid atpull'zi creinstall -q .' +zi load zsh-users/zsh-completions # rbenv -# zinit ice has'rbenv' id-as'rbenv' atpull'%atclone' \ +# zi ice has'rbenv' id-as'rbenv' atpull'%atclone' \ # atclone"rbenv init - --no-rehash > htlsne/zplugin-rbenv" -# zinit load zdharma/null +# zi load z-shell/null # pyenv -# zinit ice has'pyenv' id-as'pyenv' atpull'%atclone' \ +# zi ice has'pyenv' id-as'pyenv' atpull'%atclone' \ # atclone"pyenv init - --no-rehash > pyenv.plugin.zsh" -# zinit load zdharma/null +# zi load z-shell/null -# Semi-graphical .zshrc editor for zinit commands -zinit load zdharma/zui -zinit ice lucid wait'[[ -n ${ZLAST_COMMANDS[(r)cras*]} ]]' -zinit load zdharma/zplugin-crasis +# Semi-graphical .zshrc editor for zi commands +zi load z-shell/zui +zi ice lucid wait'[[ -n ${ZLAST_COMMANDS[(r)cras*]} ]]' +zi load z-shell/zplugin-crasis # - - - - - - - - - - - - - - - - - - - - @@ -267,12 +267,12 @@ setopt no_beep # [[ -f ~/.zshrc.local ]] && source ~/.zshrc.local foreach piece ( - exports.zsh - node.zsh - aliases.zsh - functions.zsh + exports.zsh + node.zsh + aliases.zsh + functions.zsh ) { - . $ZSH/config/$piece + . $ZSH/config/$piece } @@ -286,18 +286,18 @@ DIRSTACKFILE="$HOME/.cache/zsh/dirs" # Make `DIRSTACKFILE` If It 'S Not There. if [[ ! -a $DIRSTACKFILE ]]; then - mkdir -p $DIRSTACKFILE[0,-5] - touch $DIRSTACKFILE + mkdir -p $DIRSTACKFILE[0,-5] + touch $DIRSTACKFILE fi if [[ -f $DIRSTACKFILE ]] && [[ $#dirstack -eq 0 ]]; then - dirstack=( ${(f)"$(< $DIRSTACKFILE)"} ) + dirstack=( ${(f)"$(< $DIRSTACKFILE)"} ) fi chpwd() { - print -l $PWD ${(u)dirstack} >>$DIRSTACKFILE - local d="$(sort -u $DIRSTACKFILE )" - echo "$d" > $DIRSTACKFILE + print -l $PWD ${(u)dirstack} >>$DIRSTACKFILE + local d="$(sort -u $DIRSTACKFILE )" + echo "$d" > $DIRSTACKFILE } DIRSTACKSIZE=20 @@ -321,7 +321,7 @@ setopt pushd_minus # This Reverts The +/- Operators. # - - - - - - - - - - - - - - - - - - - - if [[ "$PROFILE_STARTUP" == true ]]; then - unsetopt xtrace - exec 2>&3 3>&- - zprof > ~/zshprofile$(date +'%s') + unsetopt xtrace + exec 2>&3 3>&- + zprof > ~/zshprofile$(date +'%s') fi diff --git a/jubi/.zshrc b/jubi/.zshrc index aaf1918..5540a63 100644 --- a/jubi/.zshrc +++ b/jubi/.zshrc @@ -1,27 +1,27 @@ ### Added by Zinit's installer -source ~/.zinit/bin/zinit.zsh -autoload -Uz _zinit -(( ${+_comps} )) && _comps[zinit]=_zinit +source ~/.zi/bin/zi.zsh +autoload -Uz _zi +(( ${+_comps} )) && _comps[zi]=_zi ### End of Zinit installer's chunk ##### BEGIN Zinit stuff ##### -### needs: zinit, fzf +### needs: zi, fzf # z -zinit ice wait blockf lucid -zinit light rupa/z +zi ice wait blockf lucid +zi light rupa/z # z tab completion -zinit ice wait lucid -zinit light changyuheng/fz +zi ice wait lucid +zi light changyuheng/fz # z / fzf (ctrl-g) -zinit ice wait lucid -zinit light andrewferrier/fzf-z +zi ice wait lucid +zi light andrewferrier/fzf-z # cd -zinit ice wait lucid -zinit light changyuheng/zsh-interactive-cd +zi ice wait lucid +zi light changyuheng/zsh-interactive-cd # Don't bind these keys until ready bindkey -r '^[[A' @@ -31,20 +31,20 @@ function __bind_history_keys() { bindkey '^[[B' history-substring-search-down } # History substring searching -zinit ice wait lucid atload'__bind_history_keys' -zinit light zsh-users/zsh-history-substring-search +zi ice wait lucid atload'__bind_history_keys' +zi light zsh-users/zsh-history-substring-search # autosuggestions, trigger precmd hook upon load -zinit ice wait lucid atload'_zsh_autosuggest_start' -zinit light zsh-users/zsh-autosuggestions +zi ice wait lucid atload'_zsh_autosuggest_start' +zi light zsh-users/zsh-autosuggestions export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=10 # Tab completions -zinit ice wait lucid blockf atpull'zinit creinstall -q .' -zinit light zsh-users/zsh-completions +zi ice wait lucid blockf atpull'zi creinstall -q .' +zi light zsh-users/zsh-completions # Syntax highlighting -zinit ice wait lucid atinit'zpcompinit; zpcdreplay' -zinit light zdharma/fast-syntax-highlighting +zi ice wait lucid atinit'zicompinit; zicdreplay' +zi light z-shell/F-Sy-H ##### END Zinit stuff ##### diff --git a/lainiwa/1st_config/.zsh/aliases.zsh b/lainiwa/1st_config/.zsh/aliases.zsh index 5532fcf..6310027 100755 --- a/lainiwa/1st_config/.zsh/aliases.zsh +++ b/lainiwa/1st_config/.zsh/aliases.zsh @@ -1,9 +1,8 @@ - # Colorize and humanify `ls` if [[ "$(uname -s)" == "FreeBSD" ]]; then - alias ls='ls -h -G' + alias ls='ls -h -G' else - alias ls='ls -h --color=auto' + alias ls='ls -h --color=auto' fi alias ll='ls -l' alias la='ls -A' @@ -18,14 +17,14 @@ alias mkdir='mkdir -pv' alias tree='tree -C' alias U='unbuffer ' -alias -g H="| sed 11q" # (: +alias -g H="| sed 11q" # (: alias -g T="| tail" alias -g G="| grep" alias -g S="| sed" alias -g L="| less" -alias -g LR="| less -R" # less with colors support +alias -g LR="| less -R" # less with colors support alias -g C='| column -t' @@ -33,30 +32,26 @@ alias -g NE="2> /dev/null" alias -g NUL="&> /dev/null" # Set grc alias for available commands. -[[ -f /etc/grc.conf ]] && grc_conf='/etc/grc.conf' +[[ -f /etc/grc.conf ]] && grc_conf='/etc/grc.conf' [[ -f /usr/local/etc/grc.conf ]] && grc_conf='/usr/local/etc/grc.conf' if [ ! -z "$grc_conf" ]; then - for cmd in $(grep '^# ' "$grc_conf" | cut -f 2 -d ' '); do - if (( $+commands[$cmd] )) && [ "$cmd" != "ls" ]; then - alias $cmd="grc --colour=auto $cmd" - fi - done + for cmd in $(grep '^# ' "$grc_conf" | cut -f 2 -d ' '); do + if (($ + commands[$cmd])) && [ "$cmd" != "ls" ]; then + alias $cmd="grc --colour=auto $cmd" + fi + done fi - # Create directory and cd to it -mkcd() { mkdir -- "$1" && cd -P -- "$1" ; } - +mkcd() { mkdir -- "$1" && cd -P -- "$1"; } # Alias for altering some symbol with newline # Example: echo $PATH TRN : -__rt__() { tr -- "$2" "$1" ; } +__rt__() { tr -- "$2" "$1"; } alias -g TRN='| __rt__ "\n" ' - # Remove colors alias -g NOC='| sed -r "s/\x1B\[[0-9;]*[JKmsu]//g"' - # npm-exec binary_name, to run localy installed nodejs binary alias npm-exec='PATH=$(npm bin):$PATH' diff --git a/lainiwa/1st_config/.zsh/completions/_my b/lainiwa/1st_config/.zsh/completions/_my index 99846a6..1b06277 100644 --- a/lainiwa/1st_config/.zsh/completions/_my +++ b/lainiwa/1st_config/.zsh/completions/_my @@ -1,6 +1,5 @@ #compdef _my my - _my() { local line @@ -42,33 +41,31 @@ _my() { "*::arg:->args" case $line[1] in - set_bg) - _set_bg + set_bg) + _set_bg ;; - save_4chan_thread_imgs) - _save_4chan_thread_imgs + save_4chan_thread_imgs) + _save_4chan_thread_imgs ;; - screenshot) - _screenshot + screenshot) + _screenshot ;; - graph_dependencies) - _graph_dependencies + graph_dependencies) + _graph_dependencies ;; - pastebin) - _pastebin + pastebin) + _pastebin ;; - install_package) - _install_package + install_package) + _install_package ;; - dependencies) - _dependencies + dependencies) + _dependencies ;; esac - } - _set_bg() { local line @@ -77,26 +74,25 @@ _set_bg() { "*::arg:->args" case $line[1] in - *) - _files -g "*.(jpg|jpeg|png)" + *) + _files -g "*.(jpg|jpeg|png)" ;; esac } - _save_4chan_thread_imgs() { local -a commands IFS=$'\n' commands=($( curl --silent 'http://www.4chan.org/' | - grep '^||' | # remove unnecessary html - sed -e 's|||' | # now we have a "a Anime & Manga" kind of lines - sed -e 's|\ |:|' | # fit autocompletion format command:description - sed -e 's|\&|\&|' # resolve ampersands + grep '^||' | # remove unnecessary html + sed -e 's|||' | # now we have a "a Anime & Manga" kind of lines + sed -e 's|\ |:|' | # fit autocompletion format command:description + sed -e 's|\&|\&|' # resolve ampersands )) - if (( CURRENT == 2 )); then + if ((CURRENT == 2)); then _describe -t commands 'commands' commands fi @@ -104,116 +100,108 @@ _save_4chan_thread_imgs() { local html local threads local titles - if (( CURRENT == 3 )) && - command -v hxnormalize >/dev/null 2>&1 && # require html-xml-utils - command -v hxselect >/dev/null 2>&1; # - then + if ((CURRENT == 3)) && + command -v hxnormalize >/dev/null 2>&1 && # require html-xml-utils + command -v hxselect >/dev/null 2>&1; then # if [[ "${board}" != "${line[2]}" ]]; then board="${line[2]}" html=$(curl --silent --location "http://boards.4channel.org/${board}/") - threads=$(echo "${html}" | lynx -dump -nonumbers -listonly -stdin | - grep 'thread/[0-9]*$' | sed 's|.*thread/||g') - titles=$(echo "${html}" | hxnormalize -x | tr -d '\n' | - hxselect -c -s '\n' '.postInfo .subject') - IFS=$'\n' commands=($( - paste -d ':' <(echo "${threads}") <(echo "${titles}") - )) + threads=$(echo "${html}" | lynx -dump -nonumbers -listonly -stdin | + grep 'thread/[0-9]*$' | sed 's|.*thread/||g') + titles=$(echo "${html}" | hxnormalize -x | tr -d '\n' | + hxselect -c -s '\n' '.postInfo .subject') + IFS=$'\n' commands=($( + paste -d ':' <(echo "${threads}") <(echo "${titles}") + )) fi _describe -t commands 'commands' commands fi - return 0 } - _screenshot() { local -a commands commands=( - 'full:Shoot whole screen' - 'select:Select an area with mouse to shoot' - 'focused:Shoot focused window' + 'full:Shoot whole screen' + 'select:Select an area with mouse to shoot' + 'focused:Shoot focused window' ) - if (( CURRENT == 2 )); then - _describe -t commands 'commands' commands + if ((CURRENT == 2)); then + _describe -t commands 'commands' commands fi return 0 } - _graph_dependencies() { local -a commands - commands=( $(dpkg --get-selections | sed 's/\t.*//') ) + commands=($(dpkg --get-selections | sed 's/\t.*//')) - if (( CURRENT == 2 )); then - _describe -t commands 'commands' commands + if ((CURRENT == 2)); then + _describe -t commands 'commands' commands fi return 0 } - _pastebin() { local line _arguments -C \ - "-h[Show help information]" \ + "-h[Show help information]" \ "--help[Show help information]" \ - "-x[Insert download URL into clipboard]" \ + "-x[Insert download URL into clipboard]" \ "--xclip[Insert download URL into clipboard]" \ - "-e[Ecrypt file with GPG]" \ + "-e[Ecrypt file with GPG]" \ "--encrypt[Ecrypt file with GPG]" \ "*::arg:->args" case $line[1] in - *) - _files + *) + _files ;; esac } - _install_package() { local -a commands commands=( - 'autobench:HTTP benchmark tool' - 'remarkable:Markdown graphical editor' - 'cgo:Console non-curses gopher client' - 'tomb:Encrypt files' - 'tor-browser:A tor browser from git releases' - 'vte-ng:Enhanced vte terminal widget' - 'dfc:Report file system space usage information' - 'sent:Simple plaintext presentation tool' - 'docker-compose:Tool for defining and running multi-container Docker applications' - 'grv:Terminal interface for viewing git repositories' - 'icecat:A GNU version of Firefox browser' + 'autobench:HTTP benchmark tool' + 'remarkable:Markdown graphical editor' + 'cgo:Console non-curses gopher client' + 'tomb:Encrypt files' + 'tor-browser:A tor browser from git releases' + 'vte-ng:Enhanced vte terminal widget' + 'dfc:Report file system space usage information' + 'sent:Simple plaintext presentation tool' + 'docker-compose:Tool for defining and running multi-container Docker applications' + 'grv:Terminal interface for viewing git repositories' + 'icecat:A GNU version of Firefox browser' ) - if (( CURRENT == 2 )); then - _describe -t commands 'commands' commands + if ((CURRENT == 2)); then + _describe -t commands 'commands' commands fi return 0 } - _dependencies() { local -a commands commands=( - 'self:Dependencies found in current file' - 'posix:POSIX utils' - 'non-posix:Non-POSIX dependencies' - 'check:Notify if some dependency is missing' + 'self:Dependencies found in current file' + 'posix:POSIX utils' + 'non-posix:Non-POSIX dependencies' + 'check:Notify if some dependency is missing' ) - if (( CURRENT == 2 )); then - _describe -t commands 'commands' commands + if ((CURRENT == 2)); then + _describe -t commands 'commands' commands fi return 0 } - _my "$@" diff --git a/lainiwa/1st_config/.zsh/other/command-not-found.zsh b/lainiwa/1st_config/.zsh/other/command-not-found.zsh index 98316e5..8017ee3 100644 --- a/lainiwa/1st_config/.zsh/other/command-not-found.zsh +++ b/lainiwa/1st_config/.zsh/other/command-not-found.zsh @@ -10,20 +10,19 @@ # if command -v prt-get >/dev/null; then - if (( ! ${+functions[command_not_found_handler]} )) ; then - function command_not_found_handler { - crux_find_package ${1+"$1"} && : - } - fi - - crux_find_package() { - bin=$1 - bin_path=$(prt-get fsearch ${bin} | grep "^ .*${bin}$" | sed 's/^ //g' | sed 1q) - [[ -z $bin_path ]] && return 1 - pkg_path=$(prt-get fsearch --full "${bin_path}" | sed 1q | sed 's/Found in \(.*\):/\1/g') - pkg_name=$(basename "${pkg_path}") - printf "%s\n%s\n" "Command '${bin}' not found, but can be installed with:" \ - "sudo prt-get depinst ${pkg_name}" + if (( ! ${+functions[command_not_found_handler]} )) ; then + function command_not_found_handler { + crux_find_package ${1+"$1"} && : } + fi + +crux_find_package() { + bin=$1 + bin_path=$(prt-get fsearch ${bin} | grep "^ .*${bin}$" | sed 's/^ //g' | sed 1q) + [[ -z $bin_path ]] && return 1 + pkg_path=$(prt-get fsearch --full "${bin_path}" | sed 1q | sed 's/Found in \(.*\):/\1/g') + pkg_name=$(basename "${pkg_path}") + printf "%s\n%s\n" "Command '${bin}' not found, but can be installed with:" "sudo prt-get depinst ${pkg_name}" +} fi diff --git a/lainiwa/1st_config/.zsh/zinit.zsh b/lainiwa/1st_config/.zsh/zi.zsh similarity index 75% rename from lainiwa/1st_config/.zsh/zinit.zsh rename to lainiwa/1st_config/.zsh/zi.zsh index c2916a6..00f11e6 100644 --- a/lainiwa/1st_config/.zsh/zinit.zsh +++ b/lainiwa/1st_config/.zsh/zi.zsh @@ -1,29 +1,28 @@ - ################################################################# -# INSTALL `zinit` AND LOAD IT +# INSTALL `zi` AND LOAD IT # -# Install `zinit` if not installed -if [ ! -d "${HOME}/.zinit" ]; then - sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" +# Install `zi` if not installed +if [ ! -d "${HOME}/.zi" ]; then + sh -c "$(curl -fsSL https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh)" fi -# Load `zinit` -source "${HOME}/.zinit/bin/zinit.zsh" -autoload -Uz _zinit -(( ${+_comps} )) && _comps[zinit]=_zinit +# Load `zi` +source "${HOME}/.zi/bin/zi.zsh" +autoload -Uz _zi +(( ${+_comps} )) && _comps[zi]=_zi ################################################################# # FUNCTIONS TO MAKE CONFIGURATION LESS VERBOSE # -turbo0() { zinit ice wait"0a" lucid "${@}"; } -turbo1() { zinit ice wait"0b" lucid "${@}"; } -turbo2() { zinit ice wait"0c" lucid "${@}"; } -zcommand() { zinit ice wait"0b" lucid as"command" "${@}"; } -zload() { zinit load "${@}"; } -zsnippet() { zinit snippet "${@}"; } +turbo0() { zi ice wait"0a" lucid "${@}"; } +turbo1() { zi ice wait"0b" lucid "${@}"; } +turbo2() { zi ice wait"0c" lucid "${@}"; } +zcommand() { zi ice wait"0b" lucid as"command" "${@}"; } +zload() { zi load "${@}"; } +zsnippet() { zi snippet "${@}"; } ################################################################# @@ -62,8 +61,8 @@ zcommand from"gh-r"; zload junegunn/fzf-bin zcommand pick"bin/fzf-tmux"; zload junegunn/fzf # Create and bind multiple widgets using fzf turbo0 multisrc"shell/{completion,key-bindings}.zsh" \ - id-as"junegunn/fzf_completions" pick"/dev/null" - zload junegunn/fzf +id-as"junegunn/fzf_completions" pick"/dev/null" + zload junegunn/fzf # Fuzzy movement and directory choosing turbo1; zload rupa/z # autojump command @@ -76,8 +75,8 @@ zcommand pick"v"; zload rupa/v # Install `fzy` fuzzy finder, if not yet present in the system # Also install helper scripts for tmux and dwtm turbo0 as"command" if'[[ -z "$commands[fzy]" ]]' \ - make"!PREFIX=$ZPFX install" atclone"cp contrib/fzy-* $ZPFX/bin/" pick"$ZPFX/bin/fzy*" - zload jhawthorn/fzy +make"!PREFIX=$ZPFX install" atclone"cp contrib/fzy-* $ZPFX/bin/" pick"$ZPFX/bin/fzy*" + zload jhawthorn/fzy # Install fzy-using widgets turbo0 silent; zload aperezdc/zsh-fzy bindkey '\ec' fzy-cd-widget @@ -97,26 +96,26 @@ export EDITOR=${EDITOR:-vim} # Install `ffsend` (a Firefox Send client) statically-linked binary zcommand from"gh-r" bpick"*-static" mv"* -> ffsend"; - zload timvisee/ffsend + zload timvisee/ffsend # Install `ffsend` completions turbo0 as'completion' id-as'timvisee/ffsend_completions' - zsnippet 'https://raw.githubusercontent.com/timvisee/ffsend/master/contrib/completions/_ffsend' + zsnippet 'https://raw.githubusercontent.com/timvisee/ffsend/master/contrib/completions/_ffsend' # Install `cloc` (code summary) binary if not already installed via package manager zcommand if'[[ -z "$commands[cloc]" ]]' from"gh-r" bpick"*pl" mv"cloc-* -> cloc"; - zload AlDanial/cloc + zload AlDanial/cloc # Install timelapse screen recorder zcommand from"gh-r" mv'tl-* -> tl' if'[[ -n $DISPLAY ]]' - zload ryanmjacobs/tl + zload ryanmjacobs/tl ################################################################# # INSTALL `k` COMMAND AND GENERATE COMPLITIONS # turbo0; zload RobSis/zsh-completion-generator -turbo1 atclone"gencomp k; ZINIT[COMPINIT_OPTS]='-i' zpcompinit" atpull'%atclone' - zload supercrabtree/k +turbo1 atclone"gencomp k; ZI[COMPINIT_OPTS]='-i' zicompinit" atpull'%atclone' + zload supercrabtree/k alias l='k -h' @@ -125,7 +124,7 @@ alias l='k -h' # # Add `git dsf` command to git -zcommand pick"bin/git-dsf"; zload zdharma/zsh-diff-so-fancy +zcommand pick"bin/git-dsf"; zload z-shell/zsh-diff-so-fancy # Add command-line online translator turbo1 if'[[ -n "$commands[gawk]" ]]'; zload soimort/translate-shell @@ -151,11 +150,11 @@ export GITCD_HOME=${HOME}/tmp # Install completions for `my` script and for python-gist # (use `-f` flag to force completion installation) -zinit ice as"completion" if"[ -f '${HOME}/.zsh/completions/_my' ]" id-as"my"; - zsnippet "${HOME}/.zsh/completions/_my" +zi ice as"completion" if"[ -f '${HOME}/.zsh/completions/_my' ]" id-as"my"; + zsnippet "${HOME}/.zsh/completions/_my" turbo0 as"completion" if"[ -f '${HOME}/.local/share/gist/gist.zsh' ]" id-as"gist" mv"gist.zsh -> _gist"; - zsnippet "${HOME}/.local/share/gist/gist.zsh" + zsnippet "${HOME}/.local/share/gist/gist.zsh" ################################################################# @@ -167,12 +166,12 @@ turbo0 blockf zload zsh-users/zsh-completions # History search by `Ctrl+R` -turbo1; zload zdharma/history-search-multi-word +turbo1; zload z-shell/history-search-multi-word # Syntax highlighting # (compinit without `-i` spawns warning on `sudo -s`) -turbo0 atinit"ZINIT[COMPINIT_OPTS]='-i' zpcompinit; zpcdreplay" - zload zdharma/fast-syntax-highlighting +turbo0 atinit"ZI[COMPINIT_OPTS]='-i' zicompinit; zicdreplay" + zload z-shell/F-Sy-H # Autosuggestions # Note: should go _after_ syntax highlighting plugin diff --git a/lainiwa/1st_config/.zshrc b/lainiwa/1st_config/.zshrc index 6e71297..cac4625 100644 --- a/lainiwa/1st_config/.zshrc +++ b/lainiwa/1st_config/.zshrc @@ -29,7 +29,7 @@ export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' export PAGER=$(_1st_found most less more) export EDITOR=$(_1st_found emacs vim vi) # Set a virtualenvwrapper path, if not already set (resolves tmux nesting issue) -export VIRTUALENVWRAPPER_PYTHON="${VIRTUALENVWRAPPER_PYTHON:-$(which "$(_1st_found python3.6 python3.5 python3)")}" +export VIRTUALENVWRAPPER_PYTHON="${VIRTUALENVWRAPPER_PYTHON:-$(which "$(_1st_found python3.9 python3.9 python3)")}" # Node Version Manager (NVM) direcory export NVM_DIR="${HOME}/.nvm" @@ -46,7 +46,7 @@ for file in "${NVM_DIR}/nvm.sh" \ "${HOME}/.zsh/prompts.zsh" \ "${HOME}/.zsh/aliases.zsh" \ "${HOME}/.zsh/set_history.zsh" \ - "${HOME}/.zsh/zinit.zsh" \ + "${HOME}/.zsh/zi.zsh" \ "${HOME}/.zsh/completions.zsh" \ "${HOME}/.zsh/other/command-not-found.zsh" \ "${HOME}/.local/bin/virtualenvwrapper_lazy.sh" diff --git a/numToStr/zshrc.zsh b/numToStr/zshrc.zsh index f3f36ce..452fadf 100644 --- a/numToStr/zshrc.zsh +++ b/numToStr/zshrc.zsh @@ -1,25 +1,25 @@ -#!/bin/zsh - -### Added by Zinit's installer -if [[ ! -f $HOME/.zinit/bin/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/zinit "$HOME/.zinit/bin" && \ - print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \ - print -P "%F{160}▓▒░ The clone has failed.%f%b" +#!/usr/bin/env/zsh + +### Added by ZI's installer +if [[ ! -f $HOME/.zi/bin/zi.zsh ]]; then + print -P "%F{33}▓▒░ %F{220}Installing %F{33}ZI%F{220} Initiative Plugin Manager (%F{33}z-shell/zi%F{220})…%f" + command mkdir -p "$HOME/.zi" && command chmod g-rwX "$HOME/.zi" + command git clone https://github.com/z-shell/zi "$HOME/.zi/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" -autoload -Uz _zinit -(( ${+_comps} )) && _comps[zinit]=_zinit -### End of Zinit's installer chunk +source "$HOME/.zi/bin/zi.zsh" +autoload -Uz _zi +(( ${+_comps} )) && _comps[zi]=_zi +### End of ZI's installer chunk ##################### # PROMPT # ##################### -zinit lucid for \ - as"command" from"gh-r" atinit'export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"' atload'eval "$(starship init zsh)"' bpick'*unknown-linux-gnu*' \ - starship/starship \ +zi lucid for \ + as"command" from"gh-r" atinit'export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"' atload'eval "$(starship init zsh)"' bpick'*unknown-linux-gnu*' \ + starship/starship \ ########################## @@ -36,48 +36,48 @@ setopt promptsubst # Explanation: # - Loading tmux first, to prevent jumps when tmux is loaded after .zshrc # - History plugin is loaded early (as it has some defaults) to prevent empty history stack for other plugins -zinit lucid for \ - atinit" - ZSH_TMUX_FIXTERM=true - ZSH_TMUX_AUTOSTART=true - ZSH_TMUX_AUTOCONNECT=true - " \ - OMZP::tmux \ - atinit"HIST_STAMPS=dd.mm.yyyy" \ - OMZL::history.zsh \ - - -zinit wait lucid for \ - OMZL::clipboard.zsh \ - OMZL::compfix.zsh \ - OMZL::completion.zsh \ - OMZL::correction.zsh \ - atload" - alias ..='cd ..' - alias ...='cd ../..' - alias ....='cd ../../..' - alias .....='cd ../../../..' - " \ - OMZL::directories.zsh \ - OMZL::git.zsh \ - OMZL::grep.zsh \ - OMZL::key-bindings.zsh \ - OMZL::spectrum.zsh \ - OMZL::termsupport.zsh \ - atload" - alias gcd='gco dev' - " \ - OMZP::git \ - OMZP::fzf \ - atload" - alias dcupb='docker-compose up --build' - " \ - OMZP::docker-compose \ - as"completion" \ - OMZP::docker/_docker \ - djui/alias-tips \ - # hlissner/zsh-autopair \ - # chriskempson/base16-shell \ +zi lucid for \ +atinit" + ZSH_TMUX_FIXTERM=true + ZSH_TMUX_AUTOSTART=true + ZSH_TMUX_AUTOCONNECT=true +" \ +OMZP::tmux \ +atinit"HIST_STAMPS=dd.mm.yyyy" \ +OMZL::history.zsh \ + + +zi wait lucid for \ +OMZL::clipboard.zsh \ +OMZL::compfix.zsh \ +OMZL::completion.zsh \ +OMZL::correction.zsh \ + atload" + alias ..='cd ..' + alias ...='cd ../..' + alias ....='cd ../../..' + alias .....='cd ../../../..' + " \ +OMZL::directories.zsh \ +OMZL::git.zsh \ +OMZL::grep.zsh \ +OMZL::key-bindings.zsh \ +OMZL::spectrum.zsh \ +OMZL::termsupport.zsh \ + atload" + alias gcd='gco dev' + " \ +OMZP::git \ +OMZP::fzf \ + atload" + alias dcupb='docker-compose up --build' + " \ +OMZP::docker-compose \ +as"completion" \ + OMZP::docker/_docker \ + djui/alias-tips \ + # hlissner/zsh-autopair \ + # chriskempson/base16-shell \ ##################### # PLUGINS # @@ -87,62 +87,59 @@ zinit wait lucid for \ # IMPORTANT: # These plugins should be loaded after ohmyzsh plugins -zinit wait lucid for \ - light-mode atinit"ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20" atload"_zsh_autosuggest_start" \ - zsh-users/zsh-autosuggestions \ - light-mode atinit" - typeset -gA FAST_HIGHLIGHT; - FAST_HIGHLIGHT[git-cmsg-len]=100; - zpcompinit; - zpcdreplay; - " \ - zdharma/fast-syntax-highlighting \ - light-mode blockf atpull'zinit creinstall -q .' \ - atinit" - zstyle ':completion:*' completer _expand _complete _ignored _approximate - zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' - zstyle ':completion:*' menu select=2 - zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' - zstyle ':completion:*:descriptions' format '-- %d --' - zstyle ':completion:*:processes' command 'ps -au$USER' - zstyle ':completion:complete:*:options' sort false - zstyle ':fzf-tab:complete:_zlua:*' query-string input - zstyle ':completion:*:*:*:*:processes' command 'ps -u $USER -o pid,user,comm,cmd -w -w' - zstyle ':fzf-tab:complete:kill:argument-rest' extra-opts --preview=$extract'ps --pid=$in[(w)1] -o cmd --no-headers -w -w' --preview-window=down:3:wrap - zstyle ':fzf-tab:complete:cd:*' extra-opts --preview=$extract'exa -1 --color=always ${~ctxt[hpre]}$in' - " \ - zsh-users/zsh-completions \ - bindmap"^R -> ^H" atinit" - zstyle :history-search-multi-word page-size 10 - zstyle :history-search-multi-word highlight-color fg=red,bold - zstyle :plugin:history-search-multi-word reset-prompt-protect 1 - " \ - zdharma/history-search-multi-word \ - reset \ - atclone"local P=${${(M)OSTYPE:#*darwin*}:+g} - \${P}sed -i \ - '/DIR/c\DIR 38;5;63;1' LS_COLORS; \ - \${P}dircolors -b LS_COLORS > c.zsh" \ - atpull'%atclone' pick"c.zsh" nocompile'!' \ - atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”' \ - trapd00r/LS_COLORS +zi wait lucid for \ +light-mode atinit"ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20" atload"_zsh_autosuggest_start" \ + zsh-users/zsh-autosuggestions \ +light-mode atinit" + typeset -gA FAST_HIGHLIGHT; + FAST_HIGHLIGHT[git-cmsg-len]=100; + zicompinit; + zicdreplay; +" \ + z-shell/F-Sy-H \ +light-mode blockf atpull'zi creinstall -q .' \ +atinit" + zstyle ':completion:*' completer _expand _complete _ignored _approximate + zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' + zstyle ':completion:*' menu select=2 + zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' + zstyle ':completion:*:descriptions' format '-- %d --' + zstyle ':completion:*:processes' command 'ps -au$USER' + zstyle ':completion:complete:*:options' sort false + zstyle ':fzf-tab:complete:_zlua:*' query-string input + zstyle ':completion:*:*:*:*:processes' command 'ps -u $USER -o pid,user,comm,cmd -w -w' + zstyle ':fzf-tab:complete:kill:argument-rest' extra-opts --preview=$extract'ps --pid=$in[(w)1] -o cmd --no-headers -w -w' --preview-window=down:3:wrap + zstyle ':fzf-tab:complete:cd:*' extra-opts --preview=$extract'exa -1 --color=always ${~ctxt[hpre]}$in' +" \ + zsh-users/zsh-completions \ +bindmap"^R -> ^H" atinit" + zstyle :history-search-multi-word page-size 10 + zstyle :history-search-multi-word highlight-color fg=red,bold + zstyle :plugin:history-search-multi-word reset-prompt-protect 1 +" \ + z-shell/H-S-MW \ +reset \ +atclone"local P=${${(M)OSTYPE:#*darwin*}:+g}${P}sed -i '/DIR/c\DIR 38;5;63;1' LS_COLORS; ${P}dircolors -b LS_COLORS > c.zsh" \ +atpull'%atclone' pick"c.zsh" nocompile'!' \ +atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”' \ + trapd00r/LS_COLORS ##################### # PROGRAMS # ##################### -zinit wait'1' lucid light-mode for \ - pick"z.sh" \ - knu/z \ - as'command' atinit'export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"' pick"bin/n" \ - tj/n \ - from'gh-r' as'command' atinit'export PATH="$HOME/.yarn/bin:$PATH"' mv'yarn* -> yarn' pick"yarn/bin/yarn" bpick'*.tar.gz' \ - yarnpkg/yarn \ +zi wait'1' lucid light-mode for \ + pick"z.sh" \ + knu/z \ + as'command' atinit'export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"' pick"bin/n" \ + tj/n \ + from'gh-r' as'command' atinit'export PATH="$HOME/.yarn/bin:$PATH"' mv'yarn* -> yarn' pick"yarn/bin/yarn" bpick'*.tar.gz' \ + yarnpkg/yarn ##################### # Misc Stuff # ##################### -zinit is-snippet for \ - if"[[ -f $HOME/.localrc ]]" $HOME/.localrc +zi is-snippet for \ +if"[[ -f $HOME/.localrc ]]" $HOME/.localrc diff --git a/psprint/bootstrap.sh b/psprint/bootstrap.sh index b45dfee..98289ee 100644 --- a/psprint/bootstrap.sh +++ b/psprint/bootstrap.sh @@ -1,12 +1,12 @@ #!/usr/bin/env zsh sudo DEBIAN_FRONTEND=noninteractive apt install --yes cmake redis-server libhiredis-dev \ - tree gem libfreetype6-dev libfontconfig-dev \ - autoconf automake nodejs npm + tree gem libfreetype6-dev libfontconfig-dev \ + autoconf automake nodejs npm # For zdharma/zredis sudo mkdir -p usr/local/var/db/redis # Install exa for ls aliases – currently not needed as -# it is installed via zplugin +# it is installed via zi #cargo install exa diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index dde4ed9..a7accae 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -2,8 +2,6 @@ # Exports # -module_path+=("$HOME/.zinit/bin/zmodules/Src"); zmodload zdharma/zplugin &>/dev/null - typeset -g HISTSIZE=290000 SAVEHIST=290000 HISTFILE=~/.zhistory ABSD=${${(M)OSTYPE:#*(darwin|bsd)*}:+1} typeset -ga mylogs @@ -11,8 +9,8 @@ zflai-msg() { mylogs+=( "$1" ); } zflai-assert() { mylogs+=( "$4"${${${1:#$2}:+FAIL}:-OK}": $3" ); } (( ABSD )) && { - export LSCOLORS=dxfxcxdxbxegedabagacad CLICOLOR="1" - export ANDROID_ROOT=/opt/android + export LSCOLORS=dxfxcxdxbxegedabagacad CLICOLOR="1" + export ANDROID_ROOT=/opt/android } export EDITOR="vim" LESS="-iRFX" CVS_RSH="ssh" @@ -177,32 +175,27 @@ alias updatedb="sudo /usr/libexec/locate.updatedb" # alias ls=psls ... - retain ls options but substitute the command with psls if altxt=`alias ls`; then - altxt="${altxt#alias }" # for sh - if [ "$altxt" != "${altxt#ls=\'(ls|exa)}" ]; then - altxt=${altxt#ls=\'exa} - altxt=${altxt%\'} - altxt="ls=psls$altxt" - alias "$altxt" - zflai-msg "[zshrc] \`ls' alias: $altxt" - fi + altxt="${altxt#alias }" # for sh + if [ "$altxt" != "${altxt#ls=\'(ls|exa)}" ]; then + altxt=${altxt#ls=\'exa} + altxt=${altxt%\'} + altxt="ls=psls$altxt" + alias "$altxt" + zflai-msg "[zshrc] \`ls' alias: $altxt" + fi else - alias ls="psls" - zflai-msg "[zshrc] \`ls' alias: ls=psls" + alias ls="psls" + zflai-msg "[zshrc] \`ls' alias: ls=psls" fi unset altxt fpath+=( $HOME/functions ) -autoload -Uz psprobe_host psffconv pssetup_ssl_cert psrecompile pscopy_xauth \ - psls pslist psfind \ - mandelbrot optlbin_on optlbin_off localbin_on localbin_off g1all g1zip \ - zman \ - t1uncolor t1fromhex t1countdown \ - f1rechg_x_min f1biggest \ - n1gglinks n1dict n1diki n1gglinks n1ggw3m n1ling n1ssl_tunnel \ - n1ssl_rtunnel \ - pngimage deploy-code deploy-message +autoload -Uz psprobe_host psffconv pssetup_ssl_cert psrecompile pscopy_xauth psls pslist psfind \ +mandelbrot optlbin_on optlbin_off localbin_on localbin_off g1all g1zip zman t1uncolor t1fromhex t1countdown \ +f1rechg_x_min f1biggest n1gglinks n1dict n1diki n1gglinks n1ggw3m n1ling n1ssl_tunnel n1ssl_rtunnel \ +pngimage deploy-code deploy-message autoload +X zman functions[zzman]="${functions[zman]}" @@ -216,19 +209,19 @@ function pbcopydir { } function from-where { - echo $^fpath/$_comps[$1](N) - whence -v $_comps[$1] - #which $_comps[$1] 2>&1 | head + echo $^fpath/$_comps[$1](N) + whence -v $_comps[$1] + #which $_comps[$1] 2>&1 | head } whichcomp() { - for 1; do - ( print -raC 2 -- $^fpath/${_comps[$1]:?unknown command}(NP*$1*) ) - done + for 1; do + ( print -raC 2 -- $^fpath/${_comps[$1]:?unknown command}(NP*$1*) ) + done } osxnotify() { - osascript -e 'display notification "'"$*"'"' + osascript -e 'display notification "'"$*"'"' } @@ -251,210 +244,208 @@ zflai-msg "[zshrc] ssl tunnel PID: $!" typeset -F4 SECONDS=0 -[[ ! -f ~/.zinit/bin/zinit.zsh ]] && { - command mkdir -p ~/.zinit - command git clone https://github.com/zdharma/zinit ~/.zinit/bin +[[ ! -f ~/.zi/bin/zi.zsh ]] && { + command mkdir -p ~/.zi + command git clone https://github.com/z-shell/zi ~/.zi/bin } -source "$HOME/.zinit/bin/zinit.zsh" -autoload -Uz _zinit -(( ${+_comps} )) && _comps[zinit]=_zinit +source "$HOME/.zi/bin/zi.zsh" +autoload -Uz _zi +(( ${+_comps} )) && _comps[zi]=_zi -# Zplugin annexes -# zinit-zsh/z-a-man \ -zinit light-mode for \ - zinit-zsh/z-a-as-monitor \ - zinit-zsh/z-a-patch-dl \ - zinit-zsh/z-a-submods \ - zinit-zsh/z-a-bin-gem-node \ - zinit-zsh/z-a-rust +# annexes +zi light-mode for \ + z-shell/z-a-readurl \ + z-shell/z-a-patch-dl \ + z-shell/z-a-submods \ + z-shell/z-a-bin-gem-node \ + z-shell/z-a-rust # Fast-syntax-highlighting & autosuggestions -zinit wait lucid for \ - atinit"ZINIT[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" \ - zdharma/fast-syntax-highlighting \ - atload"!_zsh_autosuggest_start" \ - zsh-users/zsh-autosuggestions \ - blockf \ - zsh-users/zsh-completions +zi wait lucid for \ +atinit"ZI[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" \ + z-shell/F-Sy-H \ +atload"!_zsh_autosuggest_start" \ + zsh-users/zsh-autosuggestions \ +blockf \ + zsh-users/zsh-completions # lib/git.zsh is loaded mostly to stay in touch with the plugin (for the users) # and for the themes 2 & 3 (lambda-mod-zsh-theme & lambda-gitster) -zinit wait lucid for \ - zdharma/zsh-unique-id \ - OMZ::lib/git.zsh \ - atload"unalias grv g" \ - OMZ::plugins/git/git.plugin.zsh +zi wait lucid for \ + z-shell/zsh-unique-id \ + OMZ::lib/git.zsh \ +atload"unalias grv g" \ + OMZ::plugins/git/git.plugin.zsh # Theme no. 1 - zprompts -zinit lucid \ - load'![[ $MYPROMPT = 1 ]]' \ - unload'![[ $MYPROMPT != 1 ]]' \ - atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3 yellow red green blue' \ - nocd for \ - psprint/zprompts +zi lucid \ +load'![[ $MYPROMPT = 1 ]]' \ +unload'![[ $MYPROMPT != 1 ]]' \ +atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3 yellow red green blue' \ +nocd for \ + z-shell/zprompts # Theme no. 2 – lambda-mod-zsh-theme -zinit lucid load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' nocd for \ - halfo/lambda-mod-zsh-theme +zi lucid load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' nocd for \ + halfo/lambda-mod-zsh-theme # Theme no. 3 – lambda-gitster -zinit lucid load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' nocd for \ - ergenekonyigit/lambda-gitster +zi lucid load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' nocd for \ + ergenekonyigit/lambda-gitster # Theme no. 4 – geometry -zinit lucid load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ - atload'!geometry::prompt' nocd \ - atinit'GEOMETRY_COLOR_DIR=63 GEOMETRY_PATH_COLOR=63' for \ - geometry-zsh/geometry +zi lucid load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ +atload'!geometry::prompt' nocd \ +atinit'GEOMETRY_COLOR_DIR=63 GEOMETRY_PATH_COLOR=63' for \ + geometry-zsh/geometry # Theme no. 5 – pure -zinit lucid load'![[ $MYPROMPT = 5 ]]' unload'![[ $MYPROMPT != 5 ]]' \ - pick"/dev/null" multisrc"{async,pure}.zsh" atload'!prompt_pure_precmd' nocd for \ - sindresorhus/pure +zi lucid load'![[ $MYPROMPT = 5 ]]' unload'![[ $MYPROMPT != 5 ]]' \ +pick"/dev/null" multisrc"{async,pure}.zsh" atload'!prompt_pure_precmd' nocd for \ + sindresorhus/pure # Theme no. 6 - agkozak-zsh-theme -zinit lucid load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' \ - atload'!_agkozak_precmd' nocd atinit'AGKOZAK_FORCE_ASYNC_METHOD=subst-async' for \ - agkozak/agkozak-zsh-theme +zi lucid load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' \ +atload'!_agkozak_precmd' nocd atinit'AGKOZAK_FORCE_ASYNC_METHOD=subst-async' for \ + agkozak/agkozak-zsh-theme # Theme no. 7 - zinc -zinit load'![[ $MYPROMPT = 7 ]]' unload'![[ $MYPROMPT != 7 ]]' \ - compile"{zinc_functions/*,segments/*,zinc.zsh}" nocompletions \ - atload'!prompt_zinc_setup; prompt_zinc_precmd' nocd for \ - robobenklein/zinc +zi load'![[ $MYPROMPT = 7 ]]' unload'![[ $MYPROMPT != 7 ]]' \ +compile"{zinc_functions/*,segments/*,zinc.zsh}" nocompletions \ +atload'!prompt_zinc_setup; prompt_zinc_precmd' nocd for \ + robobenklein/zinc # Theme no. 8 - git-prompt -zinit lucid load'![[ $MYPROMPT = 8 ]]' unload'![[ $MYPROMPT != 8 ]]' \ - atload'!_zsh_git_prompt_precmd_hook' nocd for \ - woefe/git-prompt.zsh +zi lucid load'![[ $MYPROMPT = 8 ]]' unload'![[ $MYPROMPT != 8 ]]' \ +atload'!_zsh_git_prompt_precmd_hook' nocd for \ + woefe/git-prompt.zsh # zunit, color -zinit wait"2" lucid as"null" for \ - sbin atclone"./build.zsh" atpull"%atclone" \ - molovo/zunit \ - sbin"color.zsh -> color" \ - molovo/color +zi wait"2" lucid as"null" for \ +sbin atclone"./build.zsh" atpull"%atclone" \ + molovo/zunit \ +sbin"color.zsh -> color" \ + molovo/color # revolver -zinit wait"2" lucid as"program" pick"revolver" for psprint/revolver +zi wait"2" lucid as"program" pick"revolver" for z-shell/revolver -zinit pack for dircolors-material +zi pack for dircolors-material # Zconvey shell integration plugin -zinit wait lucid \ - sbin"cmds/zc-bg-notify" sbin"cmds/plg-zsh-notify" for \ - zdharma/zconvey +zi wait lucid \ +sbin"cmds/zc-bg-notify" sbin"cmds/plg-zsh-notify" for \ + z-shell/zconvey # zsh-startify, a vim-startify like plugin -: zinit wait"0b" lucid atload"zsh-startify" for zdharma/zsh-startify -: zinit wait lucid pick"manydots-magic" compile"manydots-magic" for knu/zsh-manydots-magic +: zi wait"0b" lucid atload"zsh-startify" for z-shell/zsh-startify +: zi wait lucid pick"manydots-magic" compile"manydots-magic" for knu/zsh-manydots-magic # remark -zinit pack for remark +zi pack for remark # zsh-autopair # fzf-marks, at slot 0, for quick Ctrl-G accessibility -zinit wait lucid for \ - hlissner/zsh-autopair \ - urbainvaes/fzf-marks +zi wait lucid for \ + hlissner/zsh-autopair \ + urbainvaes/fzf-marks # A few wait"1 plugins -zinit wait"1" lucid for \ - psprint/zsh-navigation-tools \ - atinit'zstyle ":history-search-multi-word" page-size "7"' \ - zdharma/history-search-multi-word \ - atinit"local zew_word_style=whitespace" \ - psprint/zsh-editing-workbench +zi wait"1" lucid for \ + z-shell/zsh-navigation-tools \ +atinit'zstyle ":history-search-multi-word" page-size "7"' \ + z-shell/H-S-MW \ +atinit"local zew_word_style=whitespace" \ + z-shell/zsh-editing-workbench # Github-Issue-Tracker – the notifier thread -zinit lucid id-as"GitHub-notify" \ - on-update-of'~/.cache/zsh-github-issues/new_titles.log' \ - notify'New issue: $NOTIFY_MESSAGE' for \ - zdharma/zsh-github-issues +zi lucid id-as"GitHub-notify" \ +on-update-of'~/.cache/zsh-github-issues/new_titles.log' \ +notify'New issue: $NOTIFY_MESSAGE' for \ + z-shell/zsh-github-issues # Github-Issue-Tracker – the issue-puller thread GIT_SLEEP_TIME=700 -GIT_PROJECTS=zdharma/zsh-github-issues:zdharma/zinit +GIT_PROJECTS=z-shell/zsh-github-issues:z-shell/zi -zinit wait"2" lucid service"GIT" \ - pick"zsh-github-issues.service.zsh" for \ - zdharma/zsh-github-issues +zi wait"2" lucid service"GIT" \ +pick"zsh-github-issues.service.zsh" for \ + z-shell/zsh-github-issues # Gitignore plugin – commands gii and gi -zinit wait"2" lucid trigger-load'!gi;!gii' \ - dl'https://gist.githubusercontent.com/psprint/1f4d0a3cb89d68d3256615f247e2aac9/raw -> templates/Zsh.gitignore' \ - for \ - voronkovich/gitignore.plugin.zsh +#zi wait"2" lucid trigger-load'!gi;!gii' \ +# dl'https://gist.githubusercontent.com/z-shell/1f4d0a3cb89d68d3256615f247e2aac9/raw -> templates/Zsh.gitignore' \ +# for \ +# voronkovich/gitignore.plugin.zsh # F-Sy-H automatic themes – available for patrons -# https://patreon.com/psprint -: zinit wait"1" lucid from"psprint@gitlab.com" for psprint/fsh-auto-themes +#: zi wait"1" lucid from"z-shell@gitlab.com" for z-shell/fsh-auto-themes # ogham/exa, sharkdp/fd, fzf -zinit wait"2" lucid as"null" from"gh-r" for \ - mv"exa* -> exa" sbin ogham/exa \ - mv"fd* -> fd" sbin"fd/fd" @sharkdp/fd +zi wait"2" lucid as"null" from"gh-r" for \ +mv"exa* -> exa" sbin ogham/exa \ +mv"fd* -> fd" sbin"fd/fd" @sharkdp/fd # fzf, fzy -zinit pack"bgn-binary" for fzf -zinit pack"bgn" for fzy +zi pack"bgn-binary" for fzf +zi pack"bgn" for fzy # A few wait'2' plugins -zinit wait"2" lucid for \ - zdharma/declare-zsh \ - zdharma/zflai \ - blockf \ - zdharma/zui \ - zinit-zsh/zinit-console \ - trigger-load'!crasis' \ - zdharma/zinit-crasis \ - atinit"forgit_ignore='fgi'" \ - wfxr/forgit +zi wait"2" lucid for \ +z-shell/declare-zsh \ +z-shell/zflai \ + blockf \ +z-shell/zui \ +z-shell/zi-console \ + trigger-load'!crasis' \ +z-shell/zi-crasis \ + atinit"forgit_ignore='fgi'" \ +wfxr/forgit # git-cal -zinit wait"2" lucid as"null" \ - atclone'perl Makefile.PL PREFIX=$ZPFX' \ - atpull'%atclone' make sbin"git-cal" for \ - k4rthik/git-cal +zi wait"2" lucid as"null" \ +atclone'perl Makefile.PL PREFIX=$ZPFX' \ +atpull'%atclone' make sbin"git-cal" for \ + k4rthik/git-cal # A few wait'3' git extensions -zinit as"null" wait"3" lucid for \ - sbin Fakerr/git-recall \ - sbin paulirish/git-open \ - sbin paulirish/git-recent \ - sbin davidosomething/git-my \ - sbin atload"export _MENU_THEME=legacy" \ - arzzen/git-quick-stats \ - sbin iwata/git-now \ - make"PREFIX=$ZPFX" tj/git-extras \ - sbin"bin/git-dsf;bin/diff-so-fancy" zdharma/zsh-diff-so-fancy \ - sbin"git-url;git-guclone" make"GITURL_NO_CGITURL=1" zdharma/git-url +zi as"null" wait"3" lucid for \ +sbin Fakerr/git-recall \ +sbin paulirish/git-open \ +sbin paulirish/git-recent \ +sbin davidosomething/git-my \ +sbin atload"export _MENU_THEME=legacy" \ + arzzen/git-quick-stats \ +sbin iwata/git-now \ +make"PREFIX=$ZPFX" tj/git-extras \ +sbin"bin/git-dsf;bin/diff-so-fancy" z-shell/zsh-diff-so-fancy \ +sbin"git-url;git-guclone" make"GITURL_NO_CGITURL=1" z-shell/git-url # fbterm -: zinit wait"3" lucid as"command" \ - pick"$ZPFX/bin/fbterm" \ - dl"https://bugs.archlinux.org/task/46860?getfile=13513 -> ins.patch" \ - dl"https://aur.archlinux.org/cgit/aur.git/plain/0001-Fix-build-with-gcc-6.patch?h=fbterm-git" \ - patch"ins.patch; 0001-Fix-build-with-gcc-6.patch" \ - atclone"./configure --prefix=$ZPFX" \ - atpull"%atclone" \ - make"install" reset for \ - izmntuk/fbterm +: zi wait"3" lucid as"command" \ +pick"$ZPFX/bin/fbterm" \ +dl"https://bugs.archlinux.org/task/46860?getfile=13513 -> ins.patch" \ +dl"https://aur.archlinux.org/cgit/aur.git/plain/0001-Fix-build-with-gcc-6.patch?h=fbterm-git" \ +patch"ins.patch; 0001-Fix-build-with-gcc-6.patch" \ +atclone"./configure --prefix=$ZPFX" \ +atpull"%atclone" \ +make"install" reset for \ + izmntuk/fbterm # asciinema -: zinit wait lucid as"command" \ - atinit"export PYTHONPATH=$ZPFX/lib/python3.7/site-packages/" \ - atclone"PYTHONPATH=$ZPFX/lib/python3.7/site-packages/ \ - python3 setup.py --quiet install --prefix $ZPFX" \ - atpull'%atclone' test'0' \ - pick"$ZPFX/bin/asciinema" for \ - asciinema/asciinema +: zi wait lucid as"command" \ +atinit"export PYTHONPATH=$ZPFX/lib/python3.9/site-packages/" \ +atclone"PYTHONPATH=$ZPFX/lib/python3.9/site-packages/ \ +python3 setup.py --quiet install --prefix $ZPFX" \ +atpull'%atclone' test'0' \ +pick"$ZPFX/bin/asciinema" for \ + asciinema/asciinema # Notifications, configured to use zconvey -: zinit wait lucid for marzocchi/zsh-notify +: zi wait lucid for marzocchi/zsh-notify -zflai-msg "[zshrc] Zplugin block took ${(M)$(( SECONDS * 1000 ))#*.?} ms" +zflai-msg "[zshrc] ZI block took ${(M)$(( SECONDS * 1000 ))#*.?} ms" MYPROMPT=1 @@ -481,9 +472,4 @@ bindkey -M menuselect ' ' .accept-line function mem() { ps -axv | grep $$ } -# added by travis gem -[ -f /Users/sgniazdowski/.travis/travis.sh ] && source /Users/sgniazdowski/.travis/travis.sh - -export GOPATH="/Users/sgniazdowski/go" - zflai-msg "[zshrc] Finishing, loaded custom modules: ${(j:, :@)${(k)modules[@]}:#zsh/*}"