From e549e10af629505b18190ca06cd9ab5a6442f38c Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Thu, 11 Jul 2019 18:36:34 +0200 Subject: [PATCH 01/51] psprint: Fresh version of the zshrc --- psprint/zshrc.zsh | 49 +++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index d880c0c..b89a316 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -198,7 +198,8 @@ autoload -Uz psprobe_host psffconv pssetup_ssl_cert psrecompile pscop t1uncolor t1fromhex t1countdown \ f1rechg_x_min f1biggest \ n1gglinks n1dict n1diki n1gglinks n1ggw3m n1ling n1ssl_tunnel \ - n1ssl_rtunnel + n1ssl_rtunnel \ + pngimage deploy-code function run_diso { sh -c "$@" & @@ -255,13 +256,12 @@ zplugin load zdharma/zsh-unique-id # Loaded mostly to stay in touch with the plugin (for the users) # and for the themes 2 & 3 (lambda-mod-zsh-theme & lambda-gitster) -zplugin ice wait"0" lucid +zplugin ice wait lucid zplugin snippet OMZ::lib/git.zsh # Loaded mostly to stay in touch with the plugin (for the users) -zplugin ice wait"0" atload"unalias grv g" lucid +zplugin ice wait atload"unalias grv g" lucid zplugin snippet OMZ::plugins/git/git.plugin.zsh - # zsh-startify, a vim-startify -like plugin zplugin ice wait'0b' lucid atload'zsh-startify' zplugin load zdharma/zsh-startify @@ -276,9 +276,13 @@ zplugin ice wait'0c' lucid \ zplugin light trapd00r/LS_COLORS # Zconvey shell integration plugin -zplugin ice wait"0" silent +zplugin ice wait silent zplugin load zdharma/zconvey +# z-plugin (a Zplugin extension) which allows to explicitly clone submodules +zplugin ice wait lucid +zplugin light zdharma/z-p-submods + # Another load of the same plugin, to add zc-bg-notify to PATH zplugin ice pick"cmds/zc-bg-notify" as"command" wait"1" id-as'zconvey-cmd' silent zplugin load zdharma/zconvey @@ -290,11 +294,11 @@ zplugin ice wait'1' lucid as"command" make"!PREFIX=$ZPFX install" \ zplugin light jhawthorn/fzy # fzf, for fzf-marks -zplugin ice wait'0' lucid as"command" from"gh-r" +zplugin ice wait lucid as"command" from"gh-r" zplugin light junegunn/fzf-bin # fzf-marks, at slot 0, for quick Ctrl-G accessibility -zplugin ice wait'0' lucid +zplugin ice wait lucid zplugin load urbainvaes/fzf-marks # zredis together with some binding/tying @@ -308,9 +312,9 @@ zplugin ice service"redis" lucid wait"1" zplugin light zservices/redis # zsh-editing-workbench & zsh-navigation-tools -zplugin ice wait"0" lucid +zplugin ice wait'1' lucid zplugin load psprint/zsh-editing-workbench -zplugin ice wait"0" lucid +zplugin ice wait'1' lucid zplugin load psprint/zsh-navigation-tools # for n-history # zdharma/history-search-multi-word @@ -320,11 +324,12 @@ zplugin load zdharma/history-search-multi-word # Github-Issue-Tracker – the notifier thread zplugin ice lucid id-as'GitHub-notify' \ - ice on-update-of'$~/.cache/zsh-github-issues/new_titles.log' \ + ice on-update-of'~/.cache/zsh-github-issues/new_titles.log' \ notify'New issue: $NOTIFY_MESSAGE' zplugin light zdharma/zsh-github-issues # Github-Issue-Tracker – the issue-puller thread +GIT_SLEEP_TIME=700 GIT_PROJECTS=zdharma/zsh-github-issues:zdharma/zplugin zplugin ice service"GIT" pick"zsh-github-issues.service.zsh" wait'2' lucid @@ -374,10 +379,10 @@ zplugin ice wait"2" lucid zplugin load voronkovich/gitignore.plugin.zsh # Autosuggestions & fast-syntax-highlighting -zplugin ice wait"0" atload"_zsh_autosuggest_start" lucid -zplugin load zsh-users/zsh-autosuggestions +zplugin ice wait"0c" atload"_zsh_autosuggest_start" lucid +zplugin light zsh-users/zsh-autosuggestions zplugin ice wait"1" atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" lucid -zplugin load zdharma/fast-syntax-highlighting +zplugin light zdharma/fast-syntax-highlighting # Disabled - as the user probably doesn't have access to this plugin # that's only available to the patreon.com Patrons @@ -385,7 +390,7 @@ zplugin load zdharma/fast-syntax-highlighting : zplugin load psprint/fsh-auto-themes # ogham/exa, replacement for ls -zplugin ice from"gh-r" as"command" mv"exa* -> exa" wait'2' lucid +zplugin ice wait'2' lucid from"gh-r" as"command" mv"exa* -> exa" zplugin light ogham/exa # vramsteg @@ -418,9 +423,19 @@ zplugin load zdharma/git-url zplugin ice wait"3" lucid pick"git-recall" as"command" zplugin load Fakerr/git-recall -: zplugin ice wait"0" blockf lucid +# git-quick-stats +zplugin ice wait"3" lucid make"PREFIX=$ZPFX install" as"command" \ + pick"$ZPFX/bin/git-quick-stats" \ + atload"export _MENU_THEME=legacy" +zplugin load arzzen/git-quick-stats.git + +# zsh-tag-search +zplugin ice wait lucid bindmap'^R -> ^G' +zplugin load ~/gitlab/zsh-tag-search.git + +: zplugin ice wait blockf lucid : zplugin light marzocchi/zsh-notify -: zplugin ice wait"0" lucid +: zplugin ice wait lucid : zplugin light rimraf/k : zplugin light zsh-users/zsh-syntax-highlighting : zplugin ice load'![[ $PWD = */github/* ]]' unload'![[ $PWD != */github/* ]]' @@ -447,7 +462,7 @@ zstyle ":completion:*:descriptions" format "%B%d%b" zstyle ':completion:*:*:*:default' menu yes select search zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}” -function double-accept { accept-line; accept-line; } +function double-accept { deploy-code "BUFFER[-1]=''"; } zle -N double-accept bindkey -M menuselect '^F' history-incremental-search-forward bindkey -M menuselect '^R' history-incremental-search-backward From 2e89b407f520637d0f6f6fa793927f721e15a086 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Thu, 11 Jul 2019 18:37:13 +0200 Subject: [PATCH 02/51] Dockerfile: install `telnet' --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 054738f..8735493 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:18.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt update && \ apt install -yq \ - ncurses-dev unzip zsh git subversion curl make sudo locales \ + ncurses-dev telnet unzip zsh git subversion curl make sudo locales \ python golang-go \ vim htop From 3083da27cea592571d05cf68783905b7745a53af Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Thu, 11 Jul 2019 19:44:48 +0200 Subject: [PATCH 03/51] =?UTF-8?q?psprint:=20Solved=20not=20working=20zplug?= =?UTF-8?q?in=20completion=20problem=20=E2=80=93=20Ubuntu=20compinit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ubuntu's compinit runs before zpcompinit, which runs with -C flag, which skips the check for any new entries in $fpath, not picking up ~/.zplugin/completions and the _zplugin there. --- Dockerfile | 2 +- psprint/.zshenv | 2 ++ run.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 psprint/.zshenv diff --git a/Dockerfile b/Dockerfile index 8735493..2761e69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,4 +46,4 @@ ARG TERM ENV TERM ${TERM} RUN SHELL=/bin/zsh zsh -i -c -- '-zplg-scheduler burst || true' -CMD zsh +CMD zsh -i -l diff --git a/psprint/.zshenv b/psprint/.zshenv new file mode 100644 index 0000000..6b95ee8 --- /dev/null +++ b/psprint/.zshenv @@ -0,0 +1,2 @@ +# Skip the not really helping Ubuntu global compinit +skip_global_compinit=1 diff --git a/run.sh b/run.sh index f630947..0b26fe6 100755 --- a/run.sh +++ b/run.sh @@ -33,4 +33,4 @@ docker build \ "${0:a:h}" # Run a container -docker run -ti --rm "zplg-configs/${FOLDER_LOWERCASE}" env TERM="${TERM}" zsh +docker run -ti --rm "zplg-configs/${FOLDER_LOWERCASE}" env TERM="${TERM}" zsh -i -l From 888112b523e9c21769def5dc307aa982cf938443 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Fri, 12 Jul 2019 04:11:08 +0200 Subject: [PATCH 04/51] Add global-compinit disabling .zshenv to all configs (for run.sh) --- 00dani/.zshenv | 2 ++ NICHOLAS85/.zshenv | 2 ++ lainiwa/1st_config/.zshenv | 2 ++ lainiwa/2nd_config/.zshenv | 2 ++ 4 files changed, 8 insertions(+) create mode 100644 00dani/.zshenv create mode 100644 NICHOLAS85/.zshenv create mode 100644 lainiwa/1st_config/.zshenv create mode 100644 lainiwa/2nd_config/.zshenv diff --git a/00dani/.zshenv b/00dani/.zshenv new file mode 100644 index 0000000..6b95ee8 --- /dev/null +++ b/00dani/.zshenv @@ -0,0 +1,2 @@ +# Skip the not really helping Ubuntu global compinit +skip_global_compinit=1 diff --git a/NICHOLAS85/.zshenv b/NICHOLAS85/.zshenv new file mode 100644 index 0000000..6b95ee8 --- /dev/null +++ b/NICHOLAS85/.zshenv @@ -0,0 +1,2 @@ +# Skip the not really helping Ubuntu global compinit +skip_global_compinit=1 diff --git a/lainiwa/1st_config/.zshenv b/lainiwa/1st_config/.zshenv new file mode 100644 index 0000000..6b95ee8 --- /dev/null +++ b/lainiwa/1st_config/.zshenv @@ -0,0 +1,2 @@ +# Skip the not really helping Ubuntu global compinit +skip_global_compinit=1 diff --git a/lainiwa/2nd_config/.zshenv b/lainiwa/2nd_config/.zshenv new file mode 100644 index 0000000..6b95ee8 --- /dev/null +++ b/lainiwa/2nd_config/.zshenv @@ -0,0 +1,2 @@ +# Skip the not really helping Ubuntu global compinit +skip_global_compinit=1 From 4ee9efd6f00ccd8f64e0e6fe382dd4c94716f398 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Fri, 12 Jul 2019 08:10:46 +0200 Subject: [PATCH 05/51] 00dani: Add zpcompinit to atload ice of f-sy-h --- 00dani/zshrc.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/00dani/zshrc.zsh b/00dani/zshrc.zsh index d47830f..73c5675 100644 --- a/00dani/zshrc.zsh +++ b/00dani/zshrc.zsh @@ -32,4 +32,5 @@ zplugin ice silent wait:1; zplugin $load mollifier/cd-gitroot zplugin ice silent wait:1; zplugin $load micha/resty zplugin ice silent wait:1; zplugin $load supercrabtree/k -zplugin ice silent wait!1; zplugin $load zdharma/fast-syntax-highlighting +zplugin ice silent wait!1 atload"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit" +zplugin $load zdharma/fast-syntax-highlighting From 69f052f836a27d4070240b70fcf4f5376b83d8d5 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sat, 13 Jul 2019 12:21:48 +0200 Subject: [PATCH 06/51] Dockerfile: apt-get man autoconf automake --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2761e69..e5877ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ FROM ubuntu:18.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt update && \ apt install -yq \ - ncurses-dev telnet unzip zsh git subversion curl make sudo locales \ - python golang-go \ + ncurses-dev man telnet unzip zsh git subversion curl make sudo locales \ + autoconf automake python golang-go \ vim htop # Set the locale From f58e7c95aafbf546872f2d5ef1e368a9b9e7059b Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sat, 13 Jul 2019 12:22:25 +0200 Subject: [PATCH 07/51] Don't install rust to make the build faster --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e5877ad..343858a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,10 +22,6 @@ RUN adduser --disabled-password --gecos '' user && \ usermod --shell /bin/zsh user USER user -# Install Rust language -RUN curl 'https://sh.rustup.rs' -sSf | sh -s -- -y && \ - echo 'source ${HOME}/.cargo/env' > /home/user/.zshenv - # Install zplugin RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)" @@ -35,6 +31,10 @@ COPY --chown=user "${FOLDER}" /home/user # Copy of a possible .zshrc named according to a non-leading-dot scheme RUN cp -vf /home/user/zshrc.zsh /home/user/.zshrc 2>/dev/null || true +# Install Rust language - currently unneeded +#RUN curl 'https://sh.rustup.rs' -sSf | sh -s -- -y && \ +# echo 'source ${HOME}/.cargo/env' >>! /home/user/.zshenv + # Run user's bootstrap script RUN if [ -f /home/user/bootstrap.sh ]; then \ chmod u+x /home/user/bootstrap.sh; \ From e3c7d614e95634aa41d3dc873394be115d8281bc Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Mon, 15 Jul 2019 22:45:16 +0200 Subject: [PATCH 08/51] psprint: Updates to LS_COLORS --- psprint/zshrc.zsh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index b89a316..a697f5a 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -92,7 +92,8 @@ zle -N self-insert url-quote-magic # alias pl='print -rl --' -alias ls="exa -bh ${${${ABSD#0}:+-G}:---color=auto}" +#alias ls="gls -bh --color=auto" +alias ls="exa -bh --color=auto" alias l="ls" l.='ls -d .*' la='ls -a' ll='ls -lbt created' rm='command rm -i' alias df='df -h' du='du -h' cp='cp -v' mv='mv -v' plast="last -20" alias reload="exec $SHELL -l -i" grep="command grep --colour=auto" @@ -199,7 +200,7 @@ autoload -Uz psprobe_host psffconv pssetup_ssl_cert psrecompile pscop f1rechg_x_min f1biggest \ n1gglinks n1dict n1diki n1gglinks n1ggw3m n1ling n1ssl_tunnel \ n1ssl_rtunnel \ - pngimage deploy-code + pngimage deploy-code deploy-message function run_diso { sh -c "$@" & @@ -263,16 +264,17 @@ zplugin snippet OMZ::lib/git.zsh zplugin ice wait atload"unalias grv g" lucid zplugin snippet OMZ::plugins/git/git.plugin.zsh # zsh-startify, a vim-startify -like plugin -zplugin ice wait'0b' lucid atload'zsh-startify' -zplugin load zdharma/zsh-startify +: zplugin ice wait'0b' lucid atload'zsh-startify' +: zplugin load zdharma/zsh-startify -# On OSX, you might need to install coreutils from homebrew and use the -# g-prefix – gsed, gdircolors +# On OSX, you might need to install `coreutils' from homebrew zplugin ice wait'0c' lucid \ - atclone"git reset --hard; sed -i \ + atclone"local PFX=${${(M)OSTYPE:#*darwin*}:+g} + git reset --hard; \${PFX}sed -i \ '/DIR/c\DIR 38;5;63;1' LS_COLORS; \ - dircolors -b LS_COLORS > c.zsh" \ - atpull'%atclone' pick"c.zsh" nocompile'!' + \${PFX}dircolors -b LS_COLORS > c.zsh" \ + atpull'%atclone' pick"c.zsh" nocompile'!' \ + atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”' zplugin light trapd00r/LS_COLORS # Zconvey shell integration plugin @@ -460,7 +462,7 @@ zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:kill:*' force-list always zstyle ":completion:*:descriptions" format "%B%d%b" zstyle ':completion:*:*:*:default' menu yes select search -zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}” +#zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}” function double-accept { deploy-code "BUFFER[-1]=''"; } zle -N double-accept From 9358201c984b1a693b124a31332f9541e57158ef Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Thu, 18 Jul 2019 21:12:46 +0200 Subject: [PATCH 09/51] psprint: Update after a zshrc-parsing tool `declare-zshrc' brought order --- psprint/zshrc.zsh | 81 ++++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index a697f5a..3ef0e00 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -161,7 +161,7 @@ alias x1email_snippet="screencapture -s -M screen-`date +%d.%m.%Y-%H`.png" # General tools # -alias newest_ls="ls -lh --modified | head -25" +alias newest_ls="ls -lh --sort date -r --color=always | head -25" alias cpfile="rsync --progress" alias zmv='noglob zmv -w' alias recently_changed='find . -newerct "15 minute ago" -print' @@ -261,14 +261,16 @@ zplugin ice wait lucid zplugin snippet OMZ::lib/git.zsh # Loaded mostly to stay in touch with the plugin (for the users) -zplugin ice wait atload"unalias grv g" lucid +zplugin ice wait lucid atload"unalias grv g" zplugin snippet OMZ::plugins/git/git.plugin.zsh + # zsh-startify, a vim-startify -like plugin -: zplugin ice wait'0b' lucid atload'zsh-startify' +: zplugin ice wait"0b" lucid atload"zsh-startify" : zplugin load zdharma/zsh-startify -# On OSX, you might need to install `coreutils' from homebrew -zplugin ice wait'0c' lucid \ +# On OSX, you might need to install coreutils from homebrew and use the +# g-prefix – gsed, gdircolors +zplugin ice wait"0c" lucid \ atclone"local PFX=${${(M)OSTYPE:#*darwin*}:+g} git reset --hard; \${PFX}sed -i \ '/DIR/c\DIR 38;5;63;1' LS_COLORS; \ @@ -286,37 +288,41 @@ zplugin ice wait lucid zplugin light zdharma/z-p-submods # Another load of the same plugin, to add zc-bg-notify to PATH -zplugin ice pick"cmds/zc-bg-notify" as"command" wait"1" id-as'zconvey-cmd' silent +zplugin ice wait silent as"program" id-as"zconvey-cmd" pick"cmds/zc-bg-notify" zplugin load zdharma/zconvey # fzy -zplugin ice wait'1' lucid as"command" make"!PREFIX=$ZPFX install" \ +zplugin ice wait"1" lucid as"program" make"!PREFIX=$ZPFX install" \ atclone"cp contrib/fzy-* $ZPFX/bin/" \ pick"$ZPFX/bin/fzy*" zplugin light jhawthorn/fzy # fzf, for fzf-marks -zplugin ice wait lucid as"command" from"gh-r" +zplugin ice wait lucid from"gh-r" as"program" zplugin light junegunn/fzf-bin # fzf-marks, at slot 0, for quick Ctrl-G accessibility zplugin ice wait lucid zplugin load urbainvaes/fzf-marks +# zsh-autopair +zplugin ice wait lucid +zplugin load hlissner/zsh-autopair + # zredis together with some binding/tying zstyle ":plugin:zredis" configure_opts "--without-tcsetpgrp" zstyle ":plugin:zredis" cflags "-Wall -O2 -g -Wno-unused-but-set-variable" -zplugin ice wait'1' atload'ztie -d db/redis -a 127.0.0.1:4815/5 -zSL main rdhash' lucid +zplugin ice wait"1" lucid atload'ztie -d db/redis -a 127.0.0.1:4815/5 -P $HOME/.zredisconf -zSL main rdhash' zplugin load zdharma/zredis # a service that runs the redis database, in background, single instance -zplugin ice service"redis" lucid wait"1" +zplugin ice wait"1" lucid service"redis" zplugin light zservices/redis # zsh-editing-workbench & zsh-navigation-tools -zplugin ice wait'1' lucid +zplugin ice wait"1" lucid zplugin load psprint/zsh-editing-workbench -zplugin ice wait'1' lucid +zplugin ice wait"1" lucid zplugin load psprint/zsh-navigation-tools # for n-history # zdharma/history-search-multi-word @@ -325,7 +331,7 @@ zplugin ice wait"1" lucid zplugin load zdharma/history-search-multi-word # Github-Issue-Tracker – the notifier thread -zplugin ice lucid id-as'GitHub-notify' \ +zplugin ice lucid id-as"GitHub-notify" \ ice on-update-of'~/.cache/zsh-github-issues/new_titles.log' \ notify'New issue: $NOTIFY_MESSAGE' zplugin light zdharma/zsh-github-issues @@ -334,34 +340,34 @@ zplugin light zdharma/zsh-github-issues GIT_SLEEP_TIME=700 GIT_PROJECTS=zdharma/zsh-github-issues:zdharma/zplugin -zplugin ice service"GIT" pick"zsh-github-issues.service.zsh" wait'2' lucid +zplugin ice wait"2" lucid service"GIT" pick"zsh-github-issues.service.zsh" zplugin light zdharma/zsh-github-issues # Theme no. 1 - zprompts -zplugin ice load'![[ $MYPROMPT = 1 ]]' unload'![[ $MYPROMPT != 1 ]]' atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3' lucid +zplugin ice lucid load'![[ $MYPROMPT = 1 ]]' unload'![[ $MYPROMPT != 1 ]]' atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3' zplugin load psprint/zprompts # Theme no. 2 – lambda-mod-zsh-theme -zplugin ice load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' lucid +zplugin ice lucid load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' zplugin load halfo/lambda-mod-zsh-theme # Theme no. 3 – lambda-gitster -zplugin ice load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' lucid +zplugin ice lucid load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' zplugin load ergenekonyigit/lambda-gitster # Theme no. 4 – pure GEOMETRY_COLOR_DIR=63 GEOMETRY_PATH_COLOR=63 -zplugin ice load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' atload"prompt_geometry_render" lucid +zplugin ice lucid load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' atload"prompt_geometry_render" zplugin load geometry-zsh/geometry # Theme no. 5 – pure -zplugin ice ice load'![[ $MYPROMPT = 5 ]]' unload'![[ $MYPROMPT != 5 ]]' \ +zplugin ice load'![[ $MYPROMPT = 5 ]]' unload'![[ $MYPROMPT != 5 ]]' \ multisrc"{async,pure}.zsh" pick"/dev/null" idas"my/pure/login" zplugin load sindresorhus/pure # Theme no. 6 - agkozak-zsh-theme AGKOZAK_FORCE_ASYNC_METHOD=subst-async -zplugin ice ice load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' lucid +zplugin ice lucid load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' zplugin load agkozak/agkozak-zsh-theme # Theme no. 7 - zinc @@ -381,25 +387,36 @@ zplugin ice wait"2" lucid zplugin load voronkovich/gitignore.plugin.zsh # Autosuggestions & fast-syntax-highlighting -zplugin ice wait"0c" atload"_zsh_autosuggest_start" lucid +zplugin ice wait"0c" lucid atload"_zsh_autosuggest_start" zplugin light zsh-users/zsh-autosuggestions -zplugin ice wait"1" atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" lucid +zplugin ice wait"1" lucid atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" zplugin light zdharma/fast-syntax-highlighting -# Disabled - as the user probably doesn't have access to this plugin -# that's only available to the patreon.com Patrons -: zplugin ice wait"1" from:gl lucid -: zplugin load psprint/fsh-auto-themes +zplugin ice wait"1" lucid from"gl" +zplugin load psprint/fsh-auto-themes # ogham/exa, replacement for ls -zplugin ice wait'2' lucid from"gh-r" as"command" mv"exa* -> exa" +zplugin ice wait"2" lucid from"gh-r" as"program" mv"exa* -> exa" zplugin light ogham/exa # vramsteg -zplugin ice wait"2" lucid as'command' pick'src/vramsteg' \ +zplugin ice wait"2" lucid as"program" pick"src/vramsteg" \ atclone'cmake .' atpull'%atclone' make zplugin load psprint/vramsteg-zsh +# revolver +zplugin ice wait"2" lucid as"program" pick"revolver" +zplugin load psprint/revolver + +# zunit +zplugin ice wait"2" lucid as"program" pick"zunit" \ + atclone"./build.zsh" atpull"%atclone" +zplugin load psprint/zunit + +# declare-zshrc +zplugin ice wait"2" lucid +zplugin load zdharma/declare-zshrc + # zsh-diff-so-fancy zplugin ice wait"2" lucid as"program" pick"bin/git-dsf" zplugin load zdharma/zsh-diff-so-fancy @@ -422,20 +439,20 @@ zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-(url|guclone)" make"ins zplugin load zdharma/git-url # git-recall -zplugin ice wait"3" lucid pick"git-recall" as"command" +zplugin ice wait"3" lucid as"program" pick"git-recall" zplugin load Fakerr/git-recall # git-quick-stats -zplugin ice wait"3" lucid make"PREFIX=$ZPFX install" as"command" \ +zplugin ice wait"3" lucid as"program" make"PREFIX=$ZPFX install" \ pick"$ZPFX/bin/git-quick-stats" \ atload"export _MENU_THEME=legacy" zplugin load arzzen/git-quick-stats.git # zsh-tag-search -zplugin ice wait lucid bindmap'^R -> ^G' +zplugin ice wait lucid bindmap"^R -> ^G" zplugin load ~/gitlab/zsh-tag-search.git -: zplugin ice wait blockf lucid +: zplugin ice wait lucid blockf : zplugin light marzocchi/zsh-notify : zplugin ice wait lucid : zplugin light rimraf/k From 89ec987fcb8c6960be24a1b687bb60865ccfa09b Mon Sep 17 00:00:00 2001 From: Nicholas Serrano Date: Thu, 1 Aug 2019 22:39:20 -0400 Subject: [PATCH 10/51] NICHOLAS85: Update personal files --- .../.zplugin/user/functions/_zpcompinit_fast | 13 ++++ .../.zplugin/user/functions/auto-ls-colorls | 7 +++ .../.zplugin/user/functions/auto-ls-modecheck | 7 +++ NICHOLAS85/.zplugin/user/functions/dotscheck | 17 +++++ .../.zplugin/user/functions/history-stat | 1 + NICHOLAS85/.zplugin/user/personal | 62 ------------------- NICHOLAS85/.zshrc | 41 +++++++----- 7 files changed, 70 insertions(+), 78 deletions(-) create mode 100644 NICHOLAS85/.zplugin/user/functions/_zpcompinit_fast create mode 100644 NICHOLAS85/.zplugin/user/functions/auto-ls-colorls create mode 100644 NICHOLAS85/.zplugin/user/functions/auto-ls-modecheck create mode 100644 NICHOLAS85/.zplugin/user/functions/dotscheck create mode 100644 NICHOLAS85/.zplugin/user/functions/history-stat diff --git a/NICHOLAS85/.zplugin/user/functions/_zpcompinit_fast b/NICHOLAS85/.zplugin/user/functions/_zpcompinit_fast new file mode 100644 index 0000000..df3a177 --- /dev/null +++ b/NICHOLAS85/.zplugin/user/functions/_zpcompinit_fast @@ -0,0 +1,13 @@ +setopt extendedglob local_options +autoload -Uz compinit +local zcd=${ZPLGM[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} +local zcdc="$zcd.zwc" +# Compile the completion dump to increase startup speed, if dump is newer or doesn't exist, +# in the background as this is doesn't affect the current session +if [[ -f "$zcd"(#qN.m+1) ]]; then + compinit -i -d "$zcd" + { zcompile "$zcd" } &! +else + compinit -C -d "$zcd" + { [[ ! -f "$zcdc" || "$zcd" -nt "$zcdc" ]] && zcompile "$zcd" } &! +fi diff --git a/NICHOLAS85/.zplugin/user/functions/auto-ls-colorls b/NICHOLAS85/.zplugin/user/functions/auto-ls-colorls new file mode 100644 index 0000000..4d47364 --- /dev/null +++ b/NICHOLAS85/.zplugin/user/functions/auto-ls-colorls @@ -0,0 +1,7 @@ +if [ -d .git ] && ! [[ -n $SSH_CONNECTION ]]; then + eval "${colorlsgitcommand[@]}" + echo +else + eval "${colorlscommand[@]}" + echo +fi diff --git a/NICHOLAS85/.zplugin/user/functions/auto-ls-modecheck b/NICHOLAS85/.zplugin/user/functions/auto-ls-modecheck new file mode 100644 index 0000000..4ca8e6c --- /dev/null +++ b/NICHOLAS85/.zplugin/user/functions/auto-ls-modecheck @@ -0,0 +1,7 @@ +if [[ $(tlp-stat -s 2>/dev/null) =~ 'Mode = Battery' ]]; then + varcache=("${AUTO_LS_COMMANDS[@]}") + AUTO_LS_COMMANDS=("${AUTO_LS_COMMANDSBAT[@]}") + auto-ls + AUTO_LS_COMMANDS=("${varcache[@]}") + break +fi diff --git a/NICHOLAS85/.zplugin/user/functions/dotscheck b/NICHOLAS85/.zplugin/user/functions/dotscheck new file mode 100644 index 0000000..8721514 --- /dev/null +++ b/NICHOLAS85/.zplugin/user/functions/dotscheck @@ -0,0 +1,17 @@ + if [ -d $HOME/.dots ]; then + local dotsvar1 dotsvar2 dotsvar3 dotsvar4 + dots(){ /usr/bin/git --git-dir=$HOME/.dots/ --work-tree=$HOME "${@}" 2>/dev/null} + dotsvar1=("${dotsvar[@]/%/'}") + dotsvar2=("${dotsvar1[@]/#/-e '}") + dotsvar3=(grep -v "${dotsvar2[*]}") + dotsvar4=$(dots status | eval "${dotsvar3[*]}") + if [[ "$dotsvar4" =~ "Changes not staged" ]] && [[ "$dotsvar4" =~ "modified|Changes to be committed" ]]; then + echo "" + dots status -s + elif [[ "$dotsvar4" =~ "ahead of" ]]; then + dots status + dots push + elif [[ "$dotsvar4" =~ "is behind" ]]; then + dots status + fi +fi diff --git a/NICHOLAS85/.zplugin/user/functions/history-stat b/NICHOLAS85/.zplugin/user/functions/history-stat new file mode 100644 index 0000000..c4ab262 --- /dev/null +++ b/NICHOLAS85/.zplugin/user/functions/history-stat @@ -0,0 +1 @@ +fc -ln 0 | awk '{print $1}' | sort | uniq -c | sort -nr | head diff --git a/NICHOLAS85/.zplugin/user/personal b/NICHOLAS85/.zplugin/user/personal index 8f89cfd..6ef7bd3 100644 --- a/NICHOLAS85/.zplugin/user/personal +++ b/NICHOLAS85/.zplugin/user/personal @@ -39,68 +39,6 @@ else fi fi -######################### -# Functions # -######################### - -# https://gist.github.com/ctechols/ca1035271ad134841284 -_zpcompinit_fast() { - setopt extendedglob local_options - autoload -Uz compinit - local zcd=${ZPLGM[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} - local zcdc="$zcd.zwc" - # Compile the completion dump to increase startup speed, if dump is newer or doesn't exist, - # in the background as this is doesn't affect the current session - if [[ -f "$zcd"(#qN.m+1) ]]; then - compinit -i -d "$zcd" - { zcompile "$zcd" } &! - else - compinit -C -d "$zcd" - { [[ ! -f "$zcdc" || "$zcd" -nt "$zcdc" ]] && zcompile "$zcd" } &! - fi -} - -# Shows top used commands -history-stat(){ fc -ln 0 | awk '{print $1}' | sort | uniq -c | sort -nr | head; } - -auto-ls-modecheck(){ - if [[ $(tlp-stat -s 2>/dev/null) =~ 'Mode = Battery' ]]; then - varcache=("${AUTO_LS_COMMANDS[@]}") - AUTO_LS_COMMANDS=("${AUTO_LS_COMMANDSBAT[@]}") - auto-ls - AUTO_LS_COMMANDS=("${varcache[@]}") - break - fi -} - -auto-ls-colorls(){ - if [ -d .git ] && ! [[ -n $SSH_CONNECTION ]]; then - eval "${colorlsgitcommand[@]}" - echo - else - eval "${colorlscommand[@]}" - echo - fi -} - -dotscheck(){ - local dotsvar1 dotsvar2 dotsvar3 dotsvar4 - dots(){ /usr/bin/git --git-dir=$HOME/.dots/ --work-tree=$HOME "${@}" 2>/dev/null} - dotsvar1=("${dotsvar[@]/%/'}") - dotsvar2=("${dotsvar1[@]/#/-e '}") - dotsvar3=(grep -v "${dotsvar2[*]}") - dotsvar4=$(dots status | eval "${dotsvar3[*]}") - if [[ "$dotsvar4" =~ "Changes not staged" ]] && [[ "$dotsvar4" =~ "modified|Changes to be committed" ]]; then - echo "" - dots status -s - elif [[ "$dotsvar4" =~ "ahead of" ]]; then - dots status - dots push - elif [[ "$dotsvar4" =~ "is behind" ]]; then - dots status - fi -} - ######################### # Aliases # ######################### diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index f81c4c0..da57790 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -3,14 +3,6 @@ # Install zplugin if not installed if [ ! -d "${HOME}/.zplugin" ]; then sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)" - if [[ ! -d "$ZPFX" ]]; then - mkdir -v $ZPFX - fi - if [[ ! -d "$ZPLGM[HOME_DIR]/user" ]]; then - mkdir -v "$ZPLGM[HOME_DIR]/user" - curl -fsSL https://raw.githubusercontent.com/NICHOLAS85/dotfiles/master/.zplugin/user/personal -o "$ZPLGM[HOME_DIR]/user/personal" - curl -fsSL https://raw.githubusercontent.com/NICHOLAS85/dotfiles/master/.zplugin/user/theme -o "$ZPLGM[HOME_DIR]/user/theme" - fi fi ### Added by Zplugin's installer @@ -19,16 +11,29 @@ autoload -Uz _zplugin (( ${+_comps} )) && _comps[zplugin]=_zplugin ### End of Zplugin's installer chunk +if [[ ! -d "$ZPFX" ]]; then + mkdir -v $ZPFX +fi +if [[ ! -d "$ZPLGM[HOME_DIR]/user" ]]; then + curl https://codeload.github.com/NICHOLAS85/dotfiles/tar.gz/master | \ + tar -xz --strip=2 dotfiles-master/.zplugin/user; mv user "$ZPLGM[HOME_DIR]/" +fi + +# Autoload personal functions +fpath=("$ZPLGM[HOME_DIR]/user/functions" "${fpath[@]}") +autoload -Uz _zpcompinit_fast auto-ls-colorls auto-ls-modecheck dotscheck history-stat + # Functions to make configuration less verbose zt() { zplugin ice wait"${1}" lucid "${@:2}"; } # Turbo +zi() { zplugin ice lucid "${@}"; } # Regular Ice z() { [ -z $2 ] && zplugin light "${@}" || zplugin "${@}"; } # zplugin # Theme -zt "" pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' atload'source $ZPLGM[HOME_DIR]/user/theme' +zi pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' atload'source $ZPLGM[HOME_DIR]/user/theme' z denysdovhan/spaceship-prompt # Oh-my-zsh libs -zt "" atinit'ZSH_CACHE_DIR="$HOME/.zcompcache"' +zi atinit'ZSH_CACHE_DIR="$HOME/.zcompcache"' z snippet OMZ::lib/history.zsh zt 0a @@ -36,6 +41,9 @@ z snippet OMZ::lib/completion.zsh # Plugins +#zi atload'ZSH_EVALCACHE_DIR="$ZPFX/.zsh-evalcache"' +#z mroth/evalcache + zt 0b atclone"git reset --hard; sed -i '/DIR/c\DIR 34;5;30' LS_COLORS; dircolors -b LS_COLORS > c.zsh" atpull'%atclone' pick"c.zsh" nocompile'!' z trapd00r/LS_COLORS @@ -67,7 +75,7 @@ z laggardkernel/git-ignore zt 0a as'program' atpull'!git reset --hard' pick'wd.sh' mv'_wd.sh -> _wd' atload'wd() { source wd.sh }; WD_CONFIG="$ZPFX/.warprc"' blockf z mfaerevaag/wd -zt 0a as'command' pick'updatelocal' atload'updatelocal() { source updatelocal }' +zt 0a ver'plugin' z NICHOLAS85/updatelocal zt '[[ -n ${ZLAST_COMMANDS[(r)gcom*]} ]]' atload'gcomp(){ \gencomp $1 && zplugin creinstall -q RobSis/zsh-completion-generator; }' pick'zsh-completion-generator.plugin.zsh' @@ -93,7 +101,7 @@ z snippet OMZ::plugins/common-aliases/common-aliases.plugin.zsh zt 0a as'program' pick'bin/git-dsf' z zdharma/zsh-diff-so-fancy -zt 0b nocompletions +zt 0b pick'autopair.zsh' nocompletions z hlissner/zsh-autopair zt 0a blockf atpull'zplugin creinstall -q .' @@ -111,12 +119,13 @@ z zsh-users/zsh-autosuggestions zt 0b pick'manydots-magic' compile'manydots-magic' z knu/zsh-manydots-magic -source "$ZPLGM[HOME_DIR]/user/personal" - zt 0b atinit'_zpcompinit_fast; zpcdreplay' z zdharma/fast-syntax-highlighting zt 0c id-as'Cleanup' atinit'unset -f zt z' -z zdharma/null +z zdharma/null + +source "$ZPLGM[HOME_DIR]/user/personal" + +dotscheck -#dotscheck From b0d9e8ddd543f93e0e69ae2229ebad56f413bef0 Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Thu, 1 Aug 2019 22:46:41 -0400 Subject: [PATCH 11/51] Typo fixes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc5c865..032914d 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ Feel free to submit your zshrc if it contains `zplugin` commands (or just the se # Searching the repository -Use the Github search inerface – just enter a query e.g. "trapd00r/LS_COLORS" like in the picture below, to find zshrc with references to this plugin, and ensure that you activate the "*in this repository*" variant of the search: +Use the Github search interface – just enter a query e.g. "trapd00r/LS_COLORS" like in the picture below, to find zshrc with references to this plugin, and ensure that you activate the "*in this repository*" variant of the search: ![Starting search](https://raw.githubusercontent.com/zdharma/zplugin-configs/img/srch.png) -Then, results should appaer like below: +Then, results should appear like below: ![Search results](https://raw.githubusercontent.com/zdharma/zplugin-configs/img/srch-rslt.png) From 926499b65199127eeaa43314f58da268d42094f1 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 27 Aug 2019 03:27:08 +0200 Subject: [PATCH 12/51] psprint: Add forgit, fix where-from function, disable private fsh-a-t --- psprint/zshrc.zsh | 49 ++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index 3ef0e00..f111424 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -212,7 +212,7 @@ function pbcopydir { } function from-where { - echo $^fpath/$_comps[$1](N.) + echo $^fpath/$_comps[$1](N) whence -v $_comps[$1] #which $_comps[$1] 2>&1 | head } @@ -292,9 +292,9 @@ zplugin ice wait silent as"program" id-as"zconvey-cmd" pick"cmds/zc-bg-notify" zplugin load zdharma/zconvey # fzy -zplugin ice wait"1" lucid as"program" make"!PREFIX=$ZPFX install" \ +zplugin ice wait"1" lucid as"program" pick"$ZPFX/bin/fzy*" \ atclone"cp contrib/fzy-* $ZPFX/bin/" \ - pick"$ZPFX/bin/fzy*" + make"!PREFIX=$ZPFX install" zplugin light jhawthorn/fzy # fzf, for fzf-marks @@ -312,7 +312,8 @@ zplugin load hlissner/zsh-autopair # zredis together with some binding/tying zstyle ":plugin:zredis" configure_opts "--without-tcsetpgrp" zstyle ":plugin:zredis" cflags "-Wall -O2 -g -Wno-unused-but-set-variable" -zplugin ice wait"1" lucid atload'ztie -d db/redis -a 127.0.0.1:4815/5 -P $HOME/.zredisconf -zSL main rdhash' +zplugin ice wait"1" lucid \ + atload'ztie -d db/redis -a 127.0.0.1:4815/5 -P $HOME/.zredisconf -zSL main rdhash' zplugin load zdharma/zredis # a service that runs the redis database, in background, single instance @@ -332,7 +333,7 @@ zplugin load zdharma/history-search-multi-word # Github-Issue-Tracker – the notifier thread zplugin ice lucid id-as"GitHub-notify" \ - ice on-update-of'~/.cache/zsh-github-issues/new_titles.log' \ + on-update-of'~/.cache/zsh-github-issues/new_titles.log' \ notify'New issue: $NOTIFY_MESSAGE' zplugin light zdharma/zsh-github-issues @@ -344,7 +345,8 @@ zplugin ice wait"2" lucid service"GIT" pick"zsh-github-issues.service.zsh" zplugin light zdharma/zsh-github-issues # Theme no. 1 - zprompts -zplugin ice lucid load'![[ $MYPROMPT = 1 ]]' unload'![[ $MYPROMPT != 1 ]]' atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3' +zplugin ice lucid load'![[ $MYPROMPT = 1 ]]' unload'![[ $MYPROMPT != 1 ]]' \ + atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3' zplugin load psprint/zprompts # Theme no. 2 – lambda-mod-zsh-theme @@ -355,14 +357,15 @@ zplugin load halfo/lambda-mod-zsh-theme zplugin ice lucid load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' zplugin load ergenekonyigit/lambda-gitster -# Theme no. 4 – pure +# Theme no. 4 – geometry GEOMETRY_COLOR_DIR=63 GEOMETRY_PATH_COLOR=63 -zplugin ice lucid load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' atload"prompt_geometry_render" +zplugin ice lucid load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ + atload"prompt_geometry_render" zplugin load geometry-zsh/geometry # Theme no. 5 – pure zplugin ice load'![[ $MYPROMPT = 5 ]]' unload'![[ $MYPROMPT != 5 ]]' \ - multisrc"{async,pure}.zsh" pick"/dev/null" idas"my/pure/login" + pick"/dev/null" multisrc"{async,pure}.zsh" zplugin load sindresorhus/pure # Theme no. 6 - agkozak-zsh-theme @@ -372,10 +375,15 @@ zplugin load agkozak/agkozak-zsh-theme # Theme no. 7 - zinc zplugin ice load'![[ $MYPROMPT = 7 ]]' unload'![[ $MYPROMPT != 7 ]]' \ - nocompletions atclone'prompt_zinc_compile' atpull'%atclone' \ - compile"{zinc_functions/*,segments/*,zinc.zsh}" atload'zinc_selfdestruct_setup' + atclone'prompt_zinc_compile' atload'zinc_selfdestruct_setup' \ + atpull'%atclone' compile"{zinc_functions/*,segments/*,zinc.zsh}" \ + nocompletions wrap-track'prompt_zinc_setup' zplugin load robobenklein/zinc +# Theme no. 8 - powerlevel10k +zplugin ice load'![[ $MYPROMPT = 8 ]]' unload'![[ $MYPROMPT != 8 ]]' \ + atload'source ~/.p10k.zsh; _p9k_precmd' lucid nocd wrap-track"_p9k_precmd" +zplugin load romkatv/powerlevel10k # ZUI and Crasis zplugin ice wait"1" lucid zplugin load zdharma/zui @@ -387,13 +395,14 @@ zplugin ice wait"2" lucid zplugin load voronkovich/gitignore.plugin.zsh # Autosuggestions & fast-syntax-highlighting -zplugin ice wait"0c" lucid atload"_zsh_autosuggest_start" -zplugin light zsh-users/zsh-autosuggestions +zplugin ice wait"1b" lucid atload"_zsh_autosuggest_start" \ + wrap-track"_zsh_autosuggest_start" +zplugin load zsh-users/zsh-autosuggestions zplugin ice wait"1" lucid atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" zplugin light zdharma/fast-syntax-highlighting -zplugin ice wait"1" lucid from"gl" -zplugin load psprint/fsh-auto-themes +#zplugin ice wait"1" lucid from"gl" from"psprint@gitlab.com" +#zplugin load psprint/fsh-auto-themes # ogham/exa, replacement for ls zplugin ice wait"2" lucid from"gh-r" as"program" mv"exa* -> exa" @@ -411,7 +420,7 @@ zplugin load psprint/revolver # zunit zplugin ice wait"2" lucid as"program" pick"zunit" \ atclone"./build.zsh" atpull"%atclone" -zplugin load psprint/zunit +zplugin load molovo/zunit # declare-zshrc zplugin ice wait"2" lucid @@ -421,8 +430,12 @@ zplugin load zdharma/declare-zshrc zplugin ice wait"2" lucid as"program" pick"bin/git-dsf" zplugin load zdharma/zsh-diff-so-fancy +# forgit +zplugin ice wait'2' lucid +zplugin load 'wfxr/forgit' + # git-now -zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-now" make"prefix=$ZPFX install" +zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-now" make"PREFIX=$ZPFX install" zplugin load iwata/git-now # git-extras @@ -473,7 +486,7 @@ MYPROMPT=1 zle -N znt-kill-widget bindkey "^Y" znt-kill-widget -cdpath=( "$HOME/github" "$HOME/github2" "$HOME/gitlab" ) +cdpath=( "$HOME" "$HOME/github" "$HOME/github2" "$HOME/gitlab" ) zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:kill:*' force-list always From a002ada8940339e21155e7cac7c3143923b32130 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 27 Aug 2019 03:29:42 +0200 Subject: [PATCH 13/51] psprint: New functions: deploy-code, exchange, pngimage. Update psls --- psprint/functions/deploy-code | 29 +++++++++++++++++++++++++++++ psprint/functions/exchange | 8 ++++++++ psprint/functions/pngimage | 11 +++++++++++ psprint/functions/psls | 8 +++++--- 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 psprint/functions/deploy-code create mode 100644 psprint/functions/exchange create mode 100644 psprint/functions/pngimage diff --git a/psprint/functions/deploy-code b/psprint/functions/deploy-code new file mode 100644 index 0000000..fdca97b --- /dev/null +++ b/psprint/functions/deploy-code @@ -0,0 +1,29 @@ +# This Zshell function will execute the given code from a Zle context. +# It has an optional delay first argument: "@sleep:". +# If given, then the code will wait in background before being executed, for +# the specified amount of time. +# The limit of the code length is 25 lines and can be easily extended by +# changing the "repeat 25" line +# +# Usage: +# deploy-code "echo Hello world" +# deploy-code "BUFFER[-1]=''" +# deploy-code @sleep:5.5 "BUFFER='The time has passed, sorry for replacing your command line ;)'" +[[ "$1" = <-> && ${#} -eq 1 ]] && { + local alltext text IFS=$'\n' nl=$'\n' + repeat 25; do read -r -u"$1" text; alltext+="${text:+$text$nl}"; done + zle -F "$1"; exec {1}<&- + eval "$alltext" + return 0 +} +local THEFD +exec {THEFD} < <( + # The expansion is: if there is @sleep: pfx, then use what is after + # it, otherwise substitute 0 + LANG=C sleep $(( 0.005 + ${${${(M)1#@sleep:}:+${1#@sleep:}}:-0} )) + print -r -- ${1:#(@code|@sleep:*)} "${@[2,-1]}" +) +zle -N deploy-code # idempotent +zle -w -F "$THEFD" deploy-code + +# vim;ft=zsh:sts=4:sw=4:et diff --git a/psprint/functions/exchange b/psprint/functions/exchange new file mode 100644 index 0000000..c1c49b2 --- /dev/null +++ b/psprint/functions/exchange @@ -0,0 +1,8 @@ +[[ ! -e "$1" || ! -e "$2" ]] && { print -r -- "The args do not exist"; return 1; } + +local suffix=$(( RANDOM % 10000 )) +mv -vf "$1" "$1"_"$suffix" +mv -vf "$2" "$1" +mv -vf "$1"_"$suffix" "$2" + +# vim:ft=zsh:et:sts=4:sw=4:wrap diff --git a/psprint/functions/pngimage b/psprint/functions/pngimage new file mode 100644 index 0000000..4ae5bd8 --- /dev/null +++ b/psprint/functions/pngimage @@ -0,0 +1,11 @@ +[[ -z "$1" ]] && { + print -r -- "Missing argument – the output image name (path)" + return 1 +} + +print -r -- pngquant ~"/Desktop/$( cd ~/Desktop; recently_changed_x 10 | sort -n | tail -1 )" +pngquant ~"/Desktop/$( cd ~/Desktop; recently_changed_x 10 | sort -n | tail -1 )" +print -r -- pngcrush ~"/Desktop/$( cd ~/Desktop; recently_changed_x 10 | grep -- -fs8 | sort -n | tail -1 )" "$1" +pngcrush ~"/Desktop/$( cd ~/Desktop; recently_changed_x 10 | grep -- -fs8 | sort -n | tail -1 )" "$1" + +# vim:ft=zsh:sts=4:ts=4:et diff --git a/psprint/functions/psls b/psprint/functions/psls index e3d446b..c064b22 100644 --- a/psprint/functions/psls +++ b/psprint/functions/psls @@ -1,19 +1,21 @@ # DESC: `ls` or `ls -A`, depending on [[ -d .git ]] +ls=exa + [[ "$PWD" != "${PWD%Dropbox*}" ]] && echo -e '\x1b[5m\x1b[0m' if [[ ! -d _darcs && ! -d .git ]]; then # Normal - command ls "$@" + $ls "$@" return fi if [[ "$PWD" = "$HOME" ]]; then # In $HOME - still normal - command ls "$@" + $ls "$@" return fi # Full listing if in a git/darcs repository -command ls -A "$@" +$ls -a "$@" # vim:ft=zsh:et From 7862e04c7f2c25662c10be4ffc8beef92444f319 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Fri, 27 Sep 2019 08:52:59 +0200 Subject: [PATCH 14/51] Dockerfile: install rust --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 343858a..0b82363 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,9 +31,9 @@ COPY --chown=user "${FOLDER}" /home/user # Copy of a possible .zshrc named according to a non-leading-dot scheme RUN cp -vf /home/user/zshrc.zsh /home/user/.zshrc 2>/dev/null || true -# Install Rust language - currently unneeded -#RUN curl 'https://sh.rustup.rs' -sSf | sh -s -- -y && \ -# echo 'source ${HOME}/.cargo/env' >>! /home/user/.zshenv +# Install Rust language +RUN curl 'https://sh.rustup.rs' -sSf | sh -s -- -y && \ + echo 'source ${HOME}/.cargo/env' >>! /home/user/.zshenv # Run user's bootstrap script RUN if [ -f /home/user/bootstrap.sh ]; then \ @@ -44,6 +44,7 @@ RUN if [ -f /home/user/bootstrap.sh ]; then \ # Install all plugins ARG TERM ENV TERM ${TERM} -RUN SHELL=/bin/zsh zsh -i -c -- '-zplg-scheduler burst || true' +RUN SHELL=/bin/zsh zsh -i -c -- 'zplugin module build; -zplg-scheduler burst || true ' CMD zsh -i -l + From b40e321ba5dc6b9b263017a26cda33109a8b585c Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Fri, 27 Sep 2019 10:10:08 +0200 Subject: [PATCH 15/51] Dockerfile: Fix the .zshenv append --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0b82363..5dcf589 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ RUN cp -vf /home/user/zshrc.zsh /home/user/.zshrc 2>/dev/null || true # Install Rust language RUN curl 'https://sh.rustup.rs' -sSf | sh -s -- -y && \ - echo 'source ${HOME}/.cargo/env' >>! /home/user/.zshenv + echo 'source ${HOME}/.cargo/env' >> /home/user/.zshenv # Run user's bootstrap script RUN if [ -f /home/user/bootstrap.sh ]; then \ From 21380578a30d233c27bac447e33e5b855a051222 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Fri, 27 Sep 2019 10:28:43 +0200 Subject: [PATCH 16/51] NICHOLAS85: Make the z function error-resilient --- NICHOLAS85/.zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index da57790..37d982d 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -26,7 +26,8 @@ autoload -Uz _zpcompinit_fast auto-ls-colorls auto-ls-modecheck dotscheck histor # Functions to make configuration less verbose zt() { zplugin ice wait"${1}" lucid "${@:2}"; } # Turbo zi() { zplugin ice lucid "${@}"; } # Regular Ice -z() { [ -z $2 ] && zplugin light "${@}" || zplugin "${@}"; } # zplugin +z() { [ -z $2 ] && { zplugin light "${@}"; ((1)); } || zplugin "${@}"; } # zplugin + # Theme zi pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' atload'source $ZPLGM[HOME_DIR]/user/theme' From 9fffe9ad03cfe5989e2031d90dd712ba1da069a6 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sat, 28 Sep 2019 03:00:35 +0200 Subject: [PATCH 17/51] jubi zshrc, https://github.com/zdharma/zplugin-configs/issues/15 --- jubi/.zshrc | 114 ++++++++++++++++++++++++++++++++++++++++++++++ jubi/bootstrap.sh | 4 ++ 2 files changed, 118 insertions(+) create mode 100644 jubi/.zshrc create mode 100644 jubi/bootstrap.sh diff --git a/jubi/.zshrc b/jubi/.zshrc new file mode 100644 index 0000000..b8b2305 --- /dev/null +++ b/jubi/.zshrc @@ -0,0 +1,114 @@ +### Added by Zplugin's installer +source ~/.zplugin/bin/zplugin.zsh +autoload -Uz _zplugin +(( ${+_comps} )) && _comps[zplugin]=_zplugin +### End of Zplugin installer's chunk + +##### BEGIN Zplugin stuff ##### +### needs: exa, fzy, lua, python3 + +# autosuggestions, trigger precmd hook upon load +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 +zplugin ice wait"0a" lucid atload"_zsh_autosuggest_start" +zplugin light zsh-users/zsh-autosuggestions + +# z +zplugin ice wait"0b" lucid +zplugin light skywind3000/z.lua + +# cd +zplugin ice wait"0b" lucid +zplugin light b4b4r07/enhancd +export ENHANCD_FILTER=fzy + +# History substring searching +zplugin ice wait"0b" lucid +zplugin light zsh-users/zsh-history-substring-search +bindkey '^[[A' history-substring-search-up +bindkey '^[[B' history-substring-search-down + +# Tab completions +zplugin ice wait"0b" lucid blockf +zplugin light zsh-users/zsh-completions + +# Syntax highlighting must be loaded last +zplugin ice wait"0c" lucid atinit"zpcompinit;zpcdreplay" +zplugin light zdharma/fast-syntax-highlighting + +##### END Zplugin stuff ##### + +##### BEGIN zshrc generic ##### + +# Easy directory navigation +setopt autocd autopushd pushdignoredups +alias d='dirs -v | head -10' +alias b='pushd +1 > /dev/null' +alias 1='pushd +1 > /dev/null' +alias 2='pushd +2 > /dev/null' +alias 3='pushd +3 > /dev/null' +alias 4='pushd +4 > /dev/null' +alias 5='pushd +5 > /dev/null' +alias 6='pushd +6 > /dev/null' +alias 7='pushd +7 > /dev/null' +alias 8='pushd +8 > /dev/null' +alias 9='pushd +9 > /dev/null' + +# Navigating backward/forward in command +bindkey '\e\e[D' backward-word +bindkey '\e\e[C' forward-word +bindkey '^[a' beginning-of-line +bindkey '^[e' end-of-line + +# ctrl-W deletes up to a space OR '/' +export WORDCHARS='' + +# Better ls +alias ls='exa' + +# Path +export PATH=~/bin:$PATH + +# Coloring +autoload colors && colors + +##### END zshrc generic ##### + +##### BEGIN Mac specific ##### + +# iTerm2 +source "${HOME}/.iterm2_shell_integration.zsh" +function it2setbadge() { + printf "\e]1337;SetBadgeFormat=%s\a" $(echo -n "$1" | base64) +} + +# Basic ENV Variables +export EDITOR=code + +# Scripting ENV variables +export gLinux='jubi.sea.corp.google.com' +export cloudtop='jubishop.c.googlers.com' +export gLinuxMount='~/Desktop/gLinux' +export cloudtopMount='~/Desktop/Cloudtop' +export remoteHomeDir='/usr/local/google/home/jubi' +export remoteSrcDir='/google/src/cloud/jubi' + +# SSH Helpers +function gssh() { + ~/.iterm2/it2setcolor tab 000099 + ~/.iterm2/it2setcolor preset 'gLinuxPreset' + it2setbadge $2 + ssh $1 + ~/.iterm2/it2setcolor tab default + ~/.iterm2/it2setcolor preset 'MacPreset' + it2setbadge Macbook +} +alias sshome="gssh $gLinux gLinux" +alias sshcloudtop="gssh $cloudtop Cloudtop" + +# Prompt +# black, red, green, yellow, blue, magenta, cyan, white +PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )%{$reset_color%}" +PROMPT+="%{$fg[blue]%}Macbook%{$fg[white]%}:%{$fg[yellow]%}%3~" +PROMPT+="%{$fg_bold[green]%}#>%{$reset_color%}" + +##### END Mac specific ##### diff --git a/jubi/bootstrap.sh b/jubi/bootstrap.sh new file mode 100644 index 0000000..12cf881 --- /dev/null +++ b/jubi/bootstrap.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh + +sudo apt install --yes lua5.3 +cargo install exa From 75fdcadcdbec20003cc2033a06aaff9ed8a10702 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sat, 28 Sep 2019 05:02:25 +0200 Subject: [PATCH 18/51] psprint: Update to use z-a-bin-gem-node annex instead of as"command" --- psprint/bootstrap.sh | 3 +- psprint/zshrc.zsh | 154 ++++++++++++++++++++++++++++++------------- 2 files changed, 109 insertions(+), 48 deletions(-) diff --git a/psprint/bootstrap.sh b/psprint/bootstrap.sh index 62d78fb..ea4212e 100644 --- a/psprint/bootstrap.sh +++ b/psprint/bootstrap.sh @@ -1,6 +1,7 @@ #!/usr/bin/env zsh -sudo apt install --yes cmake redis-server libhiredis-dev +sudo apt install --yes cmake redis-server libhiredis-dev \ + tree gem # For zdharma/zredis sudo mkdir -p usr/local/var/db/redis diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index f111424..d155f47 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -28,7 +28,7 @@ setopt no_hist_no_functions no_always_to_end append_history list_packed setopt inc_append_history complete_in_word no_auto_menu auto_pushd setopt pushd_ignore_dups no_glob_complete no_glob_dots c_bases setopt numeric_glob_sort no_share_history promptsubst auto_cd -setopt rc_quotes +setopt rc_quotes extendedglob #setopt IGNORE_EOF #setopt NO_SHORT_LOOPS @@ -96,9 +96,9 @@ alias pl='print -rl --' alias ls="exa -bh --color=auto" alias l="ls" l.='ls -d .*' la='ls -a' ll='ls -lbt created' rm='command rm -i' alias df='df -h' du='du -h' cp='cp -v' mv='mv -v' plast="last -20" -alias reload="exec $SHELL -l -i" grep="command grep --colour=auto" +alias reload="exec $SHELL -l -i" grep="command grep --colour=auto --binary-files=without-match --directories=skip" alias lynx="command lynx -accept-all-cookies" ult="ulimit -c 195312; echo $$" -ulimit -c $(( 100000000 / 512 )) +ulimit -c unlimited # Git alias g1log_branches="git log --color=always --oneline --decorate --graph --branches" @@ -178,8 +178,8 @@ 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}" ]; then - altxt=${altxt#ls=\'ls} + if [ "$altxt" != "${altxt#ls=\'(ls|exa)}" ]; then + altxt=${altxt#ls=\'exa} altxt=${altxt%\'} altxt="ls=psls$altxt" alias "$altxt" @@ -190,6 +190,8 @@ else zflai-msg "[zshrc] \`ls' alias: ls=psls" fi +unset altxt + fpath+=( $HOME/functions ) autoload -Uz psprobe_host psffconv pssetup_ssl_cert psrecompile pscopy_xauth \ @@ -202,6 +204,8 @@ autoload -Uz psprobe_host psffconv pssetup_ssl_cert psrecompile pscop n1ssl_rtunnel \ pngimage deploy-code deploy-message +autoload +X zman +functions[zzman]="${functions[zman]}" function run_diso { sh -c "$@" & disown @@ -233,7 +237,7 @@ localbin_on PS1="READY > " zstyle ":plugin:zconvey" greeting "none" zstyle ':notify:*' command-complete-timeout 3 -zstyle ':notify:*' notifier /Users/sgniazdowski/.zplugin/plugins/zdharma---zconvey/cmds/plg-zsh-notify +zstyle ':notify:*' notifier /home/user/.zplugin/plugins/zdharma---zconvey/cmds/plg-zsh-notify palette() { local colors; for n in {000..255}; do colors+=("%F{$n}$n%f"); done; print -cP $colors; } @@ -247,10 +251,31 @@ zflai-msg "[zshrc] ssl tunnel PID: $!" typeset -F4 SECONDS=0 +[[ ! -f ~/.zplugin/bin/zplugin.zsh ]] && { + command mkdir -p ~/.zplugin + command git clone https://github.com/zdharma/zplugin ~/.zplugin/bin +} + source "$HOME/.zplugin/bin/zplugin.zsh" autoload -Uz _zplugin (( ${+_comps} )) && _comps[zplugin]=_zplugin +# annex (a Zplugin extension) that generates man pages +# for all plugins and snippets +zplugin light zplugin/z-a-man +# annex (a Zplugin extension) that runs tests for all +# plugins and snippets +zplugin light zplugin/z-a-test +# annex (a Zplugin extension) that allows to download +# files and apply patches +zplugin light zplugin/z-a-patch-dl +# annex (a Zplugin extension) which allows to +# explicitly clone submodules +zplugin light zplugin/z-a-submods +# annex (a Zplugin extension) that exposes commands +# without altering $PATH +zplugin light zplugin/z-a-bin-gem-node + # Assign each zsh session an unique ID, available in # ZUID_ID and also a codename (ZUID_CODENAME) zplugin load zdharma/zsh-unique-id @@ -264,33 +289,33 @@ zplugin snippet OMZ::lib/git.zsh zplugin ice wait lucid atload"unalias grv g" zplugin snippet OMZ::plugins/git/git.plugin.zsh -# zsh-startify, a vim-startify -like plugin -: zplugin ice wait"0b" lucid atload"zsh-startify" -: zplugin load zdharma/zsh-startify - # On OSX, you might need to install coreutils from homebrew and use the # g-prefix – gsed, gdircolors -zplugin ice wait"0c" lucid \ - atclone"local PFX=${${(M)OSTYPE:#*darwin*}:+g} - git reset --hard; \${PFX}sed -i \ - '/DIR/c\DIR 38;5;63;1' LS_COLORS; \ - \${PFX}dircolors -b LS_COLORS > c.zsh" \ - atpull'%atclone' pick"c.zsh" nocompile'!' \ - atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”' -zplugin light trapd00r/LS_COLORS +zplugin ice wait"0c" lucid 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}”' +zplugin light 'trapd00r/LS_COLORS' # Zconvey shell integration plugin zplugin ice wait silent zplugin load zdharma/zconvey -# z-plugin (a Zplugin extension) which allows to explicitly clone submodules -zplugin ice wait lucid -zplugin light zdharma/z-p-submods - # Another load of the same plugin, to add zc-bg-notify to PATH -zplugin ice wait silent as"program" id-as"zconvey-cmd" pick"cmds/zc-bg-notify" +zplugin ice wait silent pick"/dev/null" id-as"zconvey-cmd" \ + sbin"cmds/zc-bg-notify" fbin"cmds/zc-bg-notify" zplugin load zdharma/zconvey +# zsh-startify, a vim-startify like plugin +zplugin ice wait"0b" lucid atload"zsh-startify" +zplugin load zdharma/zsh-startify + +#zplugin ice wait lucid pick"manydots-magic" compile"manydots-magic" +#zplugin load knu/zsh-manydots-magic + # fzy zplugin ice wait"1" lucid as"program" pick"$ZPFX/bin/fzy*" \ atclone"cp contrib/fzy-* $ZPFX/bin/" \ @@ -298,7 +323,7 @@ zplugin ice wait"1" lucid as"program" pick"$ZPFX/bin/fzy*" \ zplugin light jhawthorn/fzy # fzf, for fzf-marks -zplugin ice wait lucid from"gh-r" as"program" +zplugin ice wait lucid from"gh-r" sbin"fzf" fbin"fzf" zplugin light junegunn/fzf-bin # fzf-marks, at slot 0, for quick Ctrl-G accessibility @@ -309,14 +334,26 @@ zplugin load urbainvaes/fzf-marks zplugin ice wait lucid zplugin load hlissner/zsh-autopair +# hiredis library needed for zredis plugin +zplugin ice wait"1" lucid make"PREFIX=$ZPFX all install" pick"/dev/null" +zplugin light redis/hiredis + # zredis together with some binding/tying zstyle ":plugin:zredis" configure_opts "--without-tcsetpgrp" zstyle ":plugin:zredis" cflags "-Wall -O2 -g -Wno-unused-but-set-variable" +#zstyle ":plugin:zredis" cppflags "-I$ZPFX/include -I/usr/include" +#zstyle ":plugin:zredis" ldflags "-L$ZPFX/lib -L /usr/lib" zplugin ice wait"1" lucid \ atload'ztie -d db/redis -a 127.0.0.1:4815/5 -P $HOME/.zredisconf -zSL main rdhash' zplugin load zdharma/zredis -# a service that runs the redis database, in background, single instance +# An yet unfinished plugin for remote command +# execution based on zredis +zplugin ice wait"1" lucid +zplugin load zdharma/zredis-cmd + +# a service that runs the redis database, in +# background, single instance zplugin ice wait"1" lucid service"redis" zplugin light zservices/redis @@ -359,8 +396,8 @@ zplugin load ergenekonyigit/lambda-gitster # Theme no. 4 – geometry GEOMETRY_COLOR_DIR=63 GEOMETRY_PATH_COLOR=63 -zplugin ice lucid load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ - atload"prompt_geometry_render" +zplugin ice load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ + atload'!geometry::prompt' lucid zplugin load geometry-zsh/geometry # Theme no. 5 – pure @@ -370,56 +407,68 @@ zplugin load sindresorhus/pure # Theme no. 6 - agkozak-zsh-theme AGKOZAK_FORCE_ASYNC_METHOD=subst-async -zplugin ice lucid load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' +zplugin ice lucid load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' \ + atload'!_agkozak_precmd' zplugin load agkozak/agkozak-zsh-theme # Theme no. 7 - zinc zplugin ice load'![[ $MYPROMPT = 7 ]]' unload'![[ $MYPROMPT != 7 ]]' \ - atclone'prompt_zinc_compile' atload'zinc_selfdestruct_setup' \ + atclone'prompt_zinc_compile' \ atpull'%atclone' compile"{zinc_functions/*,segments/*,zinc.zsh}" \ - nocompletions wrap-track'prompt_zinc_setup' + nocompletions atload'!prompt_zinc_setup; prompt_zinc_precmd' zplugin load robobenklein/zinc # Theme no. 8 - powerlevel10k zplugin ice load'![[ $MYPROMPT = 8 ]]' unload'![[ $MYPROMPT != 8 ]]' \ - atload'source ~/.p10k.zsh; _p9k_precmd' lucid nocd wrap-track"_p9k_precmd" + atload'!source ~/.p10k.zsh; _p9k_precmd' lucid #wrap-track"_p9k_precmd" zplugin load romkatv/powerlevel10k + +# Theme no. 9 - git-prompt +zplugin ice load'![[ $MYPROMPT = 9 ]]' unload'![[ $MYPROMPT != 9 ]]' \ + atload'!_zsh_git_prompt_precmd_hook' lucid +zplugin load woefe/git-prompt.zsh + # ZUI and Crasis zplugin ice wait"1" lucid zplugin load zdharma/zui -zplugin ice wait'[[ -n ${ZLAST_COMMANDS[(r)cras*]} ]]' lucid +zplugin ice wait'[[ -n ${ZLAST_COMMANDS[(r)cra*]} ]]' zplugin load zdharma/zplugin-crasis # Gitignore plugin – commands gii and gi zplugin ice wait"2" lucid zplugin load voronkovich/gitignore.plugin.zsh -# Autosuggestions & fast-syntax-highlighting -zplugin ice wait"1b" lucid atload"_zsh_autosuggest_start" \ - wrap-track"_zsh_autosuggest_start" +# Fast-syntax-highlighting & autosuggestions +zplugin ice wait"1" lucid atload"!_zsh_autosuggest_start" zplugin load zsh-users/zsh-autosuggestions -zplugin ice wait"1" lucid atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" +zplugin ice wait"1b" lucid atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" zplugin light zdharma/fast-syntax-highlighting -#zplugin ice wait"1" lucid from"gl" from"psprint@gitlab.com" +# F-Sy-H automatic themes – available for patrons +# https://patreon.com/psprint +#zplugin ice wait"1" lucid from"psprint@gitlab.com" #zplugin load psprint/fsh-auto-themes # ogham/exa, replacement for ls -zplugin ice wait"2" lucid from"gh-r" as"program" mv"exa* -> exa" +zplugin ice wait"2" lucid from"gh-r" mv"exa* -> exa" sbin"exa" fbin"exa" zplugin light ogham/exa +# sharkdp/fd +zplugin ice from"gh-r" mv"fd* -> fd" sbin"fd/fd" fbin"fd/fd" +zplugin light sharkdp/fd + # vramsteg -zplugin ice wait"2" lucid as"program" pick"src/vramsteg" \ - atclone'cmake .' atpull'%atclone' make +zplugin ice wait"2" lucid sbin"src/vramsteg" fbin"src/vramsteg" \ + atclone'cmake .' atpull'%atclone' make pick"/dev/null" zplugin load psprint/vramsteg-zsh # revolver -zplugin ice wait"2" lucid as"program" pick"revolver" +zplugin ice wait"2" lucid sbin"revolver" fbin"revolver" pick"/dev/null" zplugin load psprint/revolver # zunit -zplugin ice wait"2" lucid as"program" pick"zunit" \ - atclone"./build.zsh" atpull"%atclone" +zplugin ice wait"2" lucid sbin"zunit" fbin"zunit" atclone"./build.zsh" \ + atpull"%atclone" pick'/dev/null' zplugin load molovo/zunit # declare-zshrc @@ -427,7 +476,7 @@ zplugin ice wait"2" lucid zplugin load zdharma/declare-zshrc # zsh-diff-so-fancy -zplugin ice wait"2" lucid as"program" pick"bin/git-dsf" +zplugin ice wait"2" lucid sbin"bin/git-dsf" fbin"bin/git-dsf" pick"/dev/null" zplugin load zdharma/zsh-diff-so-fancy # forgit @@ -452,7 +501,7 @@ zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-(url|guclone)" make"ins zplugin load zdharma/git-url # git-recall -zplugin ice wait"3" lucid as"program" pick"git-recall" +zplugin ice wait"3" lucid sbin"git-recall" fbin"git-recall" pick"/dev/null" zplugin load Fakerr/git-recall # git-quick-stats @@ -465,8 +514,19 @@ zplugin load arzzen/git-quick-stats.git zplugin ice wait lucid bindmap"^R -> ^G" zplugin load ~/gitlab/zsh-tag-search.git -: zplugin ice wait lucid blockf -: zplugin light marzocchi/zsh-notify +# asciinema +zplugin ice 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" +zplugin load asciinema/asciinema.git + +# Notifications, configured to use zconvey +zplugin ice wait lucid +zplugin light marzocchi/zsh-notify + : zplugin ice wait lucid : zplugin light rimraf/k : zplugin light zsh-users/zsh-syntax-highlighting From d7d11093e3c60ac9d0f7985d8c7f8f6a4a8a291f Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sat, 28 Sep 2019 07:03:38 +0200 Subject: [PATCH 19/51] psprint: Pass DEBIAN_FRONTEND=noninteractive to sudo --- psprint/bootstrap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/psprint/bootstrap.sh b/psprint/bootstrap.sh index ea4212e..5d1a625 100644 --- a/psprint/bootstrap.sh +++ b/psprint/bootstrap.sh @@ -1,6 +1,7 @@ #!/usr/bin/env zsh sudo apt install --yes cmake redis-server libhiredis-dev \ +sudo DEBIAN_FRONTEND=noninteractive apt install --yes cmake redis-server libhiredis-dev \ tree gem # For zdharma/zredis From 4a01b522bdaeb79e09b775b0c4ed7eb76060f42a Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sat, 28 Sep 2019 10:00:47 +0200 Subject: [PATCH 20/51] psprint: Update --- psprint/bootstrap.sh | 1 - psprint/zshrc.zsh | 35 ++++++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/psprint/bootstrap.sh b/psprint/bootstrap.sh index 5d1a625..51cb7be 100644 --- a/psprint/bootstrap.sh +++ b/psprint/bootstrap.sh @@ -1,6 +1,5 @@ #!/usr/bin/env zsh -sudo apt install --yes cmake redis-server libhiredis-dev \ sudo DEBIAN_FRONTEND=noninteractive apt install --yes cmake redis-server libhiredis-dev \ tree gem diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index d155f47..ffb848e 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -262,7 +262,7 @@ autoload -Uz _zplugin # annex (a Zplugin extension) that generates man pages # for all plugins and snippets -zplugin light zplugin/z-a-man +#zplugin light zplugin/z-a-man # annex (a Zplugin extension) that runs tests for all # plugins and snippets zplugin light zplugin/z-a-test @@ -454,7 +454,7 @@ zplugin ice wait"2" lucid from"gh-r" mv"exa* -> exa" sbin"exa" fbin"exa" zplugin light ogham/exa # sharkdp/fd -zplugin ice from"gh-r" mv"fd* -> fd" sbin"fd/fd" fbin"fd/fd" +zplugin ice wait"2" lucid from"gh-r" mv"fd* -> fd" sbin"fd/fd" fbin"fd/fd" zplugin light sharkdp/fd # vramsteg @@ -476,12 +476,14 @@ zplugin ice wait"2" lucid zplugin load zdharma/declare-zshrc # zsh-diff-so-fancy -zplugin ice wait"2" lucid sbin"bin/git-dsf" fbin"bin/git-dsf" pick"/dev/null" +zplugin ice wait"2" lucid sbin"bin/git-dsf" fbin"bin/git-dsf" \ + sbin"bin/diff-so-fancy" fbin"bin/diff-so-fancy" \ + pick"/dev/null" zplugin load zdharma/zsh-diff-so-fancy # forgit zplugin ice wait'2' lucid -zplugin load 'wfxr/forgit' +zplugin load wfxr/forgit # git-now zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-now" make"PREFIX=$ZPFX install" @@ -510,18 +512,29 @@ zplugin ice wait"3" lucid as"program" make"PREFIX=$ZPFX install" \ atload"export _MENU_THEME=legacy" zplugin load arzzen/git-quick-stats.git +# fbterm +zplugin ice \ + 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 +zplugin load izmntuk/fbterm + # zsh-tag-search zplugin ice wait lucid bindmap"^R -> ^G" zplugin load ~/gitlab/zsh-tag-search.git # asciinema -zplugin ice 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" -zplugin load asciinema/asciinema.git +#zplugin ice 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" +#zplugin load asciinema/asciinema.git # Notifications, configured to use zconvey zplugin ice wait lucid From 82d9c55664e86798484ed7cbb05e858231bc5d9c Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sat, 28 Sep 2019 10:56:25 +0200 Subject: [PATCH 21/51] psprint: Update --- psprint/bootstrap.sh | 2 +- psprint/zshrc.zsh | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/psprint/bootstrap.sh b/psprint/bootstrap.sh index 51cb7be..f6e34ce 100644 --- a/psprint/bootstrap.sh +++ b/psprint/bootstrap.sh @@ -1,7 +1,7 @@ #!/usr/bin/env zsh sudo DEBIAN_FRONTEND=noninteractive apt install --yes cmake redis-server libhiredis-dev \ - tree gem + tree gem libfreetype6-dev libfontconfig-dev # For zdharma/zredis sudo mkdir -p usr/local/var/db/redis diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index ffb848e..de9fa41 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -289,6 +289,11 @@ zplugin snippet OMZ::lib/git.zsh zplugin ice wait lucid atload"unalias grv g" zplugin snippet OMZ::plugins/git/git.plugin.zsh +# zunit +zplugin ice wait"1" lucid sbin"zunit" fbin"zunit" atclone"./build.zsh" \ + atpull"%atclone" pick'/dev/null' +zplugin load molovo/zunit + # On OSX, you might need to install coreutils from homebrew and use the # g-prefix – gsed, gdircolors zplugin ice wait"0c" lucid reset \ @@ -344,7 +349,7 @@ zstyle ":plugin:zredis" cflags "-Wall -O2 -g -Wno-unused-but-set-variable" #zstyle ":plugin:zredis" cppflags "-I$ZPFX/include -I/usr/include" #zstyle ":plugin:zredis" ldflags "-L$ZPFX/lib -L /usr/lib" zplugin ice wait"1" lucid \ - atload'ztie -d db/redis -a 127.0.0.1:4815/5 -P $HOME/.zredisconf -zSL main rdhash' + atload'ztie -d db/redis -a 127.0.0.1:4815/5 -zSL main rdhash' zplugin load zdharma/zredis # An yet unfinished plugin for remote command @@ -466,11 +471,6 @@ zplugin load psprint/vramsteg-zsh zplugin ice wait"2" lucid sbin"revolver" fbin"revolver" pick"/dev/null" zplugin load psprint/revolver -# zunit -zplugin ice wait"2" lucid sbin"zunit" fbin"zunit" atclone"./build.zsh" \ - atpull"%atclone" pick'/dev/null' -zplugin load molovo/zunit - # declare-zshrc zplugin ice wait"2" lucid zplugin load zdharma/declare-zshrc @@ -513,7 +513,7 @@ zplugin ice wait"3" lucid as"program" make"PREFIX=$ZPFX install" \ zplugin load arzzen/git-quick-stats.git # fbterm -zplugin ice \ +zplugin ice 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" \ From 075a294f4531e5e607133e4b49eef847bb2b8d46 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sat, 28 Sep 2019 11:29:29 +0200 Subject: [PATCH 22/51] psprint: final update --- psprint/zshrc.zsh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index de9fa41..b9c8245 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -513,15 +513,15 @@ zplugin ice wait"3" lucid as"program" make"PREFIX=$ZPFX install" \ zplugin load arzzen/git-quick-stats.git # fbterm -zplugin ice 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 -zplugin load izmntuk/fbterm +#zplugin ice 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 +#zplugin load izmntuk/fbterm # zsh-tag-search zplugin ice wait lucid bindmap"^R -> ^G" From 156cd448c635e96cdeb1d7a6021396bcfc810909 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sun, 29 Sep 2019 20:55:23 +0200 Subject: [PATCH 23/51] psprint: New update --- psprint/bootstrap.sh | 3 ++- psprint/zshrc.zsh | 11 +++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/psprint/bootstrap.sh b/psprint/bootstrap.sh index f6e34ce..5f24de0 100644 --- a/psprint/bootstrap.sh +++ b/psprint/bootstrap.sh @@ -1,7 +1,8 @@ #!/usr/bin/env zsh sudo DEBIAN_FRONTEND=noninteractive apt install --yes cmake redis-server libhiredis-dev \ - tree gem libfreetype6-dev libfontconfig-dev + tree gem libfreetype6-dev libfontconfig-dev \ + autoconf automake # For zdharma/zredis sudo mkdir -p usr/local/var/db/redis diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index b9c8245..5ec28bc 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -306,12 +306,7 @@ zplugin ice wait"0c" lucid reset \ zplugin light 'trapd00r/LS_COLORS' # Zconvey shell integration plugin -zplugin ice wait silent -zplugin load zdharma/zconvey - -# Another load of the same plugin, to add zc-bg-notify to PATH -zplugin ice wait silent pick"/dev/null" id-as"zconvey-cmd" \ - sbin"cmds/zc-bg-notify" fbin"cmds/zc-bg-notify" +zplugin ice wait silent sbin"cmds/zc-bg-notify" fbin"cmds/zc-bg-notify" zplugin load zdharma/zconvey # zsh-startify, a vim-startify like plugin @@ -468,7 +463,7 @@ zplugin ice wait"2" lucid sbin"src/vramsteg" fbin"src/vramsteg" \ zplugin load psprint/vramsteg-zsh # revolver -zplugin ice wait"2" lucid sbin"revolver" fbin"revolver" pick"/dev/null" +zplugin ice wait"2" lucid as"program" pick"revolver" zplugin load psprint/revolver # declare-zshrc @@ -525,7 +520,7 @@ zplugin load arzzen/git-quick-stats.git # zsh-tag-search zplugin ice wait lucid bindmap"^R -> ^G" -zplugin load ~/gitlab/zsh-tag-search.git +zplugin load zdharma/zsh-tag-search # asciinema #zplugin ice wait lucid as"command" \ From 388a2786c837cd26f853aacedac3fbd45c1c4e41 Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Sat, 28 Sep 2019 16:10:00 -0400 Subject: [PATCH 24/51] NICHOLAS85: Update personal files --- NICHOLAS85/.zplugin/user/personal | 8 +++--- NICHOLAS85/.zshrc | 42 ++++++++++++++++--------------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/NICHOLAS85/.zplugin/user/personal b/NICHOLAS85/.zplugin/user/personal index 6ef7bd3..1bb326a 100644 --- a/NICHOLAS85/.zplugin/user/personal +++ b/NICHOLAS85/.zplugin/user/personal @@ -60,13 +60,13 @@ $isdolphin && alias cd='clear -x; cd' alias g='git' alias ls='lsd --group-dirs=first' -#alias apt="apt-fast" #alias open='xdg-open' -# allow sudo to expand aliases (checkinstall for example) as well as run anything in $PATH +# allow sudo to expand aliases as well as run anything in $PATH alias sudo='sudo env PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ' -#alias checkinstall='checkinstall -D --pakdir=${HOME}/OneDrive/Linux/installed/debs/built' alias gencomp='echo "Use gcomp"' alias -- -='cd -' +alias atom='atom-beta --disable-gpu' +alias apm='apm-beta' unalias zplg @@ -112,4 +112,4 @@ zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' zstyle ':completion:*' rehash true bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word -bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word +bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index 37d982d..5b6872b 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -1,10 +1,14 @@ -# https://github.com/NICHOLAS85/dotfiles/blob/master/.zshrc +# https://github.com/NICHOLAS85/dotfiles/blob/xps_13_9365/.zshrc + # Install zplugin if not installed if [ ! -d "${HOME}/.zplugin" ]; then sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)" fi +module_path+=( "/home/nicholas/.zplugin/bin/zmodules/Src" ) +zmodload zdharma/zplugin + ### Added by Zplugin's installer source "${HOME}/.zplugin/bin/zplugin.zsh" autoload -Uz _zplugin @@ -15,8 +19,8 @@ if [[ ! -d "$ZPFX" ]]; then mkdir -v $ZPFX fi if [[ ! -d "$ZPLGM[HOME_DIR]/user" ]]; then - curl https://codeload.github.com/NICHOLAS85/dotfiles/tar.gz/master | \ - tar -xz --strip=2 dotfiles-master/.zplugin/user; mv user "$ZPLGM[HOME_DIR]/" + curl https://codeload.github.com/NICHOLAS85/dotfiles/tar.gz/xps_13_9365 | \ + tar -xz --strip=2 dotfiles-xps_13_9365/.zplugin/user; mv user "$ZPLGM[HOME_DIR]/" fi # Autoload personal functions @@ -24,17 +28,15 @@ fpath=("$ZPLGM[HOME_DIR]/user/functions" "${fpath[@]}") autoload -Uz _zpcompinit_fast auto-ls-colorls auto-ls-modecheck dotscheck history-stat # Functions to make configuration less verbose -zt() { zplugin ice wait"${1}" lucid "${@:2}"; } # Turbo -zi() { zplugin ice lucid "${@}"; } # Regular Ice +zt() { zplugin ice lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } # Smart Turbo z() { [ -z $2 ] && { zplugin light "${@}"; ((1)); } || zplugin "${@}"; } # zplugin - # Theme -zi pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' atload'source $ZPLGM[HOME_DIR]/user/theme' +zt pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' atload'source $ZPLGM[HOME_DIR]/user/theme' z denysdovhan/spaceship-prompt # Oh-my-zsh libs -zi atinit'ZSH_CACHE_DIR="$HOME/.zcompcache"' +zt atinit'ZSH_CACHE_DIR="$HOME/.zcompcache"' z snippet OMZ::lib/history.zsh zt 0a @@ -42,10 +44,10 @@ z snippet OMZ::lib/completion.zsh # Plugins -#zi atload'ZSH_EVALCACHE_DIR="$ZPFX/.zsh-evalcache"' +#zt atload'ZSH_EVALCACHE_DIR="$ZPFX/.zsh-evalcache"' #z mroth/evalcache -zt 0b atclone"git reset --hard; sed -i '/DIR/c\DIR 34;5;30' LS_COLORS; dircolors -b LS_COLORS > c.zsh" atpull'%atclone' pick"c.zsh" nocompile'!' +zt 0b atclone"sed -i '/DIR/c\DIR 34;5;30' LS_COLORS; dircolors -b LS_COLORS > c.zsh" atpull'%atclone' pick"c.zsh" nocompile'!' reset z trapd00r/LS_COLORS zt 0a has'systemctl' @@ -63,28 +65,28 @@ z ael-code/zsh-colored-man-pages zt 0a make z sei40kr/zsh-fast-alias-tips -zt 0b has'git' as'command' +zt wait'[[ -n ${ZLAST_COMMANDS[(r)g*]} ]]' has'git' as'command' z paulirish/git-open -zt 0b has'git' +zt wait'[[ -n ${ZLAST_COMMANDS[(r)g*]} ]]' has'git' z wfxr/forgit #replaced gi with local git-ignore plugin -zt 0b has'git' pick'init.zsh' atload'alias gi="git-ignore"' blockf +zt wait'[[ -n ${ZLAST_COMMANDS[(r)g*]} ]]' has'git' pick'init.zsh' atload'alias gi="git-ignore"' blockf z laggardkernel/git-ignore -zt 0a as'program' atpull'!git reset --hard' pick'wd.sh' mv'_wd.sh -> _wd' atload'wd() { source wd.sh }; WD_CONFIG="$ZPFX/.warprc"' blockf +zt 0a as'program' pick'wd.sh' mv'_wd.sh -> _wd' atload'wd() { source wd.sh }; WD_CONFIG="$ZPFX/.warprc"' blockf reset z mfaerevaag/wd zt 0a ver'plugin' z NICHOLAS85/updatelocal -zt '[[ -n ${ZLAST_COMMANDS[(r)gcom*]} ]]' atload'gcomp(){ \gencomp $1 && zplugin creinstall -q RobSis/zsh-completion-generator; }' pick'zsh-completion-generator.plugin.zsh' +zt wait'[[ -n ${ZLAST_COMMANDS[(r)gcom*]} ]]' atload'gcomp(){ \gencomp $1 && zplugin creinstall -q RobSis/zsh-completion-generator; }' pick'zsh-completion-generator.plugin.zsh' z RobSis/zsh-completion-generator #loaded when needed via gcomp -zt 0b as'program' pick'rm-trash/rm-trash' atclone"git reset --hard; sed -i '2 i [[ \$EUID = 0 ]] && { echo \"Root detected, running builtin rm\"; command rm -I -v \"\${@}\"; exit; }' rm-trash/rm-trash" atpull'%atclone' atload'alias rm="rm-trash ${rm_opts}"' \ -compile'rm-trash/rm-trash' nocompile'!' +zt 0b as'program' pick'rm-trash/rm-trash' atclone"sed -i '2 i [[ \$EUID = 0 ]] && { echo \"Root detected, running builtin rm\"; command rm -I -v \"\${@}\"; exit; }' rm-trash/rm-trash" atpull'%atclone' atload'alias rm="rm-trash ${rm_opts}"' \ +compile'rm-trash/rm-trash' nocompile'!' reset z nateshmbhat/rm-trash zt 0b has'thefuck' trackbinds bindmap'\e\e -> ^[OP^[OP' pick'init.zsh' @@ -108,14 +110,14 @@ z hlissner/zsh-autopair zt 0a blockf atpull'zplugin creinstall -q .' z zsh-users/zsh-completions -zt '[[ $isdolphin != true ]]' +zt wait'[[ $isdolphin != true ]]' z load desyncr/auto-ls zt 0c atload'bindkey "$terminfo[kcuu1]" history-substring-search-up; bindkey "$terminfo[kcud1]" history-substring-search-down' z zsh-users/zsh-history-substring-search -zt 0b compile'{src/*.zsh,src/strategies/*}' atload'_zsh_autosuggest_start' -z zsh-users/zsh-autosuggestions +zt 0b compile'{src/*.zsh,src/strategies/*}' atload'!_zsh_autosuggest_start' +z load zsh-users/zsh-autosuggestions zt 0b pick'manydots-magic' compile'manydots-magic' z knu/zsh-manydots-magic From c98b3d6ade08337789241e6f10df6df8e830151d Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Sat, 28 Sep 2019 16:14:20 -0400 Subject: [PATCH 25/51] NICHOLAS85: Update personal files --- NICHOLAS85/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index 5b6872b..80d4eb6 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -78,7 +78,7 @@ z laggardkernel/git-ignore zt 0a as'program' pick'wd.sh' mv'_wd.sh -> _wd' atload'wd() { source wd.sh }; WD_CONFIG="$ZPFX/.warprc"' blockf reset z mfaerevaag/wd -zt 0a ver'plugin' +zt 0a z NICHOLAS85/updatelocal zt wait'[[ -n ${ZLAST_COMMANDS[(r)gcom*]} ]]' atload'gcomp(){ \gencomp $1 && zplugin creinstall -q RobSis/zsh-completion-generator; }' pick'zsh-completion-generator.plugin.zsh' From f6c2445d6fe6c36966dff30833211454ef6466a2 Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Sat, 28 Sep 2019 16:16:56 -0400 Subject: [PATCH 26/51] NICHOLAS85: Update personal files --- NICHOLAS85/.zshrc | 1 - 1 file changed, 1 deletion(-) diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index 80d4eb6..6e95ed0 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -1,6 +1,5 @@ # https://github.com/NICHOLAS85/dotfiles/blob/xps_13_9365/.zshrc - # Install zplugin if not installed if [ ! -d "${HOME}/.zplugin" ]; then sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)" From 4f4154603096494a64f555fafd8f7d6069cb01f5 Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Wed, 9 Oct 2019 02:14:07 -0400 Subject: [PATCH 27/51] NICHOLAS85: Update personal files --- .../plugins/_local---config-files/LICENSE | 22 ++++++ .../plugins/_local---config-files/README.md | 1 + .../config-files.plugin.zsh} | 56 +++++++++----- .../functions/_zpcompinit_fast | 22 ++++++ .../functions/auto-ls-colorls | 0 .../functions/auto-ls-modecheck | 2 +- .../functions/dotscheck | 0 .../functions/history-stat | 0 .../_local---config-files/themes/dolphin | 76 +++++++++++++++++++ .../_local---config-files/themes/spaceship} | 0 .../themes/spaceship-async | 64 ++++++++++++++++ .../.zplugin/user/functions/_zpcompinit_fast | 13 ---- NICHOLAS85/.zshrc | 69 +++++++++++------ 13 files changed, 267 insertions(+), 58 deletions(-) create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/LICENSE create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/README.md rename NICHOLAS85/.zplugin/{user/personal => plugins/_local---config-files/config-files.plugin.zsh} (77%) create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/functions/_zpcompinit_fast rename NICHOLAS85/.zplugin/{user => plugins/_local---config-files}/functions/auto-ls-colorls (100%) rename NICHOLAS85/.zplugin/{user => plugins/_local---config-files}/functions/auto-ls-modecheck (72%) rename NICHOLAS85/.zplugin/{user => plugins/_local---config-files}/functions/dotscheck (100%) rename NICHOLAS85/.zplugin/{user => plugins/_local---config-files}/functions/history-stat (100%) create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin rename NICHOLAS85/.zplugin/{user/theme => plugins/_local---config-files/themes/spaceship} (100%) create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async delete mode 100644 NICHOLAS85/.zplugin/user/functions/_zpcompinit_fast diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/LICENSE b/NICHOLAS85/.zplugin/plugins/_local---config-files/LICENSE new file mode 100644 index 0000000..396d783 --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/LICENSE @@ -0,0 +1,22 @@ +This software is licensed under MIT. + +MIT License +----------- + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/README.md b/NICHOLAS85/.zplugin/plugins/_local---config-files/README.md new file mode 100644 index 0000000..b2a5f6a --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/README.md @@ -0,0 +1 @@ +# config-files diff --git a/NICHOLAS85/.zplugin/user/personal b/NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh similarity index 77% rename from NICHOLAS85/.zplugin/user/personal rename to NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh index 1bb326a..239b4f7 100644 --- a/NICHOLAS85/.zplugin/user/personal +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh @@ -1,5 +1,17 @@ #Let Atom highlight this: -*- shell-script -*- +# According to the Zsh Plugin Standard: +# http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html + +0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" +0="${${(M)0:#/*}:-$PWD/$0}" + +# Then ${0:h} to get plugin's directory + +# Autoload personal functions +fpath=("${0:h}/functions" "${fpath[@]}") +autoload -Uz _zpcompinit_fast auto-ls-colorls auto-ls-modecheck dotscheck history-stat + ######################### # Variables # ######################### @@ -9,15 +21,21 @@ HISTFILE="${HOME}/.histfile" ZSH_AUTOSUGGEST_USE_ASYNC=true ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=50 +HISTORY_SUBSTRING_SEARCH_FUZZY=set + colorlscommand=(lsd --group-dirs first) -colorlsgitcommand=(colorls --gs -A) +colorlsgitcommand=(colorls --sd --gs -A) -AUTO_LS_COMMANDS=(modecheck colorls) -AUTO_LS_COMMANDSBAT=(ls) +AUTO_LS_COMMANDS=(colorls) +#AUTO_LS_COMMANDSBAT=(ls) AUTO_LS_NEWLINE=false EDITOR=kate +forgit_ignore="/dev/null" + +WD_CONFIG="${ZPFX}/warprc" + rm_opts=(-I -v) # Directory checked for locally built projects (plugin updatelocal) @@ -26,17 +44,22 @@ UPDATELOCAL_GITDIR="${HOME}/github/Built" # Strings to ignore when using dotscheck, escape and single quote stuff that could be wild cards (../) dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' '\.config/gtk-3\.0/settings\.ini' ) -isdolphin=false # Export variables when connected via SSH if [[ -n $SSH_CONNECTION ]]; then export DISPLAY=:0 colorlscommand=(lsd --group-dirs first --icon never) - AUTO_LS_COMMANDS=(colorls) + alias ls="lsd --group-dirs=first --icon=never" else - # Used to programatically disable plugins when opening the terminal view in dolphin - if [[ $(ps -ocommand= -p $PPID) =~ "dolphin" ]]; then - isdolphin=true - fi + alias ls='lsd --group-dirs=first' +fi + +# Used to programatically disable plugins when opening the terminal view in dolphin +if [[ $MYPROMPT = dolphin ]]; then + isdolphin=true + # Aesthetic function for Dolphin, clear -x if cd while in Dolphin + alias cd='clear -x; cd' +else + isdolphin=false fi ######################### @@ -47,20 +70,16 @@ fi alias ..='command .. 2>/dev/null || cd $(dirname $PWD)' # Access zsh config files -alias zshconf='${=EDITOR} $ZPLGM[HOME_DIR]/user/theme $ZPLGM[HOME_DIR]/user/personal ${HOME}/.zshrc &!' +alias zshconf="${=EDITOR} ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT} &!" -alias "zshconfatom"='atom $ZPLGM[HOME_DIR]/user/theme $ZPLGM[HOME_DIR]/user/personal ${HOME}/.zshrc &!' +alias zshconfatom="atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT} &!" # dot file management alias dots=' /usr/bin/git --git-dir=$HOME/.dots/ --work-tree=$HOME' # ^Space added to remove this command from history -# Aesthetic function for Dolphin, clear -x if cd while in Dolphin -$isdolphin && alias cd='clear -x; cd' - alias g='git' -alias ls='lsd --group-dirs=first' -#alias open='xdg-open' +alias open='xdg-open' # allow sudo to expand aliases as well as run anything in $PATH alias sudo='sudo env PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ' alias gencomp='echo "Use gcomp"' @@ -70,10 +89,6 @@ alias apm='apm-beta' unalias zplg -if [[ -n $SSH_CONNECTION ]]; then - alias ls="lsd --group-dirs=first --icon=never" -fi - ######################### # Other # ######################### @@ -89,6 +104,7 @@ setopt interactive_comments # Allow comments even in interactive shells (especia setopt pushd_ignore_dups # don't push multiple copies of the same directory onto the directory stack setopt auto_pushd # make cd push the old directory onto the directory stack setopt pushdminus # swapped the meaning of cd +1 and cd -1; we want them to mean the opposite of what they mean +setopt correct_all # autocorrect commands # Fuzzy matching of completions for when you mistype them: zstyle ':completion:*' completer _complete _match _approximate diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/_zpcompinit_fast b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/_zpcompinit_fast new file mode 100644 index 0000000..92a9929 --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/_zpcompinit_fast @@ -0,0 +1,22 @@ +setopt extendedglob local_options +autoload -Uz compinit +local zcompf="${ZPLGM[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.md-1) ]]; then + compinit -C -d "$zcompf" +else + compinit -i -d "$zcompf" + touch "$zcompf_a" +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" &! +fi diff --git a/NICHOLAS85/.zplugin/user/functions/auto-ls-colorls b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-colorls similarity index 100% rename from NICHOLAS85/.zplugin/user/functions/auto-ls-colorls rename to NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-colorls diff --git a/NICHOLAS85/.zplugin/user/functions/auto-ls-modecheck b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-modecheck similarity index 72% rename from NICHOLAS85/.zplugin/user/functions/auto-ls-modecheck rename to NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-modecheck index 4ca8e6c..e4f48a3 100644 --- a/NICHOLAS85/.zplugin/user/functions/auto-ls-modecheck +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-modecheck @@ -1,4 +1,4 @@ -if [[ $(tlp-stat -s 2>/dev/null) =~ 'Mode = Battery' ]]; then +if [[ $(cat /run/tlp/manual_mode || cat /run/tlp/last_pwr) = 1 ]]; then varcache=("${AUTO_LS_COMMANDS[@]}") AUTO_LS_COMMANDS=("${AUTO_LS_COMMANDSBAT[@]}") auto-ls diff --git a/NICHOLAS85/.zplugin/user/functions/dotscheck b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/dotscheck similarity index 100% rename from NICHOLAS85/.zplugin/user/functions/dotscheck rename to NICHOLAS85/.zplugin/plugins/_local---config-files/functions/dotscheck diff --git a/NICHOLAS85/.zplugin/user/functions/history-stat b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/history-stat similarity index 100% rename from NICHOLAS85/.zplugin/user/functions/history-stat rename to NICHOLAS85/.zplugin/plugins/_local---config-files/functions/history-stat diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin new file mode 100644 index 0000000..2d53da9 --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin @@ -0,0 +1,76 @@ +prompt_newline='%666v' +PROMPT=" $PROMPT" +PURE_PROMPT_SYMBOL='➜' + +# Add exit code to RPROMPT +precmd_pipestatus() { + RPROMPT="${(j.|.)pipestatus}" + if [[ ${(j.|.)pipestatus} = 0 ]]; then + RPROMPT="" + fi +} +add-zsh-hook precmd precmd_pipestatus + +# Removed directory from preprompt_parts variable +prompt_pure_preprompt_render() { + setopt localoptions noshwordsplit + + # Set color for git branch/dirty status, change color if dirty checking has + # been delayed. + local git_color=242 + [[ -n ${prompt_pure_git_last_dirty_check_timestamp+x} ]] && git_color=red + + # Initialize the preprompt array. + local -a preprompt_parts + + # Set the path. + preprompt_parts+=('%F%f') + + # Add git branch and dirty status info. + typeset -gA prompt_pure_vcs_info + if [[ -n $prompt_pure_vcs_info[branch] ]]; then + preprompt_parts+=("%F{$git_color}"'${prompt_pure_vcs_info[branch]}${prompt_pure_git_dirty}%f') + fi + # Git pull/push arrows. + if [[ -n $prompt_pure_git_arrows ]]; then + preprompt_parts+=('%F{cyan}${prompt_pure_git_arrows}%f') + fi + + # Username and machine, if applicable. + [[ -n $prompt_pure_state[username] ]] && preprompt_parts+=('${prompt_pure_state[username]}') + # Execution time. + [[ -n $prompt_pure_cmd_exec_time ]] && preprompt_parts+=('%F{yellow}${prompt_pure_cmd_exec_time}%f') + + local cleaned_ps1=$PROMPT + local -H MATCH MBEGIN MEND + if [[ $PROMPT = *$prompt_newline* ]]; then + # Remove everything from the prompt until the newline. This + # removes the preprompt and only the original PROMPT remains. + cleaned_ps1=${PROMPT##*${prompt_newline}} + fi + unset MATCH MBEGIN MEND + + # Construct the new prompt with a clean preprompt. + local -ah ps1 + ps1=( + ${(j. .)preprompt_parts} # Join parts, space separated. + $prompt_newline # Separate preprompt and prompt. + $cleaned_ps1 + ) + + PROMPT="${(j..)ps1}" + + # Expand the prompt for future comparision. + local expanded_prompt + expanded_prompt="${(S%%)PROMPT}" + + if [[ $1 == precmd ]]; then + # Initial newline, for spaciousness. + print + elif [[ $prompt_pure_last_prompt != $expanded_prompt ]]; then + # Redraw the prompt. + zle && zle .reset-prompt + fi + + typeset -g prompt_pure_last_prompt=$expanded_prompt +} diff --git a/NICHOLAS85/.zplugin/user/theme b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship similarity index 100% rename from NICHOLAS85/.zplugin/user/theme rename to NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async new file mode 100644 index 0000000..e402b7c --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async @@ -0,0 +1,64 @@ +SPACESHIP_PROMPT_ORDER=( + time # Time stamps section + user # Username section + dir # Current directory section + host # Hostname section +# git # Git section (git_branch + git_status) + git_branch + git_status +# hg # Mercurial section (hg_branch + hg_status) + package # Package version +# ruby # Ruby section +# elixir # Elixir section +# xcode # Xcode section +# swift # Swift section +# golang # Go section +# php # PHP section +# rust # Rust section +# haskell # Haskell Stack section +# julia # Julia section + docker # Docker section +# aws # Amazon Web Services section + venv # virtualenv section + conda # conda virtualenv section + pyenv # Pyenv section +# dotnet # .NET section +# ember # Ember.js section +# kubecontext # Kubectl context section +# terraform # Terraform workspace section + exec_time # Execution time + line_sep # Line break + battery # Battery level and status + vi_mode # Vi-mode indicator + jobs # Background jobs indicator + char # Prompt character +) +SPACESHIP_RPROMPT_ORDER=(exit_code) + +#SPACESHIP_DIR_COLOR=117 +SPACESHIP_DIR_COLOR=blue +SPACESHIP_NODE_SHOW=false +SPACESHIP_EXIT_CODE_SHOW=true + +SPACESHIP_GIT_STATUS_SHOW=true +SPACESHIP_GIT_STATUS_PREFIX="[" +SPACESHIP_GIT_STATUS_SUFFIX="]" +SPACESHIP_GIT_STATUS_UNTRACKED="?" +SPACESHIP_GIT_STATUS_ADDED="+" +SPACESHIP_GIT_STATUS_MODIFIED="!" +SPACESHIP_GIT_STATUS_RENAMED="»" +SPACESHIP_GIT_STATUS_DELETED="✘" +SPACESHIP_GIT_STATUS_STASHED="$" +SPACESHIP_GIT_STATUS_UNMERGE="=" +SPACESHIP_GIT_STATUS_AHEAD="⇡" +SPACESHIP_GIT_STATUS_BEHIND="⇣" +SPACESHIP_GIT_STATUS_DIVERGED="⇕" +SPACESHIP_GIT_STATUS_STASHED_COLOR="cyan" +SPACESHIP_GIT_STATUS_UNMERGED_COLOR="magenta" +SPACESHIP_GIT_STATUS_DELETED_COLOR="red" +SPACESHIP_GIT_STATUS_MODIFIED_COLOR="yellow" +SPACESHIP_GIT_STATUS_UNTRACKED_COLOR="blue" +SPACESHIP_GIT_STATUS_ADDED_COLOR="green" +SPACESHIP_GIT_STATUS_AHEAD_COLOR="yellow" +SPACESHIP_GIT_STATUS_BEHIND_COLOR="yellow" +SPACESHIP_GIT_STATUS_DIVERGED_COLOR="yellow" diff --git a/NICHOLAS85/.zplugin/user/functions/_zpcompinit_fast b/NICHOLAS85/.zplugin/user/functions/_zpcompinit_fast deleted file mode 100644 index df3a177..0000000 --- a/NICHOLAS85/.zplugin/user/functions/_zpcompinit_fast +++ /dev/null @@ -1,13 +0,0 @@ -setopt extendedglob local_options -autoload -Uz compinit -local zcd=${ZPLGM[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} -local zcdc="$zcd.zwc" -# Compile the completion dump to increase startup speed, if dump is newer or doesn't exist, -# in the background as this is doesn't affect the current session -if [[ -f "$zcd"(#qN.m+1) ]]; then - compinit -i -d "$zcd" - { zcompile "$zcd" } &! -else - compinit -C -d "$zcd" - { [[ ! -f "$zcdc" || "$zcd" -nt "$zcdc" ]] && zcompile "$zcd" } &! -fi diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index 6e95ed0..cff4d6a 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -17,25 +17,45 @@ autoload -Uz _zplugin if [[ ! -d "$ZPFX" ]]; then mkdir -v $ZPFX fi -if [[ ! -d "$ZPLGM[HOME_DIR]/user" ]]; then +if [[ ! -d "${ZPLGM[PLUGINS_DIR]}/_local---config-files" ]]; then curl https://codeload.github.com/NICHOLAS85/dotfiles/tar.gz/xps_13_9365 | \ - tar -xz --strip=2 dotfiles-xps_13_9365/.zplugin/user; mv user "$ZPLGM[HOME_DIR]/" + tar -xz --strip=3 dotfiles-xps_13_9365/.zplugin/plugins/_local---config-files + mv _local---config-files "${ZPLGM[PLUGINS_DIR]}/" fi -# Autoload personal functions -fpath=("$ZPLGM[HOME_DIR]/user/functions" "${fpath[@]}") -autoload -Uz _zpcompinit_fast auto-ls-colorls auto-ls-modecheck dotscheck history-stat - # Functions to make configuration less verbose -zt() { zplugin ice lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } # Smart Turbo -z() { [ -z $2 ] && { zplugin light "${@}"; ((1)); } || zplugin "${@}"; } # zplugin +# z() : Loads plugin using light mode unless otherwise specified in first argument +# zt() : First argument is a wait time and suffix eg "0a". Anything that doesn't match will be passed as if it were an ice mod. Default ices depth'1' and lucid. +# zct(): First argument determines value $MYPROMPT is checked against in load'' and unload'' ices. On load sources a config file with tracking using the first argument as it's name for easy unloading. + +z() { [ -z $2 ] && { zplugin light "${@}"; ((1)); } || zplugin "${@}"; } +zt() { zplugin ice depth'1' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } +zct() { zt load'[[ ${MYPROMPT} = "'${1}'" ]]' unload'[[ ${MYPROMPT} != "'${1}'" ]]' \ +atload'!source "${ZPLGM[PLUGINS_DIR]}/_local---config-files/themes/${MYPROMPT}"' "${@:2}"; } + +# Initial Prompt and config source +zt pick'async.zsh' +z mafredri/zsh-async + +MYPROMPT="${MYPROMPT:-spaceship-async}" +zt if'[[ $MYPROMPT = "spaceship-async" ]]' pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' \ +atload'!source "${ZPLGM[PLUGINS_DIR]}/_local---config-files/themes/${MYPROMPT}"' silent +z load maximbaz/spaceship-prompt + +zt blockf +z _local/config-files -# Theme -zt pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' atload'source $ZPLGM[HOME_DIR]/user/theme' -z denysdovhan/spaceship-prompt +# Conditional themes +zct spaceship-async pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' +z load maximbaz/spaceship-prompt + +zct spaceship pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' +z load denysdovhan/spaceship-prompt + +zct dolphin pick"/dev/null" multisrc"{async,pure}.zsh" reset-prompt +z load sindresorhus/pure # Oh-my-zsh libs -zt atinit'ZSH_CACHE_DIR="$HOME/.zcompcache"' z snippet OMZ::lib/history.zsh zt 0a @@ -46,7 +66,8 @@ z snippet OMZ::lib/completion.zsh #zt atload'ZSH_EVALCACHE_DIR="$ZPFX/.zsh-evalcache"' #z mroth/evalcache -zt 0b atclone"sed -i '/DIR/c\DIR 34;5;30' LS_COLORS; dircolors -b LS_COLORS > c.zsh" atpull'%atclone' pick"c.zsh" nocompile'!' reset +zt 0b atclone"sed -i '/DIR/c\DIR 1;34' LS_COLORS; dircolors -b LS_COLORS > c.zsh" \ +atpull'%atclone' pick"c.zsh" nocompile'!' reset atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”' z trapd00r/LS_COLORS zt 0a has'systemctl' @@ -74,18 +95,19 @@ z wfxr/forgit zt wait'[[ -n ${ZLAST_COMMANDS[(r)g*]} ]]' has'git' pick'init.zsh' atload'alias gi="git-ignore"' blockf z laggardkernel/git-ignore -zt 0a as'program' pick'wd.sh' mv'_wd.sh -> _wd' atload'wd() { source wd.sh }; WD_CONFIG="$ZPFX/.warprc"' blockf reset +zt 0a as'program' pick'wd.sh' mv'_wd.sh -> _wd' atload'wd() { source wd.sh }' blockf reset z mfaerevaag/wd zt 0a z NICHOLAS85/updatelocal -zt wait'[[ -n ${ZLAST_COMMANDS[(r)gcom*]} ]]' atload'gcomp(){ \gencomp $1 && zplugin creinstall -q RobSis/zsh-completion-generator; }' pick'zsh-completion-generator.plugin.zsh' +zt wait'[[ -n ${ZLAST_COMMANDS[(r)gcom*]} ]]' atload'gcomp(){ \gencomp ${1} && zplugin creinstall -q RobSis/zsh-completion-generator; }' pick'zsh-completion-generator.plugin.zsh' z RobSis/zsh-completion-generator #loaded when needed via gcomp -zt 0b as'program' pick'rm-trash/rm-trash' atclone"sed -i '2 i [[ \$EUID = 0 ]] && { echo \"Root detected, running builtin rm\"; command rm -I -v \"\${@}\"; exit; }' rm-trash/rm-trash" atpull'%atclone' atload'alias rm="rm-trash ${rm_opts}"' \ -compile'rm-trash/rm-trash' nocompile'!' reset +zt 0b as'program' pick'rm-trash/rm-trash' atpull'%atclone' atload'alias rm="rm-trash ${rm_opts}"' \ +compile'rm-trash/rm-trash' nocompile'!' reset \ +atclone"sed -i '2 i [[ \$EUID = 0 ]] && { echo \"Root detected, running builtin rm\"; command rm -I -v \"\${@}\"; exit; }' rm-trash/rm-trash" z nateshmbhat/rm-trash zt 0b has'thefuck' trackbinds bindmap'\e\e -> ^[OP^[OP' pick'init.zsh' @@ -109,25 +131,24 @@ z hlissner/zsh-autopair zt 0a blockf atpull'zplugin creinstall -q .' z zsh-users/zsh-completions -zt wait'[[ $isdolphin != true ]]' +zt wait'[[ ${isdolphin} != true ]]' z load desyncr/auto-ls zt 0c atload'bindkey "$terminfo[kcuu1]" history-substring-search-up; bindkey "$terminfo[kcud1]" history-substring-search-down' z zsh-users/zsh-history-substring-search -zt 0b compile'{src/*.zsh,src/strategies/*}' atload'!_zsh_autosuggest_start' -z load zsh-users/zsh-autosuggestions +zt 0b compile'{src/*.zsh,src/strategies/*}' atload'_zsh_autosuggest_start' +z zsh-users/zsh-autosuggestions zt 0b pick'manydots-magic' compile'manydots-magic' z knu/zsh-manydots-magic +# Unique zpcompinit command found in functions folder of config files, not the default zt 0b atinit'_zpcompinit_fast; zpcdreplay' z zdharma/fast-syntax-highlighting zt 0c id-as'Cleanup' atinit'unset -f zt z' z zdharma/null -source "$ZPLGM[HOME_DIR]/user/personal" - -dotscheck - +$isdolphin || dotscheck +echo From f511f054a7fad22c9012be308af66412378e0e1f Mon Sep 17 00:00:00 2001 From: Justin Bishop Date: Wed, 16 Oct 2019 22:18:48 -0700 Subject: [PATCH 28/51] updating .zshrc and bootstrap for jubi --- jubi/.zshrc | 124 +++++++++++----------------------------------- jubi/bootstrap.sh | 10 +++- 2 files changed, 38 insertions(+), 96 deletions(-) diff --git a/jubi/.zshrc b/jubi/.zshrc index b8b2305..7fe6f09 100644 --- a/jubi/.zshrc +++ b/jubi/.zshrc @@ -5,110 +5,46 @@ autoload -Uz _zplugin ### End of Zplugin installer's chunk ##### BEGIN Zplugin stuff ##### -### needs: exa, fzy, lua, python3 - -# autosuggestions, trigger precmd hook upon load -ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 -zplugin ice wait"0a" lucid atload"_zsh_autosuggest_start" -zplugin light zsh-users/zsh-autosuggestions +### needs: zplugin, fzf # z -zplugin ice wait"0b" lucid -zplugin light skywind3000/z.lua +zplugin ice wait blockf lucid +zplugin light rupa/z -# cd -zplugin ice wait"0b" lucid -zplugin light b4b4r07/enhancd -export ENHANCD_FILTER=fzy +# z tab completion +zplugin ice wait lucid +zplugin light changyuheng/fz +# z / fzf (ctrl-g) +zplugin ice wait lucid +zplugin light andrewferrier/fzf-z + +# cd +zplugin ice wait lucid +zplugin light changyuheng/zsh-interactive-cd + +# Don't bind these keys until ready +bindkey -r '^[[A' +bindkey -r '^[[B' +function __bind_history_keys() { + bindkey '^[[A' history-substring-search-up + bindkey '^[[B' history-substring-search-down +} # History substring searching -zplugin ice wait"0b" lucid +zplugin ice wait lucid atload'__bind_history_keys' zplugin light zsh-users/zsh-history-substring-search -bindkey '^[[A' history-substring-search-up -bindkey '^[[B' history-substring-search-down + +# autosuggestions, trigger precmd hook upon load +zplugin ice wait lucid atload'_zsh_autosuggest_start' +zplugin light zsh-users/zsh-autosuggestions +export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=10 # Tab completions -zplugin ice wait"0b" lucid blockf +zplugin ice wait lucid blockf atpull'zplugin creinstall -q .' zplugin light zsh-users/zsh-completions -# Syntax highlighting must be loaded last -zplugin ice wait"0c" lucid atinit"zpcompinit;zpcdreplay" +# Syntax highlighting +zplugin ice wait lucid atinit'zpcompinit; zpcdreplay' zplugin light zdharma/fast-syntax-highlighting ##### END Zplugin stuff ##### - -##### BEGIN zshrc generic ##### - -# Easy directory navigation -setopt autocd autopushd pushdignoredups -alias d='dirs -v | head -10' -alias b='pushd +1 > /dev/null' -alias 1='pushd +1 > /dev/null' -alias 2='pushd +2 > /dev/null' -alias 3='pushd +3 > /dev/null' -alias 4='pushd +4 > /dev/null' -alias 5='pushd +5 > /dev/null' -alias 6='pushd +6 > /dev/null' -alias 7='pushd +7 > /dev/null' -alias 8='pushd +8 > /dev/null' -alias 9='pushd +9 > /dev/null' - -# Navigating backward/forward in command -bindkey '\e\e[D' backward-word -bindkey '\e\e[C' forward-word -bindkey '^[a' beginning-of-line -bindkey '^[e' end-of-line - -# ctrl-W deletes up to a space OR '/' -export WORDCHARS='' - -# Better ls -alias ls='exa' - -# Path -export PATH=~/bin:$PATH - -# Coloring -autoload colors && colors - -##### END zshrc generic ##### - -##### BEGIN Mac specific ##### - -# iTerm2 -source "${HOME}/.iterm2_shell_integration.zsh" -function it2setbadge() { - printf "\e]1337;SetBadgeFormat=%s\a" $(echo -n "$1" | base64) -} - -# Basic ENV Variables -export EDITOR=code - -# Scripting ENV variables -export gLinux='jubi.sea.corp.google.com' -export cloudtop='jubishop.c.googlers.com' -export gLinuxMount='~/Desktop/gLinux' -export cloudtopMount='~/Desktop/Cloudtop' -export remoteHomeDir='/usr/local/google/home/jubi' -export remoteSrcDir='/google/src/cloud/jubi' - -# SSH Helpers -function gssh() { - ~/.iterm2/it2setcolor tab 000099 - ~/.iterm2/it2setcolor preset 'gLinuxPreset' - it2setbadge $2 - ssh $1 - ~/.iterm2/it2setcolor tab default - ~/.iterm2/it2setcolor preset 'MacPreset' - it2setbadge Macbook -} -alias sshome="gssh $gLinux gLinux" -alias sshcloudtop="gssh $cloudtop Cloudtop" - -# Prompt -# black, red, green, yellow, blue, magenta, cyan, white -PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )%{$reset_color%}" -PROMPT+="%{$fg[blue]%}Macbook%{$fg[white]%}:%{$fg[yellow]%}%3~" -PROMPT+="%{$fg_bold[green]%}#>%{$reset_color%}" - -##### END Mac specific ##### diff --git a/jubi/bootstrap.sh b/jubi/bootstrap.sh index 12cf881..d82cd65 100644 --- a/jubi/bootstrap.sh +++ b/jubi/bootstrap.sh @@ -1,4 +1,10 @@ #!/usr/bin/env zsh -sudo apt install --yes lua5.3 -cargo install exa +case `uname` in + Darwin) + brew install fzf + ;; + Linux) + sudo apt install fzf + ;; +esac From e2deab5173cca0e5dce75f6bbc5f290af53a4aca Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Mon, 11 Nov 2019 00:28:33 -0500 Subject: [PATCH 29/51] NICHOLAS85: Update personal files, many changes --- .../config-files.plugin.zsh | 48 ++-- .../functions/auto-ls-modecheck | 7 - .../_local---config-files/functions/dotscheck | 3 + .../_local---config-files/functions/sudo | 58 +++++ .../patches/LS_COLORS.patch | 33 +++ .../_local---config-files/patches/pure.patch | 13 + .../patches/rm-trash.patch | 9 + .../_local---config-files/themes/dolphin | 76 ------ .../_local---config-files/themes/dolphin-post | 8 + .../_local---config-files/themes/dolphin-pre | 3 + .../{spaceship-async => spaceship-async-post} | 2 +- .../themes/{spaceship => spaceship-post} | 0 NICHOLAS85/.zshrc | 246 +++++++++--------- NICHOLAS85/bootstrap.sh | 2 +- 14 files changed, 281 insertions(+), 227 deletions(-) delete mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-modecheck create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/functions/sudo create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/patches/LS_COLORS.patch create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/patches/pure.patch create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/patches/rm-trash.patch delete mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-post create mode 100644 NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-pre rename NICHOLAS85/.zplugin/plugins/_local---config-files/themes/{spaceship-async => spaceship-async-post} (98%) rename NICHOLAS85/.zplugin/plugins/_local---config-files/themes/{spaceship => spaceship-post} (100%) diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh b/NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh index 239b4f7..9c7239b 100644 --- a/NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh @@ -10,16 +10,22 @@ # Autoload personal functions fpath=("${0:h}/functions" "${fpath[@]}") -autoload -Uz _zpcompinit_fast auto-ls-colorls auto-ls-modecheck dotscheck history-stat +autoload -Uz $fpath[1]/*(.:t) ######################### # Variables # ######################### +pchf="/${0:h}/patches" +thmf="/${0:h}/themes" + HISTFILE="${HOME}/.histfile" +# Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) +UPDATELOCAL_GITDIR="${HOME}/github/Built" + ZSH_AUTOSUGGEST_USE_ASYNC=true -ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=50 +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=30 HISTORY_SUBSTRING_SEARCH_FUZZY=set @@ -27,22 +33,27 @@ colorlscommand=(lsd --group-dirs first) colorlsgitcommand=(colorls --sd --gs -A) AUTO_LS_COMMANDS=(colorls) -#AUTO_LS_COMMANDSBAT=(ls) AUTO_LS_NEWLINE=false -EDITOR=kate +export EDITOR=micro -forgit_ignore="/dev/null" +FZ_HISTORY_CD_CMD=zshz +ZSHZ_CMD="/dev/null" # Don't set the alias, fz will cover that -WD_CONFIG="${ZPFX}/warprc" +FZF_DEFAULT_COMMAND="fd --type file --color=always" +FZF_DEFAULT_OPTS="--ansi" -rm_opts=(-I -v) +ZSHZ_EXCLUDE_DIRS=( / ) -# Directory checked for locally built projects (plugin updatelocal) -UPDATELOCAL_GITDIR="${HOME}/github/Built" +forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin + +WD_CONFIG="${ZPFX}/warprc" +ZSHZ_DATA="${ZPFX}/z" + +export rm_opts=(-I -v) -# Strings to ignore when using dotscheck, escape and single quote stuff that could be wild cards (../) -dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' '\.config/gtk-3\.0/settings\.ini' ) +# Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) +dotsvar=( gtkrc-2.0 kwinrulesrc \.\./ \.config/gtk-3\.0/settings\.ini ) # Export variables when connected via SSH if [[ -n $SSH_CONNECTION ]]; then @@ -53,6 +64,11 @@ else alias ls='lsd --group-dirs=first' fi +# Set variables if on ac mode +if [[ $(cat /run/tlp/last_pwr) = 0 ]]; then + alias micro="\micro -fastdirty false" +fi + # Used to programatically disable plugins when opening the terminal view in dolphin if [[ $MYPROMPT = dolphin ]]; then isdolphin=true @@ -70,19 +86,19 @@ fi alias ..='command .. 2>/dev/null || cd $(dirname $PWD)' # Access zsh config files -alias zshconf="${=EDITOR} ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT} &!" +alias zshconf="$EDITOR ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}* &!" -alias zshconfatom="atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT} &!" +#alias zshconfatom="atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}* &!" # dot file management alias dots=' /usr/bin/git --git-dir=$HOME/.dots/ --work-tree=$HOME' # ^Space added to remove this command from history alias g='git' +alias gi="git-ignore" alias open='xdg-open' -# allow sudo to expand aliases as well as run anything in $PATH -alias sudo='sudo env PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ' -alias gencomp='echo "Use gcomp"' + + alias -- -='cd -' alias atom='atom-beta --disable-gpu' alias apm='apm-beta' diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-modecheck b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-modecheck deleted file mode 100644 index e4f48a3..0000000 --- a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-modecheck +++ /dev/null @@ -1,7 +0,0 @@ -if [[ $(cat /run/tlp/manual_mode || cat /run/tlp/last_pwr) = 1 ]]; then - varcache=("${AUTO_LS_COMMANDS[@]}") - AUTO_LS_COMMANDS=("${AUTO_LS_COMMANDSBAT[@]}") - auto-ls - AUTO_LS_COMMANDS=("${varcache[@]}") - break -fi diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/dotscheck b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/dotscheck index 8721514..c8adbb4 100644 --- a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/dotscheck +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/dotscheck @@ -13,5 +13,8 @@ dots push elif [[ "$dotsvar4" =~ "is behind" ]]; then dots status + else + return 0 fi fi +echo \ No newline at end of file diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/sudo b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/sudo new file mode 100644 index 0000000..d92647b --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/sudo @@ -0,0 +1,58 @@ +# _do_sudo from https://github.com/robbyrussell/oh-my-zsh/pull/8163, modified +function _do_sudo() { + [[ -z ${__do_sudo_glob+x} ]] && local __do_sudo_glob=1 + [[ -z ${__do_sudo_expanded+x} ]] && local -A __do_sudo_expanded + local -a args + local -a cmd_alias_arr + local cmd_alias + while (($#)); do + case "$1" in + command|exec|-) shift; break ;; + nocorrect) shift ;; + noglob) __do_sudo_glob=0; shift ;; + [1-9]) args+=( $1 ); shift ;; + *) + cmd_alias="$(command -v 2>/dev/null -- "$1")" + if [[ "$?" -eq 0 ]] && [[ "$cmd_alias" == 'alias'* ]] && [[ -z "$__do_sudo_expanded["$1"]" ]]; then + __do_sudo_expanded["$1"]=1 + IFS=' ' read -A cmd_alias_arr <<< "$(sed -e "s/[^=]*=//" -e "s/^'//" -e "s/'$//" <<< "$cmd_alias")" + args+=( "${cmd_alias_arr[@]}" ) + shift + break + else + if ((__do_sudo_glob)); then + args+=( $~==1 ) + else + args+=( $==1 ) + fi + shift + fi + ;; + esac + done + if [[ ${#cmd_alias_arr[@]} -gt 0 ]]; then + _do_sudo "${args[@]}" $==* + else + if ((__do_sudo_glob)); then + command sudo "${args[@]}" $~==* + else + command sudo "${args[@]}" $==* + fi + fi +} + +local -a first +local pos=1 second +for arg in "$@" +do + if [[ ${arg:0:1} == "-" ]]; then + ((++pos)) + first=("${first[@]}" "$arg") + else + noglob _do_sudo ${first[@]} env PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ${@:$pos} + unset -f _do_sudo + return + fi +done +noglob _do_sudo "${@}" +unset -f _do_sudo diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/LS_COLORS.patch b/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/LS_COLORS.patch new file mode 100644 index 0000000..7c6c218 --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/LS_COLORS.patch @@ -0,0 +1,33 @@ +Change dir color and add color to configs +--- trapd00r---LS_COLORS/LS_COLORS 2019-11-10 20:06:56.272863178 -0500 ++++ trapd00r---LS_COLORS/LS_COLORS-patch 2019-11-10 20:07:58.156027896 -0500 +@@ -36,7 +36,7 @@ + BLK 38;5;68 + CAPABILITY 38;5;17 + CHR 38;5;113;1 +-DIR 38;5;30 ++DIR 01;34 + DOOR 38;5;127 + EXEC 38;5;208;1 + FIFO 38;5;126 +@@ -146,14 +146,14 @@ + # }}} + # }}} + # configs {{{2 +-*config 1 +-*cfg 1 +-*conf 1 +-*rc 1 ++*config 36 ++*cfg 36 ++*conf 36 ++*rc 36 + *authorized_keys 1 + *known_hosts 1 +-.ini 1 +-.plist 1 ++.ini 36 ++.plist 36 + # vim + .viminfo 1 + # cisco VPN client configuration diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/pure.patch b/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/pure.patch new file mode 100644 index 0000000..c59d41b --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/pure.patch @@ -0,0 +1,13 @@ +Removed directory from preprompt_parts variable +--- sindresorhus---pure/pure.zsh 2019-11-10 23:55:10.224774017 -0500 ++++ sindresorhus---pure/pure.zsh-patch 2019-11-10 23:57:09.871100319 -0500 +@@ -129,9 +129,6 @@ + # Initialize the preprompt array. + local -a preprompt_parts + +- # Set the path. +- preprompt_parts+=('%F{${prompt_pure_colors[path]}}%~%f') +- + # Add Git branch and dirty status info. + typeset -gA prompt_pure_vcs_info + if [[ -n $prompt_pure_vcs_info[branch] ]]; then diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/rm-trash.patch b/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/rm-trash.patch new file mode 100644 index 0000000..9effb20 --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/rm-trash.patch @@ -0,0 +1,9 @@ +Don't run on sudo +--- nateshmbhat---rm-trash/rm-trash/rm-trash 2019-11-10 19:53:09.176336482 -0500 ++++ nateshmbhat---rm-trash/rm-trash/rm-trash-patch 2019-11-10 19:47:32.273906720 -0500 +@@ -1,4 +1,5 @@ + #!/bin/bash ++[[ $EUID = 0 ]] && { echo "Root detected, running builtin rm"; command rm ${rm_opts} "${@}"; exit; } + + # MIT License + diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin deleted file mode 100644 index 2d53da9..0000000 --- a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin +++ /dev/null @@ -1,76 +0,0 @@ -prompt_newline='%666v' -PROMPT=" $PROMPT" -PURE_PROMPT_SYMBOL='➜' - -# Add exit code to RPROMPT -precmd_pipestatus() { - RPROMPT="${(j.|.)pipestatus}" - if [[ ${(j.|.)pipestatus} = 0 ]]; then - RPROMPT="" - fi -} -add-zsh-hook precmd precmd_pipestatus - -# Removed directory from preprompt_parts variable -prompt_pure_preprompt_render() { - setopt localoptions noshwordsplit - - # Set color for git branch/dirty status, change color if dirty checking has - # been delayed. - local git_color=242 - [[ -n ${prompt_pure_git_last_dirty_check_timestamp+x} ]] && git_color=red - - # Initialize the preprompt array. - local -a preprompt_parts - - # Set the path. - preprompt_parts+=('%F%f') - - # Add git branch and dirty status info. - typeset -gA prompt_pure_vcs_info - if [[ -n $prompt_pure_vcs_info[branch] ]]; then - preprompt_parts+=("%F{$git_color}"'${prompt_pure_vcs_info[branch]}${prompt_pure_git_dirty}%f') - fi - # Git pull/push arrows. - if [[ -n $prompt_pure_git_arrows ]]; then - preprompt_parts+=('%F{cyan}${prompt_pure_git_arrows}%f') - fi - - # Username and machine, if applicable. - [[ -n $prompt_pure_state[username] ]] && preprompt_parts+=('${prompt_pure_state[username]}') - # Execution time. - [[ -n $prompt_pure_cmd_exec_time ]] && preprompt_parts+=('%F{yellow}${prompt_pure_cmd_exec_time}%f') - - local cleaned_ps1=$PROMPT - local -H MATCH MBEGIN MEND - if [[ $PROMPT = *$prompt_newline* ]]; then - # Remove everything from the prompt until the newline. This - # removes the preprompt and only the original PROMPT remains. - cleaned_ps1=${PROMPT##*${prompt_newline}} - fi - unset MATCH MBEGIN MEND - - # Construct the new prompt with a clean preprompt. - local -ah ps1 - ps1=( - ${(j. .)preprompt_parts} # Join parts, space separated. - $prompt_newline # Separate preprompt and prompt. - $cleaned_ps1 - ) - - PROMPT="${(j..)ps1}" - - # Expand the prompt for future comparision. - local expanded_prompt - expanded_prompt="${(S%%)PROMPT}" - - if [[ $1 == precmd ]]; then - # Initial newline, for spaciousness. - print - elif [[ $prompt_pure_last_prompt != $expanded_prompt ]]; then - # Redraw the prompt. - zle && zle .reset-prompt - fi - - typeset -g prompt_pure_last_prompt=$expanded_prompt -} diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-post b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-post new file mode 100644 index 0000000..d5c45ca --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-post @@ -0,0 +1,8 @@ +# Add exit code to RPROMPT +precmd_pipestatus() { + RPROMPT="${(j.|.)pipestatus}" + if [[ ${(j.|.)pipestatus} = 0 ]]; then + RPROMPT="" + fi +} +add-zsh-hook precmd precmd_pipestatus diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-pre b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-pre new file mode 100644 index 0000000..ee1e8f6 --- /dev/null +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-pre @@ -0,0 +1,3 @@ +prompt_newline='%666v' +PROMPT=" $PROMPT" +PURE_PROMPT_SYMBOL='➜' diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async-post similarity index 98% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async rename to NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async-post index e402b7c..d0f2a51 100644 --- a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async +++ b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async-post @@ -42,7 +42,7 @@ SPACESHIP_EXIT_CODE_SHOW=true SPACESHIP_GIT_STATUS_SHOW=true SPACESHIP_GIT_STATUS_PREFIX="[" -SPACESHIP_GIT_STATUS_SUFFIX="]" +SPACESHIP_GIT_STATUS_SUFFIX="] " SPACESHIP_GIT_STATUS_UNTRACKED="?" SPACESHIP_GIT_STATUS_ADDED="+" SPACESHIP_GIT_STATUS_MODIFIED="!" diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship b/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-post similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship rename to NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-post diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index cff4d6a..e48dd60 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -14,9 +14,6 @@ autoload -Uz _zplugin (( ${+_comps} )) && _comps[zplugin]=_zplugin ### End of Zplugin's installer chunk -if [[ ! -d "$ZPFX" ]]; then - mkdir -v $ZPFX -fi if [[ ! -d "${ZPLGM[PLUGINS_DIR]}/_local---config-files" ]]; then curl https://codeload.github.com/NICHOLAS85/dotfiles/tar.gz/xps_13_9365 | \ tar -xz --strip=3 dotfiles-xps_13_9365/.zplugin/plugins/_local---config-files @@ -24,131 +21,128 @@ if [[ ! -d "${ZPLGM[PLUGINS_DIR]}/_local---config-files" ]]; then fi # Functions to make configuration less verbose -# z() : Loads plugin using light mode unless otherwise specified in first argument -# zt() : First argument is a wait time and suffix eg "0a". Anything that doesn't match will be passed as if it were an ice mod. Default ices depth'1' and lucid. -# zct(): First argument determines value $MYPROMPT is checked against in load'' and unload'' ices. On load sources a config file with tracking using the first argument as it's name for easy unloading. - -z() { [ -z $2 ] && { zplugin light "${@}"; ((1)); } || zplugin "${@}"; } -zt() { zplugin ice depth'1' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } -zct() { zt load'[[ ${MYPROMPT} = "'${1}'" ]]' unload'[[ ${MYPROMPT} != "'${1}'" ]]' \ -atload'!source "${ZPLGM[PLUGINS_DIR]}/_local---config-files/themes/${MYPROMPT}"' "${@:2}"; } - -# Initial Prompt and config source -zt pick'async.zsh' -z mafredri/zsh-async - -MYPROMPT="${MYPROMPT:-spaceship-async}" -zt if'[[ $MYPROMPT = "spaceship-async" ]]' pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' \ -atload'!source "${ZPLGM[PLUGINS_DIR]}/_local---config-files/themes/${MYPROMPT}"' silent -z load maximbaz/spaceship-prompt - -zt blockf -z _local/config-files - -# Conditional themes -zct spaceship-async pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' -z load maximbaz/spaceship-prompt - -zct spaceship pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' -z load denysdovhan/spaceship-prompt - -zct dolphin pick"/dev/null" multisrc"{async,pure}.zsh" reset-prompt -z load sindresorhus/pure - -# Oh-my-zsh libs -z snippet OMZ::lib/history.zsh - -zt 0a -z snippet OMZ::lib/completion.zsh +# 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'1' 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() { zplugin depth'1' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } +zct() { -zplg-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" \ + atinit'[ -f "${thmf}/${MYPROMPT}-pre" ] && source "${thmf}/${MYPROMPT}-pre"' \ + atload'![ -f "${thmf}/${MYPROMPT}-post" ] && source "${thmf}/${MYPROMPT}-post"'; \ + ZPLG_ICE+=( "${(kv)ZPLG_ICES[@]}"); } + +################## +# Initial Prompt # +# Config source # +################## + +zt for \ + pick'async.zsh' light-mode mafredri/zsh-async \ +\ + if'[[ ${MYPROMPT=spaceship-async} = "spaceship-async" ]]' \ + compile'{lib/*,sections/*,tests/*.zsh}' pick'spaceship.zsh' silent \ + atload'!source "../_local---config-files/themes/${MYPROMPT}-post"' \ + maximbaz/spaceship-prompt \ +\ + blockf nocompletions light-mode _local/config-files + +########### +# Annexes # +########### + +zt light-mode for zplugin/z-a-patch-dl + +############################ +# Conditional themes block # +############################ + +zt pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' for \ + if'zct spaceship-async' maximbaz/spaceship-prompt \ +\ + if'zct spaceship' denysdovhan/spaceship-prompt + +zt if'zct dolphin' pick"pure.zsh" patch"$pchf/pure.patch" nocompile'!' reset-prompt for sindresorhus/pure # Plugins -#zt atload'ZSH_EVALCACHE_DIR="$ZPFX/.zsh-evalcache"' -#z mroth/evalcache - -zt 0b atclone"sed -i '/DIR/c\DIR 1;34' LS_COLORS; dircolors -b LS_COLORS > c.zsh" \ -atpull'%atclone' pick"c.zsh" nocompile'!' reset atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”' -z trapd00r/LS_COLORS - -zt 0a has'systemctl' -z snippet OMZ::plugins/systemd/systemd.plugin.zsh - -zt 0a -z snippet OMZ::plugins/extract/extract.plugin.zsh - -zt 0b compile'{hsmw-*,test/*}' -z zdharma/history-search-multi-word - -zt 0b -z ael-code/zsh-colored-man-pages - -zt 0a make -z sei40kr/zsh-fast-alias-tips - -zt wait'[[ -n ${ZLAST_COMMANDS[(r)g*]} ]]' has'git' as'command' -z paulirish/git-open - -zt wait'[[ -n ${ZLAST_COMMANDS[(r)g*]} ]]' has'git' -z wfxr/forgit -#replaced gi with local git-ignore plugin - -zt wait'[[ -n ${ZLAST_COMMANDS[(r)g*]} ]]' has'git' pick'init.zsh' atload'alias gi="git-ignore"' blockf -z laggardkernel/git-ignore - -zt 0a as'program' pick'wd.sh' mv'_wd.sh -> _wd' atload'wd() { source wd.sh }' blockf reset -z mfaerevaag/wd - -zt 0a -z NICHOLAS85/updatelocal - -zt wait'[[ -n ${ZLAST_COMMANDS[(r)gcom*]} ]]' atload'gcomp(){ \gencomp ${1} && zplugin creinstall -q RobSis/zsh-completion-generator; }' pick'zsh-completion-generator.plugin.zsh' -z RobSis/zsh-completion-generator -#loaded when needed via gcomp - -zt 0b as'program' pick'rm-trash/rm-trash' atpull'%atclone' atload'alias rm="rm-trash ${rm_opts}"' \ -compile'rm-trash/rm-trash' nocompile'!' reset \ -atclone"sed -i '2 i [[ \$EUID = 0 ]] && { echo \"Root detected, running builtin rm\"; command rm -I -v \"\${@}\"; exit; }' rm-trash/rm-trash" -z nateshmbhat/rm-trash - -zt 0b has'thefuck' trackbinds bindmap'\e\e -> ^[OP^[OP' pick'init.zsh' -z laggardkernel/zsh-thefuck - -zt 0a -z snippet OMZ::plugins/sudo/sudo.plugin.zsh - -zt 0b -z snippet OMZ::plugins/command-not-found/command-not-found.plugin.zsh - -zt 0a atload'unalias help; unalias rm' -z snippet OMZ::plugins/common-aliases/common-aliases.plugin.zsh - -zt 0a as'program' pick'bin/git-dsf' -z zdharma/zsh-diff-so-fancy - -zt 0b pick'autopair.zsh' nocompletions -z hlissner/zsh-autopair - -zt 0a blockf atpull'zplugin creinstall -q .' -z zsh-users/zsh-completions - -zt wait'[[ ${isdolphin} != true ]]' -z load desyncr/auto-ls - -zt 0c atload'bindkey "$terminfo[kcuu1]" history-substring-search-up; bindkey "$terminfo[kcud1]" history-substring-search-down' -z zsh-users/zsh-history-substring-search - -zt 0b compile'{src/*.zsh,src/strategies/*}' atload'_zsh_autosuggest_start' -z zsh-users/zsh-autosuggestions - -zt 0b pick'manydots-magic' compile'manydots-magic' -z knu/zsh-manydots-magic - -# Unique zpcompinit command found in functions folder of config files, not the default -zt 0b atinit'_zpcompinit_fast; zpcdreplay' -z zdharma/fast-syntax-highlighting - -zt 0c id-as'Cleanup' atinit'unset -f zt z' -z zdharma/null +zt for OMZ::lib/history.zsh + +################## +# Wait'0a' block # +################## + +zt 0a light-mode for \ + pick'fz.sh' changyuheng/fz \ +\ + OMZ::lib/completion.zsh \ +\ + has'systemctl' OMZ::plugins/systemd/systemd.plugin.zsh \ +\ + make sei40kr/zsh-fast-alias-tips \ +\ + OMZ::plugins/sudo/sudo.plugin.zsh \ +\ + atload'unalias help; unalias rm' OMZ::plugins/common-aliases/common-aliases.plugin.zsh \ +\ + as'program' pick'bin/git-dsf' zdharma/zsh-diff-so-fancy \ +\ + blockf atpull'zplugin creinstall -q "$PWD"' zsh-users/zsh-completions \ +\ + compile'{src/*.zsh,src/strategies/*}' atload'_zsh_autosuggest_start' zsh-users/zsh-autosuggestions + +################## +# Wait'0b' block # +################## + +zt 0b light-mode for \ + patch"$pchf/LS_COLORS.patch" atclone"dircolors -b LS_COLORS > c.zsh" \ + atpull'%atclone' pick"c.zsh" nocompile'!' reset \ + atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”' \ + trapd00r/LS_COLORS \ +\ + compile'{hsmw-*,test/*}' zdharma/history-search-multi-word \ +\ + as'program' pick'rm-trash/rm-trash' atload'alias rm="rm-trash ${rm_opts}"' \ + patch"$pchf/rm-trash.patch" compile'rm-trash/rm-trash' nocompile'!' reset \ + nateshmbhat/rm-trash \ +\ + from"gh-r" as"program" pick'*/micro' bpick'*linux64*' reset zyedidia/micro \ +\ + has'thefuck' trackbinds bindmap'\e\e -> ^[OP^[OP' pick'init.zsh' laggardkernel/zsh-thefuck \ +\ + OMZ::plugins/command-not-found/command-not-found.plugin.zsh \ +\ + pick'autopair.zsh' nocompletions hlissner/zsh-autopair \ +\ + pick'manydots-magic' compile'manydots-magic' knu/zsh-manydots-magic \ +\ + atinit'_zpcompinit_fast; zpcdreplay' 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 + +zt 0b if'[[ ${isdolphin} != true ]]' for desyncr/auto-ls + +zt 0c id-as'Cleanup' atinit'unset -f zct zt' as'null' nocd light-mode for zdharma/null + +###################### +# 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'!git' paulirish/git-open \ +\ + trigger-load'!ga;!gcf;!gclean;!gd;!gd;!glo;!grh;!gss' wfxr/forgit \ +\ + trigger-load'!git-ignore' pick'init.zsh' blockf laggardkernel/git-ignore \ +\ + trigger-load'!zshz' blockf agkozak/zsh-z \ +\ + trigger-load'!updatelocal' blockf NICHOLAS85/updatelocal \ +\ + trigger-load'!gencomp' pick'zsh-completion-generator.plugin.zsh' atload'zplugin creinstall -q "$PWD"' \ + RobSis/zsh-completion-generator $isdolphin || dotscheck -echo diff --git a/NICHOLAS85/bootstrap.sh b/NICHOLAS85/bootstrap.sh index 515ff64..41b6e7c 100644 --- a/NICHOLAS85/bootstrap.sh +++ b/NICHOLAS85/bootstrap.sh @@ -1,4 +1,4 @@ #!/usr/bin/env zsh -sudo apt install --yes tlp +sudo apt install --yes tlp lscolors fd-find fzf cargo install lsd From 457cd4c193541f9c453a487c92b1dfc47e19904f Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 12 Nov 2019 18:46:32 +0100 Subject: [PATCH 30/51] psprint: update (use of the for syntax) --- psprint/zshrc.zsh | 454 +++++++++++++++++++++------------------------- 1 file changed, 209 insertions(+), 245 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index 5ec28bc..6fe7b12 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -1,3 +1,8 @@ +# Enable Powerlevel10k instant prompt. Should stay at the top of ~/.zshrc. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + # # Exports # @@ -23,12 +28,12 @@ umask 022 # Setopts # -setopt interactive_comments hist_ignore_dups octal_zeroes no_prompt_cr notify +setopt interactive_comments hist_ignore_dups octal_zeroes no_prompt_cr setopt no_hist_no_functions no_always_to_end append_history list_packed setopt inc_append_history complete_in_word no_auto_menu auto_pushd setopt pushd_ignore_dups no_glob_complete no_glob_dots c_bases setopt numeric_glob_sort no_share_history promptsubst auto_cd -setopt rc_quotes extendedglob +setopt rc_quotes extendedglob notify #setopt IGNORE_EOF #setopt NO_SHORT_LOOPS @@ -234,10 +239,10 @@ osxnotify() { localbin_on -PS1="READY > " +#PS1="READY > " zstyle ":plugin:zconvey" greeting "none" zstyle ':notify:*' command-complete-timeout 3 -zstyle ':notify:*' notifier /home/user/.zplugin/plugins/zdharma---zconvey/cmds/plg-zsh-notify +zstyle ':notify:*' notifier plg-zsh-notify palette() { local colors; for n in {000..255}; do colors+=("%F{$n}$n%f"); done; print -cP $colors; } @@ -260,292 +265,251 @@ source "$HOME/.zplugin/bin/zplugin.zsh" autoload -Uz _zplugin (( ${+_comps} )) && _comps[zplugin]=_zplugin -# annex (a Zplugin extension) that generates man pages -# for all plugins and snippets -#zplugin light zplugin/z-a-man -# annex (a Zplugin extension) that runs tests for all -# plugins and snippets -zplugin light zplugin/z-a-test -# annex (a Zplugin extension) that allows to download -# files and apply patches -zplugin light zplugin/z-a-patch-dl -# annex (a Zplugin extension) which allows to -# explicitly clone submodules -zplugin light zplugin/z-a-submods -# annex (a Zplugin extension) that exposes commands -# without altering $PATH -zplugin light zplugin/z-a-bin-gem-node - -# Assign each zsh session an unique ID, available in -# ZUID_ID and also a codename (ZUID_CODENAME) -zplugin load zdharma/zsh-unique-id - -# Loaded mostly to stay in touch with the plugin (for the users) +# Zplugin annexes +zplugin light-mode for \ + zplugin/z-a-man \ + zplugin/z-a-test \ + zplugin/z-a-patch-dl \ + zplugin/z-a-submods \ + zplugin/z-a-bin-gem-node \ + zplugin/z-a-rust + +# Fast-syntax-highlighting & autosuggestions +zplugin wait lucid for \ + atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" \ + zdharma/fast-syntax-highlighting \ + 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) -zplugin ice wait lucid -zplugin snippet OMZ::lib/git.zsh +zplugin wait lucid for \ + zdharma/zsh-unique-id \ + OMZ::lib/git.zsh \ + atload"unalias grv g" \ + OMZ::plugins/git/git.plugin.zsh + +# Theme no. 1 - zprompts +zplugin lucid \ + load'![[ $MYPROMPT = 1 ]]' \ + unload'![[ $MYPROMPT != 1 ]]' \ + atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3 yellow red green blue' \ + nocd for \ + psprint/zprompts + +# Theme no. 2 – lambda-mod-zsh-theme +zplugin lucid load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' nocd for \ + halfo/lambda-mod-zsh-theme + +# Theme no. 3 – lambda-gitster +zplugin lucid load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' nocd for \ + ergenekonyigit/lambda-gitster + +# Theme no. 4 – geometry +zplugin 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 +zplugin 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 +zplugin lucid load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' \ + atload'!_agkozak_precmd' nocd atinit'AGKOZAK_FORCE_ASYNC_METHOD=subst-async' for \ + agkozak/agkozak-zsh-theme -# Loaded mostly to stay in touch with the plugin (for the users) -zplugin ice wait lucid atload"unalias grv g" -zplugin snippet OMZ::plugins/git/git.plugin.zsh +# Theme no. 7 - zinc +zplugin 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 - powerlevel10k +zplugin load'![[ $MYPROMPT = 8 ]]' unload'![[ $MYPROMPT != 8 ]]' \ + atload'!source ~/.p10k.zsh; _p9k_precmd' lucid nocd for \ + romkatv/powerlevel10k + +# Theme no. 9 - git-prompt +zplugin lucid load'![[ $MYPROMPT = 9 ]]' unload'![[ $MYPROMPT != 9 ]]' \ + atload'!_zsh_git_prompt_precmd_hook' nocd for \ + woefe/git-prompt.zsh + +# zunit, color +zplugin wait"2" lucid as"null" for \ + sbin atclone"./build.zsh" atpull"%atclone" \ + molovo/zunit \ + sbin"color.zsh -> color" \ + molovo/color -# zunit -zplugin ice wait"1" lucid sbin"zunit" fbin"zunit" atclone"./build.zsh" \ - atpull"%atclone" pick'/dev/null' -zplugin load molovo/zunit +# revolver +zplugin wait"2" lucid as"program" pick"revolver" for psprint/revolver # On OSX, you might need to install coreutils from homebrew and use the # g-prefix – gsed, gdircolors -zplugin ice wait"0c" lucid 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}”' -zplugin light 'trapd00r/LS_COLORS' +: zplugin wait"0c" lucid 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:*:default" list-colors "${(s.:.)LS_COLORS}";' for \ + trapd00r/LS_COLORS + +zplugin wait"0c" lucid \ + atload'zstyle ":completion:*" list-colors "${(s.:.)LS_COLORS}";' for \ + zpm-zsh/dircolors-material # Zconvey shell integration plugin -zplugin ice wait silent sbin"cmds/zc-bg-notify" fbin"cmds/zc-bg-notify" -zplugin load zdharma/zconvey +zplugin wait lucid \ + sbin"cmds/zc-bg-notify"sbin"cmds/plg-zsh-notify" for \ + zdharma/zconvey # zsh-startify, a vim-startify like plugin -zplugin ice wait"0b" lucid atload"zsh-startify" -zplugin load zdharma/zsh-startify - -#zplugin ice wait lucid pick"manydots-magic" compile"manydots-magic" -#zplugin load knu/zsh-manydots-magic +: zplugin wait"0b" lucid atload"zsh-startify" for zdharma/zsh-startify +: zplugin wait lucid pick"manydots-magic" compile"manydots-magic" for knu/zsh-manydots-magic # fzy -zplugin ice wait"1" lucid as"program" pick"$ZPFX/bin/fzy*" \ - atclone"cp contrib/fzy-* $ZPFX/bin/" \ - make"!PREFIX=$ZPFX install" -zplugin light jhawthorn/fzy +zplugin wait"1" lucid as"program" pick"$ZPFX/bin/fzy*" \ + atclone"cp contrib/fzy-* $ZPFX/bin/" \ + make"!PREFIX=$ZPFX install" for \ + jhawthorn/fzy -# fzf, for fzf-marks -zplugin ice wait lucid from"gh-r" sbin"fzf" fbin"fzf" -zplugin light junegunn/fzf-bin - -# fzf-marks, at slot 0, for quick Ctrl-G accessibility -zplugin ice wait lucid -zplugin load urbainvaes/fzf-marks +# remark +zplugin wait'1c' lucid id-as'remark' \ + sbin'n:node_modules/.bin/remark' \ + node'remark <- !remark-cli; remark-man' for \ + zdharma/null # zsh-autopair -zplugin ice wait lucid -zplugin load hlissner/zsh-autopair +# fzf-marks, at slot 0, for quick Ctrl-G accessibility +zplugin wait lucid for \ + hlissner/zsh-autopair \ + urbainvaes/fzf-marks # hiredis library needed for zredis plugin -zplugin ice wait"1" lucid make"PREFIX=$ZPFX all install" pick"/dev/null" -zplugin light redis/hiredis +zplugin wait"1" lucid make"PREFIX=$ZPFX all install" pick"/dev/null" for \ + redis/hiredis # zredis together with some binding/tying zstyle ":plugin:zredis" configure_opts "--without-tcsetpgrp" zstyle ":plugin:zredis" cflags "-Wall -O2 -g -Wno-unused-but-set-variable" -#zstyle ":plugin:zredis" cppflags "-I$ZPFX/include -I/usr/include" -#zstyle ":plugin:zredis" ldflags "-L$ZPFX/lib -L /usr/lib" -zplugin ice wait"1" lucid \ - atload'ztie -d db/redis -a 127.0.0.1:4815/5 -zSL main rdhash' -zplugin load zdharma/zredis - -# An yet unfinished plugin for remote command -# execution based on zredis -zplugin ice wait"1" lucid -zplugin load zdharma/zredis-cmd - -# a service that runs the redis database, in -# background, single instance -zplugin ice wait"1" lucid service"redis" -zplugin light zservices/redis - -# zsh-editing-workbench & zsh-navigation-tools -zplugin ice wait"1" lucid -zplugin load psprint/zsh-editing-workbench -zplugin ice wait"1" lucid -zplugin load psprint/zsh-navigation-tools # for n-history - -# zdharma/history-search-multi-word -zstyle ":history-search-multi-word" page-size "11" -zplugin ice wait"1" lucid -zplugin load zdharma/history-search-multi-word +zplugin wait"1" lucid \ + atload'ztie -d db/redis -a 127.0.0.1:4815/5 -zSL main rdhash' for \ + zdharma/zredis + +# A few wait"1 plugins +zplugin wait"1" lucid for \ + zdharma/zredis-cmd \ + service"redis" \ + zservices/redis \ + 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 # Github-Issue-Tracker – the notifier thread -zplugin ice lucid id-as"GitHub-notify" \ - on-update-of'~/.cache/zsh-github-issues/new_titles.log' \ - notify'New issue: $NOTIFY_MESSAGE' -zplugin light zdharma/zsh-github-issues +zplugin 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 # Github-Issue-Tracker – the issue-puller thread GIT_SLEEP_TIME=700 GIT_PROJECTS=zdharma/zsh-github-issues:zdharma/zplugin -zplugin ice wait"2" lucid service"GIT" pick"zsh-github-issues.service.zsh" -zplugin light zdharma/zsh-github-issues - -# Theme no. 1 - zprompts -zplugin ice lucid load'![[ $MYPROMPT = 1 ]]' unload'![[ $MYPROMPT != 1 ]]' \ - atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3' -zplugin load psprint/zprompts - -# Theme no. 2 – lambda-mod-zsh-theme -zplugin ice lucid load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' -zplugin load halfo/lambda-mod-zsh-theme - -# Theme no. 3 – lambda-gitster -zplugin ice lucid load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' -zplugin load ergenekonyigit/lambda-gitster - -# Theme no. 4 – geometry -GEOMETRY_COLOR_DIR=63 GEOMETRY_PATH_COLOR=63 -zplugin ice load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ - atload'!geometry::prompt' lucid -zplugin load geometry-zsh/geometry - -# Theme no. 5 – pure -zplugin ice load'![[ $MYPROMPT = 5 ]]' unload'![[ $MYPROMPT != 5 ]]' \ - pick"/dev/null" multisrc"{async,pure}.zsh" -zplugin load sindresorhus/pure - -# Theme no. 6 - agkozak-zsh-theme -AGKOZAK_FORCE_ASYNC_METHOD=subst-async -zplugin ice lucid load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' \ - atload'!_agkozak_precmd' -zplugin load agkozak/agkozak-zsh-theme - -# Theme no. 7 - zinc -zplugin ice load'![[ $MYPROMPT = 7 ]]' unload'![[ $MYPROMPT != 7 ]]' \ - atclone'prompt_zinc_compile' \ - atpull'%atclone' compile"{zinc_functions/*,segments/*,zinc.zsh}" \ - nocompletions atload'!prompt_zinc_setup; prompt_zinc_precmd' -zplugin load robobenklein/zinc - -# Theme no. 8 - powerlevel10k -zplugin ice load'![[ $MYPROMPT = 8 ]]' unload'![[ $MYPROMPT != 8 ]]' \ - atload'!source ~/.p10k.zsh; _p9k_precmd' lucid #wrap-track"_p9k_precmd" -zplugin load romkatv/powerlevel10k - -# Theme no. 9 - git-prompt -zplugin ice load'![[ $MYPROMPT = 9 ]]' unload'![[ $MYPROMPT != 9 ]]' \ - atload'!_zsh_git_prompt_precmd_hook' lucid -zplugin load woefe/git-prompt.zsh - -# ZUI and Crasis -zplugin ice wait"1" lucid -zplugin load zdharma/zui -zplugin ice wait'[[ -n ${ZLAST_COMMANDS[(r)cra*]} ]]' -zplugin load zdharma/zplugin-crasis +zplugin wait"2" lucid service"GIT" \ + pick"zsh-github-issues.service.zsh" for \ + zdharma/zsh-github-issues # Gitignore plugin – commands gii and gi -zplugin ice wait"2" lucid -zplugin load voronkovich/gitignore.plugin.zsh - -# Fast-syntax-highlighting & autosuggestions -zplugin ice wait"1" lucid atload"!_zsh_autosuggest_start" -zplugin load zsh-users/zsh-autosuggestions -zplugin ice wait"1b" lucid atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" -zplugin light zdharma/fast-syntax-highlighting +zplugin wait"2" lucid trigger-load'!gi;!gii' \ + dl'https://gist.githubusercontent.com/psprint/1f4d0a3cb89d68d3256615f247e2aac9/raw -> templates/Zsh.gitignore' \ + for \ + voronkovich/gitignore.plugin.zsh # F-Sy-H automatic themes – available for patrons # https://patreon.com/psprint -#zplugin ice wait"1" lucid from"psprint@gitlab.com" -#zplugin load psprint/fsh-auto-themes - -# ogham/exa, replacement for ls -zplugin ice wait"2" lucid from"gh-r" mv"exa* -> exa" sbin"exa" fbin"exa" -zplugin light ogham/exa +: zplugin wait"1" lucid from"psprint@gitlab.com" for psprint/fsh-auto-themes -# sharkdp/fd -zplugin ice wait"2" lucid from"gh-r" mv"fd* -> fd" sbin"fd/fd" fbin"fd/fd" -zplugin light sharkdp/fd +# ogham/exa, sharkdp/fd, fzf +zplugin wait"2" lucid as"null" from"gh-r" for \ + mv"exa* -> exa" sbin ogham/exa \ + mv"fd* -> fd" sbin"fd/fd" @sharkdp/fd \ + sbin junegunn/fzf-bin # vramsteg -zplugin ice wait"2" lucid sbin"src/vramsteg" fbin"src/vramsteg" \ - atclone'cmake .' atpull'%atclone' make pick"/dev/null" -zplugin load psprint/vramsteg-zsh - -# revolver -zplugin ice wait"2" lucid as"program" pick"revolver" -zplugin load psprint/revolver - -# declare-zshrc -zplugin ice wait"2" lucid -zplugin load zdharma/declare-zshrc - -# zsh-diff-so-fancy -zplugin ice wait"2" lucid sbin"bin/git-dsf" fbin"bin/git-dsf" \ - sbin"bin/diff-so-fancy" fbin"bin/diff-so-fancy" \ - pick"/dev/null" -zplugin load zdharma/zsh-diff-so-fancy - -# forgit -zplugin ice wait'2' lucid -zplugin load wfxr/forgit - -# git-now -zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-now" make"PREFIX=$ZPFX install" -zplugin load iwata/git-now - -# git-extras -zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-alias" make"PREFIX=$ZPFX" -zplugin load tj/git-extras +zplugin wait"2" lucid as"null" sbin"src/vramsteg" \ + atclone'cmake .' atpull'%atclone' make for \ + psprint/vramsteg-zsh + +# A few wait'2' plugins +zplugin wait"2" lucid for \ + zdharma/declare-zsh \ + zdharma/zflai \ + blockf \ + zdharma/zui \ + zplugin/zplugin-console \ + trigger-load'!crasis' \ + zdharma/zplugin-crasis \ + atinit"forgit_ignore='fgi'" \ + wfxr/forgit # git-cal -zplugin ice wait"2" lucid as"program" atclone'perl Makefile.PL PREFIX=$ZPFX' \ - atpull'%atclone' make'install' pick"$ZPFX/bin/git-cal" -zplugin load k4rthik/git-cal - -# git-url -zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-(url|guclone)" make"install PREFIX=$ZPFX GITURL_NO_CGITURL=1" -zplugin load zdharma/git-url - -# git-recall -zplugin ice wait"3" lucid sbin"git-recall" fbin"git-recall" pick"/dev/null" -zplugin load Fakerr/git-recall - -# git-quick-stats -zplugin ice wait"3" lucid as"program" make"PREFIX=$ZPFX install" \ - pick"$ZPFX/bin/git-quick-stats" \ - atload"export _MENU_THEME=legacy" -zplugin load arzzen/git-quick-stats.git +zplugin 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 +zplugin 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 \ + make"PREFIX=$ZPFX install" 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 # fbterm -#zplugin ice 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 -#zplugin load izmntuk/fbterm - -# zsh-tag-search -zplugin ice wait lucid bindmap"^R -> ^G" -zplugin load zdharma/zsh-tag-search +: zplugin 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 -#zplugin ice 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" -#zplugin load asciinema/asciinema.git +: zplugin 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 # Notifications, configured to use zconvey -zplugin ice wait lucid -zplugin light marzocchi/zsh-notify - -: zplugin ice wait lucid -: zplugin light rimraf/k -: zplugin light zsh-users/zsh-syntax-highlighting -: zplugin ice load'![[ $PWD = */github/* ]]' unload'![[ $PWD != */github/* ]]' -: zplugin light denysdovhan/spaceship-zsh-theme -: zplugin ice wait"1" -: zplugin load b4b4r07/zsh-vimode-visual +: zplugin wait lucid for marzocchi/zsh-notify zflai-msg "[zshrc] Zplugin block took ${(M)$(( SECONDS * 1000 ))#*.?} ms" -MYPROMPT=1 +# powerlevel10k +MYPROMPT=8 + +# Load within zshrc – for the instant prompt +zplugin atload'!source ~/.p10k.zsh' lucid nocd +zplugin load romkatv/powerlevel10k # # Zstyles & other @@ -566,9 +530,9 @@ function double-accept { deploy-code "BUFFER[-1]=''"; } zle -N double-accept bindkey -M menuselect '^F' history-incremental-search-forward bindkey -M menuselect '^R' history-incremental-search-backward -bindkey -M menuselect ' ' double-accept +bindkey -M menuselect ' ' .accept-line -function mem() { ps -axv | grep $$ } +function mem() { ps -axv | grep $$ } # added by travis gem [ -f /Users/sgniazdowski/.travis/travis.sh ] && source /Users/sgniazdowski/.travis/travis.sh From 7965dfd285f929205bcae363d8300d2138bf10e8 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 12 Nov 2019 18:48:19 +0100 Subject: [PATCH 31/51] psprint: Install nodejs --- psprint/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psprint/bootstrap.sh b/psprint/bootstrap.sh index 5f24de0..5e366a3 100644 --- a/psprint/bootstrap.sh +++ b/psprint/bootstrap.sh @@ -2,7 +2,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt install --yes cmake redis-server libhiredis-dev \ tree gem libfreetype6-dev libfontconfig-dev \ - autoconf automake + autoconf automake nodejs # For zdharma/zredis sudo mkdir -p usr/local/var/db/redis From a7b0106f4e8941ccdff24e04403d319c8392a96c Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 12 Nov 2019 19:43:17 +0100 Subject: [PATCH 32/51] psprint: Update --- psprint/bootstrap.sh | 2 +- psprint/zshrc.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/psprint/bootstrap.sh b/psprint/bootstrap.sh index 5e366a3..b45dfee 100644 --- a/psprint/bootstrap.sh +++ b/psprint/bootstrap.sh @@ -2,7 +2,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt install --yes cmake redis-server libhiredis-dev \ tree gem libfreetype6-dev libfontconfig-dev \ - autoconf automake nodejs + autoconf automake nodejs npm # For zdharma/zredis sudo mkdir -p usr/local/var/db/redis diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index 6fe7b12..eaeaf3a 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -266,8 +266,8 @@ autoload -Uz _zplugin (( ${+_comps} )) && _comps[zplugin]=_zplugin # Zplugin annexes +# zplugin/z-a-man \ zplugin light-mode for \ - zplugin/z-a-man \ zplugin/z-a-test \ zplugin/z-a-patch-dl \ zplugin/z-a-submods \ From 490d3c8324126c8df13fc0d90fc9c457604be3e5 Mon Sep 17 00:00:00 2001 From: Alexandros Kozak Date: Tue, 19 Nov 2019 17:33:57 -0800 Subject: [PATCH 33/51] Added ZSH dotfiles from agkozak/dotfiles --- agkozak/.profile | 132 +++++++++++ agkozak/.shrc | 339 ++++++++++++++++++++++++++++ agkozak/.zprofile | 5 + agkozak/.zshenv | 30 +++ agkozak/.zshrc | 565 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1071 insertions(+) create mode 100644 agkozak/.profile create mode 100644 agkozak/.shrc create mode 100644 agkozak/.zprofile create mode 100644 agkozak/.zshenv create mode 100644 agkozak/.zshrc diff --git a/agkozak/.profile b/agkozak/.profile new file mode 100644 index 0000000..a94e533 --- /dev/null +++ b/agkozak/.profile @@ -0,0 +1,132 @@ +# ~/.profile: executed by the command interpreter for login shells. +# +# https://github.com/agkozak/dotfiles +# +# shellcheck shell=sh +# shellcheck disable=SC2034 + +export AGKDOT_SYSTEMINFO +AGKDOT_SYSTEMINFO=$(uname -a) + +export EDITOR VISUAL +if command -v vim > /dev/null 2>&1; then + EDITOR='vim' +else + EDITOR='vi' +fi +VISUAL="$EDITOR" + +export ENV +ENV="$HOME/.shrc" + +case $(ls -l "$(command -v less)") in + *busybox*) ;; + *) + case $AGKDOT_SYSTEMINFO in + UWIN*) ;; + *) + export LESS + LESS='-R' + ;; + esac +esac + +if command -v lesspipe > /dev/null 2>&1; then + export LESSOPEN + LESSOPEN='|~/.lessfilter %s' +elif command -v lesspipe.sh > /dev/null 2>&1; then + export LESSOPEN + LESSOPEN="$(command -v lesspipe.sh) %s" +fi + +if [ -f "$HOME/.lynx.cfg" ]; then + export LYNX_CFG + LYNX_CFG="$HOME/.lynx.cfg" +fi + +export MANPAGER +MANPAGER='less -X' + +# Always use Unicode line-drawing characters, not VT100-style ones +export NCURSES_NO_UTF8_ACS +NCURSES_NO_UTF8_ACS=1 + +export PAGER +PAGER=less + +# More modern utilities on Solaris +# case $systeminfo in +# SunOS*) PATH="$(getconf PATH):$PATH" ;; +# esac + +export PATH + +# Construct $PATH +for i in "$HOME/.gem/ruby/2.4.0/bin" \ + "$HOME/.local/bin" \ + "$HOME/go/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 + if [ -d "$i" ]; then + case :$PATH: in + *:$i:*) ;; + *) + PATH="$i:$PATH" + ;; + esac + fi +done + +unset i + +case $AGKDOT_SYSTEMINFO in + *Msys) [ -d /mingw64/bin ] && PATH="$PATH:/mingw64/bin" ;; +esac + +# Load RVM into a shell session *as a function* +# shellcheck source=/dev/null +[ -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' + ;; +esac + +if [ "$(umask)" = "000" ]; then # For WSL + umask 022 +fi + +if [ -f "$HOME/.profile.local" ]; then + # shellcheck source=/dev/null + . "$HOME/.profile.local" +fi + +# vim: ts=2:sts=2:sw=2:ai:et diff --git a/agkozak/.shrc b/agkozak/.shrc new file mode 100644 index 0000000..8fa4dc2 --- /dev/null +++ b/agkozak/.shrc @@ -0,0 +1,339 @@ +# ~/.shrc - bourne shell startup file +# +# https://github.com/agkozak/dotfiles +# +# This file will be used if the shell is invoked for interactive use and +# the environment variable ENV is set to this file. It is sourced at the +# beginnning of .zshrc and .bashrc +# +# shellcheck shell=sh + +# Only run this script when shell is interactive +case $- in + *i*) ;; + *) exit ;; +esac + +export AGKDOT_SYSTEMINFO +: "${AGKDOT_SYSTEMINFO:=$(uname -a)}" + +#shellcheck source=/dev/null +[ -z "$ENV" ] && [ -f "$HOME/.profile" ] && . "$HOME/.profile" + +# Begin .shrc benchmark {{{ + +_agkdot_is_busybox() { + [ "${AGKDOT_IS_BUSYBOX:-0}" -eq 1 ] && return 0 + case $0 in + sh|-sh|ash|-ash) + if command -v readlink > /dev/null 2>&1; then + case $(exec 2>/dev/null; readlink "/proc/$$/exe") in + */busybox) AGKDOT_IS_BUSYBOX=1 && return 0 ;; + *) return 1 ;; + esac + fi + ;; + *) return 1 ;; + esac +} + +if [ "${AGKDOT_BENCHMARKS:-0}" -eq 1 ]; then + [ "${AGKDOT_ZSHRC_LOADING:-0}" -eq 1 ] || { + case $AGKDOT_SYSTEMINFO in + # BSD and busybox date don't handle nanoseconds + *BSD*|*bsd*|DragonFly*) ;; + *) ! _agkdot_is_busybox && AGKDOT_SHRC_START="$(date +%s%N)" ;; + esac + } +fi + +# }}} + +# Raspberry Pi LXTerminal {{{1 + +# It's important to set this up early so that dircolors uses the right number of +# colors + +if [ "$XDG_CURRENT_DESKTOP" = 'LXDE' ] && [ "$TERM" = 'xterm' ]; then + TERM='xterm-256color' # LXTerminal can't set TERM +fi + +# }}}1 + +# Aliases {{{1 + +# case $(type fc) in # fc can be Windows file compare +# *builtin) alias h='fc -l' ;; +# esac + +# alias j=jobs +# alias m='$PAGER' +# alias g='egrep -i' + +# enable color support of ls and also add handy aliases {{{2 + +case $TERM in + *-256color) AGKDOT_TERM_COLORS=256 ;; + vt100|vt220|dumb) AGKDOT_TERM_COLORS=-1 ;; + *) + case $AGKDOT_SYSTEMINFO in + FreeBSD*|DragonFly*) AGKDOT_TERM_COLORS=$(tput Co) ;; + UWIN*) AGKDOT_TERM_COLORS=$(tput cols) ;; + *) AGKDOT_TERM_COLORS=$(tput colors) ;; + esac + ;; +esac + +case $AGKDOT_SYSTEMINFO in + # CYGWIN*GNU/Linux is MobaXterm, which uses busybox ls + CYGWIN*GNU/Linux|SunOS*|NetBSD*|OpenBSD*|UWIN*) ;; + # BSD ls + Darwin*|*BSD*|*bsd*|*[Dd]ragon[Ff]ly*) + [ "$AGKDOT_TERM_COLORS" -ge 8 ] && LS_OPTIONS='-G' + ;; + *) + LS_OPTIONS='--group-directories-first -F -h -T 0' + [ "$AGKDOT_TERM_COLORS" -ge 8 ] && LS_OPTIONS="$LS_OPTIONS --color" + case $AGKDOT_SYSTEMINFO in + *Msys|*Cygwin) LS_OPTIONS="$LS_OPTIONS --hide=NTUSER* --hide=ntuser*" ;; + esac + ;; +esac + +alias ls='ls $LS_OPTIONS' + +case $AGKDOT_SYSTEMINFO in + SunOS*) + if [ -x /usr/gnu/bin/ls ]; then + alias ls='/usr/gnu/bin/ls --group-directories-first -F -h -T 0 --color' + fi + ;; +esac + +if [ -n "$INSIDE_EMACS" ]; then + unset LS_COLORS +elif [ -z "$LS_COLORS" ]; then + if command -v dircolors > /dev/null 2>&1; then + if [ -r "$HOME/.dircolors" ] && [ "$AGKDOT_TERM_COLORS" -ge 256 ]; then + eval "$(dircolors -b "$HOME/.dircolors")" + elif [ "$AGKDOT_TERM_COLORS" -ge 8 ]; then + eval "$(dircolors -b)" + fi + fi +fi + +case $AGKDOT_SYSTEMINFO in + CYGWIN*GNU/Linux|SunOS*|*ish*|UWIN*) ;; + *) + if [ "$AGKDOT_TERM_COLORS" -ge 8 ]; then + alias dir='dir --color=auto' + alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' + fi + ;; +esac + +unset AGKDOT_TERM_COLORS + +# }}}2 + +# some more ls aliases {{{2 + +# alias ll='ls -alF' +# alias la='ls -A' +# alias l='ls -CF' + +# alias lr='ls -tRFh' # sorted by date, recursive, show type, human-readable +# alias lt='ls -ltFh' # long list, sorted by date, show type, human-readable +alias ldot='ls -ld .*' +# alias lS='ls -1FSsh' +# alias lart='ls -1Fcart' +# alias lrt='ls -1Fcrt' + +# }}}2 + +command -v hue > /dev/null 2>&1 && alias bri='hue set all -b' + +_agkdot_is_uwin() { + case $AGKDOT_SYSTEMINFO in + UWIN*) return 0 ;; + *) return 1 ;; + esac +} + +case $KSH_VERSION in + *R55*) ;; # mksh version R55 erroneously does not allow these aliases + *) + alias ..='cd ..' + alias ...='cd ../..' + ;; +esac +# alias c='clear' +alias composer='$HOME/bin/composer.phar' +# if ! _agkdot_is_uwin; then +# alias dud='du -d 1 -h' +# alias duf='du -sh *' +# fi +# command -v dos2unix > /dev/null 2>&1 || alias dos2unix='perl -p -i -e "s/\\r\\n/\\n/g"' +# alias fd='find . -type d -name' # Conflicts with fd utility +# alias ff='find . -type f -name' +alias github-stats='github-stats --token $GITHUB_STATS_TOKEN' +# alias help='man' +# alias p='ps -f' +alias phpunit='$HOME/bin/phpunit.phar' +# if ! _agkdot_is_busybox && ! _agkdot_is_uwin; then +# alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} ' +# fi +# alias sortnr='sort -n -r' +# alias t='tail -f' +alias v='findv' +alias vv='findv --verbose' +command -v vim > /dev/null 2>&1 && alias vi='vim' +alias wp='$HOME/bin/wp-cli.phar' +alias yta='youtube-dl --audio-format best -x ' + +# System-specific aliases {{{2 + +############################################################ +# Create winpty aliases for MSYS2 and Cygwin +# +# Arguments: +# $1, $2, etc. Programs that should be run with winpty +############################################################ +_agkdot_winpty_alias() { + while [ $# -ne 0 ]; do + # shellcheck disable=SC2139,SC2140 + alias "$1"="winpty $1" + shift + done +} + +case "$AGKDOT_SYSTEMINFO" in + *Msys|*Cygwin) + _agkdot_winpty_alias choco cinst cuninst cup node php + alias eslint='winpty $APPDATA/npm/eslint.cmd' + alias ghci='ghcii.sh' + alias gvim='/c/Windows/gvim.bat' + ;; +esac + +case "$AGKDOT_SYSTEMINFO" in + *Msys) + alias npm='winpty /c/Program\ Files/nodejs/npm.cmd' + alias wp='winpty php $HOME/bin/wp-cli.phar --no-color' + ;; + *Cygwin) + alias composer='php $(cygpath -w "$HOME/bin/composer.phar")' + alias npm='winpty /cygdrive/c/Program\ Files/nodejs/npm.cmd' + ;; + *raspberrypi*) + alias temp='/opt/vc/bin/vcgencmd measure_temp | egrep "[0-9.]{4,}" -o' + ;; + FreeBSD*) + alias tmux='TERM=xterm-256color tmux' + alias mutt='TERM=xterm-256color mutt' + ;; +esac + +# }}}2 + +# }}}1 + +# Prompt {{{1 + +# If possible, load the pan-POSIX Polyglot Prompt +# But not in zsh -- it uses agkozak-zsh-prompt +if [ -z "$ZSH_VERSION" ] || [ "$0" = 'bash' ] || [ "$0" = 'ksh' ] \ + || [ "$0" = 'sh' ]; then + if [ -f "$HOME/dotfiles/prompts/polyglot/polyglot.sh" ]; then + # shellcheck source=/dev/null + . "$HOME/dotfiles/prompts/polyglot/polyglot.sh" + fi +fi + +# }}}1 + +# search path for cd(1) +# CDPATH=:$HOME + +# For ksh93/mksh + +# vi-style line editing +set -o vi + +case $KSH_VERSION in *93*) set -o globstar ;; esac + +HISTSIZE=10000 + +# If it's not really zsh emulating ksh +if [ -z "$ZSH_VERSION" ]; then + case $KSH_VERSION in + *'PD KSH'*) HISTFILE="$HOME/.pdksh_history" ;; + *MIRBSD*) HISTFILE="$HOME/.mksh_history" ;; + *) HISTFILE="$HOME/.ksh_history" ;; + esac +fi + +# find shorthand {{{ + +f() { + find . -name "$1" 2>&1 | grep -v 'Permission denied' +} + +# }}} + +# Pull in updates from the dotfiles repo and install them {{{1 + +update_dotfiles() { + CUR_DIR="$PWD" + cd "$HOME/dotfiles" || exit + git pull && ./install.sh + for i in $(find . -name '.git' | cut -c 3-); do + cd "$i" || exit + cd .. + git pull + cd "$HOME/dotfiles" || exit + done + cd "$CUR_DIR" || exit + unset CUR_DIR i +} + +# }}}1 + +# Disable flow control -- allows use of Ctrl-Q as tmux/screen prefix +# +# zsh might be running in ksh emulation mode +if [ "$0" = 'ksh' ] || [ -z "$ZSH_VERSION" ]; then + stty -ixon +fi + +# End .shrc benchmark {{{ + +if [ "${AGKDOT_BENCHMARKS:-0}" -eq 1 ]; then + [ "${AGKDOT_ZSHRC_LOADING:-0}" -eq 1 ] || { + case $AGKDOT_SYSTEMINFO in + FreeBSD*) ;; + *) + if ! _agkdot_is_busybox; then + AGKDOT_SHRC_FINISH="$(date +%s%N)" + AGKDOT_DIFFERENCE=$(( AGKDOT_SHRC_FINISH - AGKDOT_SHRC_START )) + echo ".shrc loaded in $((AGKDOT_DIFFERENCE/1000000))ms." + fi + ;; + esac + } +fi + +unset AGKDOT_SHRC_START AGKDOT_SHRC_FINISH AGKDOT_DIFFERENCE + +# }}} + +# shellcheck source=/dev/null +if [ -f "$HOME/.shrc.local" ]; then . "$HOME/.shrc.local"; fi + +if [ -n "${AGKDOT_IS_BUSYBOX}" ]; then unset AGKDOT_IS_BUSYBOX; fi + +# vim: ft=sh:fdm=marker:ts=2:et:sw=2:ai:sts=2 diff --git a/agkozak/.zprofile b/agkozak/.zprofile new file mode 100644 index 0000000..2fba253 --- /dev/null +++ b/agkozak/.zprofile @@ -0,0 +1,5 @@ +# ~/.zprofile +# +# https://github.com/agkozak/dotfiles + +[[ -f ${HOME}/.profile ]] && source "${HOME}/.profile" diff --git a/agkozak/.zshenv b/agkozak/.zshenv new file mode 100644 index 0000000..f759eec --- /dev/null +++ b/agkozak/.zshenv @@ -0,0 +1,30 @@ +# ~/.zshenv +# +# https://github.com/agkozak/dotfiles + +# Benchmarks +typeset -F SECONDS=0 + +# if ~/.profile has not been loaded and /etc/zsh/zshenv has +if [[ -z $ENV ]] && [[ -n $PATH ]]; then + case $- in + *l*) ;; + *) [[ -f ${HOME}/.profile ]] && source ${HOME}/.profile ;; + esac +fi + +# Add snap binary and desktop directories to environment +if whence -w snap &> /dev/null && [[ -f /etc/profile.d/apps-bin-path.sh ]]; then + if [[ ! $PATH == */snap/bin* ]] || [[ ! $XDG_DATA_DIRS == */snapd/* ]]; then + emulate sh + source /etc/profile.d/apps-bin-path.sh + emulate zsh + fi +fi + +[[ -f ${HOME}/.zshenv.local ]] && source ${HOME}/.zshenv.local + +# Benchmarks +typeset -g AGKDOT_ZSHENV_BENCHMARK=${$(( SECONDS * 1000))%.*} + +# vim: ai:fdm=marker:ts=2:et:sts=2:sw=2 diff --git a/agkozak/.zshrc b/agkozak/.zshrc new file mode 100644 index 0000000..b1c2ade --- /dev/null +++ b/agkozak/.zshrc @@ -0,0 +1,565 @@ +# ~/.zshrc +# +# https://github.com/agkozak/dotfiles +# +# shellcheck disable=SC1090,SC2034,SC2128,SC2148,SC2154 + +# If zsh is emulating another shell +if [[ $0 == 'ksh' ]] || [[ $0 == 'sh' ]]; then + source "$HOME/.shrc" && exit +elif [[ $0 == 'bash' ]]; then + source "$HOME/.bashrc" && exit +fi + +# Begin .zshrc benchmarks {{{1 + +# To run zprof, execute +# +# env ZSH_PROF='' zsh -ic zprof +(( $+ZSH_PROF )) && zmodload zsh/zprof + +# For simple script running times, execute +# +# AGKDOT_BENCHMARKS=1 +# +# before sourcing. + +if (( AGKDOT_BENCHMARKS )); then + if (( $+AGKDOT_ZSHENV_BENCHMARK )); then + print ".zshenv loaded in ${AGKDOT_ZSHENV_BENCHMARK}ms total." + unset AGKDOT_ZSHENV_BENCHMARK + fi + typeset -F SECONDS=0 +fi + +# }}}1 + +# compile_or_recompile() {{{1 + +########################################################### +# If files do not have compiled forms, compile them; +# if they have been compiled, recompile them when necessary +# +# Arguments: +# $1, etc. Shell scripts to be compiled +########################################################### +compile_or_recompile() { + local file + for file in "$@"; do + if [[ -f $file ]] && [[ ! -f ${file}.zwc ]] \ + || [[ $file -nt ${file}.zwc ]]; then + zcompile "$file" + fi + done +} + +compile_or_recompile "${HOME}/.profile" "${HOME}/.zprofile" "${HOME}/.zshenv" \ + "${HOME}/.zshenv.local" "${HOME}/.zshrc" "${HOME}/.zshrc.local" \ + "${HOME}/.shrc" "${HOME}/.shrc.local" + +# }}}1 + +# (Compile and) source ~/.shrc {{{1 + +if [[ -f ${HOME}/.shrc ]];then + if (( AGKDOT_BENCHMARKS )); then + (( $+EPOCHREALTIME )) || zmodload zsh/datetime + typeset -g AGKDOT_ZSHRC_START=$(( EPOCHREALTIME * 1000 )) + AGKDOT_ZSHRC_LOADING=1 source "${HOME}/.shrc" + printf '.shrc loaded in %dms.\n' $(( (EPOCHREALTIME * 1000) - AGKDOT_ZSHRC_START )) + unset AGKDOT_ZSHRC_START + else + source "${HOME}/.shrc" + fi +fi + +# }}}1 + +# Options {{{1 +# +# Arranged according to `man zshoptions` + +# Changing Directories {{{2 + +setopt AUTO_CD # Change to a directory just by typing its name +setopt AUTO_PUSHD # Make cd push each old directory onto the stack +setopt CDABLE_VARS # Like AUTO_CD, but for named directories +setopt PUSHD_IGNORE_DUPS # Don't push duplicates onto the stack + +# }}}2 + +# Completion {{{2 + +unsetopt LIST_BEEP # Don't beep on an ambiguous completion + +# Expansion and Globbing {{{2 + +# setopt EXTENDED_GLOB + +# }}}2 + +# History {{{2 + +# History environment variables +HISTFILE=${HOME}/.zsh_history +HISTSIZE=120000 # Larger than $SAVEHIST for HIST_EXPIRE_DUPS_FIRST to work +SAVEHIST=100000 + +setopt EXTENDED_HISTORY # Save time stamps and durations +setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicates first + +# Enable history on CloudLinux for a custom build of zsh in ~/bin +# with HAVE_SYMLINKS=0 set at compile time +# See https://gist.github.com/agkozak/50a9bf7da14b9f060c68124418ac5217 +if [[ -f '/var/.cagefs/.cagefs.token' ]]; then + if [[ =zsh != '/bin/zsh' ]]; then + setopt HIST_FCNTL_LOCK + else + # Otherwise, just disable persistent history + unset HISTFILE + fi +fi + +setopt HIST_IGNORE_DUPS # Do not enter 2 consecutive duplicates into history +setopt HIST_IGNORE_SPACE # Ignore command lines with leading spaces +setopt HIST_VERIFY # Reload results of history expansion before executing +setopt INC_APPEND_HISTORY # Constantly update $HISTFILE +setopt SHARE_HISTORY # Constantly share history between shell instances + +# }}}2 + +# Input/Output {{{2 + +setopt INTERACTIVE_COMMENTS # Allow comments in interactive mode + +# }}}2 + +# Job Control {{{2 + +: ${AGKDOT_SYSTEMINFO:=$(uname -a)} + +# Disable nice for background processes in WSL +[[ ${AGKDOT_SYSTEMINFO} == *Microsoft* ]] && unsetopt BG_NICE + +# }}}2 + +# }}}1 + +# Some autoloaded functions {{{1 + +# Test for minimal ZSH version +autoload -Uz is-at-least + +# Function for batch moving and renaming of files +autoload -Uz zmv + +# }}}1 + +# zsh-specific aliases - POSIX aliases are in .shrc {{{1 + +# alias hgrep='fc -fl 0 | grep' + +alias ls='ls ${=LS_OPTIONS}' + +# Global Aliases {{{2 + +# alias -g CA='2>&1 | cat -A' +# alias -g G='| grep' +# alias -g H='| head' +alias -g L='| less' +# alias -g LL='2>&1 | less' +# alias -g M='| most' +alias -g NE='2> /dev/null' +alias -g NUL='&> /dev/null' +# alias -g T='| tail' +alias -g V='|& vim -' + +# }}}2 + +# }}}1 + +# The Debian solution to Del/Home/End/etc. keybindings {{{1 + +# No need to load the following code if I'm using Debian +if [[ ! -f '/etc/debian-version' ]] && [[ ! -f '/etc/zsh/zshrc' ]]; then + + typeset -A key + # shellcheck disable=SC2190 + key=( + BackSpace "${terminfo[kbs]}" + Home "${terminfo[khome]}" + End "${terminfo[kend]}" + Insert "${terminfo[kich1]}" + Delete "${terminfo[kdch1]}" + Up "${terminfo[kcuu1]}" + Down "${terminfo[kcud1]}" + Left "${terminfo[kcub1]}" + Right "${terminfo[kcuf1]}" + PageUp "${terminfo[kpp]}" + PageDown "${terminfo[knp]}" + ) + + function bind2maps() { + local i sequence widget + local -a maps + + while [[ "$1" != "--" ]]; do + maps+=( "$1" ) + shift + done + shift + + sequence="${key[$1]}" + widget="$2" + + [[ -z "$sequence" ]] && return 1 + + for i in "${maps[@]}"; do + bindkey -M "$i" "$sequence" "$widget" + done + unset i + } + + bind2maps emacs -- BackSpace backward-delete-char + bind2maps viins -- BackSpace vi-backward-delete-char + bind2maps vicmd -- BackSpace vi-backward-char + bind2maps emacs -- Home beginning-of-line + bind2maps viins vicmd -- Home vi-beginning-of-line + bind2maps emacs -- End end-of-line + bind2maps viins vicmd -- End vi-end-of-line + bind2maps emacs viins -- Insert overwrite-mode + bind2maps vicmd -- Insert vi-insert + bind2maps emacs -- Delete delete-char + bind2maps viins vicmd -- Delete vi-delete-char + bind2maps emacs viins vicmd -- Up up-line-or-history + bind2maps emacs viins vicmd -- Down down-line-or-history + bind2maps emacs -- Left backward-char + bind2maps viins vicmd -- Left vi-backward-char + bind2maps emacs -- Right forward-char + bind2maps viins vicmd -- Right vi-forward-char + + # Make sure the terminal is in application mode, when zle is + # active. Only then are the values from $terminfo valid. + # + # shellcheck disable=SC2004 + if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then + function zle-line-init() { + emulate -L zsh + printf '%s' "${terminfo[smkx]}" + } + function zle-line-finish() { + emulate -L zsh + printf '%s' "${terminfo[rmkx]}" + } + zle -N zle-line-init + zle -N zle-line-finish + else + for i in {s,r}mkx; do + (( ${+terminfo[$i]} )) || debian_missing_features+=("$i") + done + unset i + fi + + unfunction bind2maps + +fi + +# }}}1 + +# zplugin {{{1 + +if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then + + # Optional binary module + if [[ -f "$HOME/.zplugin/bin/zmodules/Src/zdharma/zplugin.so" ]]; then + module_path+=( "$HOME/.zplugin/bin/zmodules/Src" ) + zmodload zdharma/zplugin + fi + + if whence -w git &> /dev/null; then + + if [[ ! -d ${HOME}/.zplugin/bin ]]; then + print 'Installing zplugin...' + mkdir -p "${HOME}/.zplugin" + git clone https://github.com/zdharma/zplugin.git "${HOME}/.zplugin/bin" + compile_or_recompile "${HOME}/.zplugin/bin/zplugin.zsh" + fi + + # Configuration hash + typeset -A ZPLGM + + # Location of .zcompdump file + ZPLGM[ZCOMPDUMP_PATH]="${HOME}/.zcompdump_${ZSH_VERSION}" + + # zplugin and its plugins and snippets + source "${HOME}/.zplugin/bin/zplugin.zsh" + + # Load plugins and snippets {{{2 + + # AGKOZAK_COLORS_PROMPT_CHAR='magenta' + # AGKOZAK_CUSTOM_SYMBOLS=( '⇣⇡' '⇣' '⇡' '+' 'x' '!' '>' '?' 'S' ) + AGKOZAK_LEFT_PROMPT_ONLY=1 + # AGKOZAK_MULTILINE=0 + # AGKOZAK_PROMPT_CHAR=( '❯' '❯' '❮' ) + # AGKOZAK_PROMPT_DEBUG=1 + zplugin ver"develop" for agkozak/agkozak-zsh-prompt + + # zplugin light agkozak/polyglot + # if which kubectl &> /dev/null; then + # zplugin light jonmosco/kube-ps1 + # zplugin light agkozak/polyglot-kube-ps1 + # fi + + # agkozak/zsh-z + # In FreeBSD, /home is /usr/home + ZSHZ_DEBUG=1 + [[ $OSTYPE == freebsd* ]] && typeset -g ZSHZ_NO_RESOLVE_SYMLINKS=1 + + zplugin 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 + zplugin lucid wait for jreese/zsh-titles + fi + + if [[ $AGKDOT_SYSTEMINFO != *ish* ]]; then + zplugin lucid wait for zdharma/zui + zplugin lucid wait'1' for zdharma/zbrowse + fi + + zplugin snippet OMZ::plugins/extract/extract.plugin.zsh + + zplugin 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 + zle -N history-substring-search-down + bindkey '^[OA' history-substring-search-up + bindkey '^[OB' history-substring-search-down + bindkey -M vicmd 'k' history-substring-search-up + bindkey -M vicmd 'j' history-substring-search-down + + # Must be loaded last + if [[ $OSTYPE == (msys|cygwin) ]] \ + || [[ $AGKDOT_SYSTEMINFO == *Microsoft* ]]; then + # Git highlighting can be very slow on Windows + zplugin ice \ + atload'unset "FAST_HIGHLIGHT[chroma-git]"; fast-theme free &> /dev/null' \ + lucid wait + else + zplugin ice atload'fast-theme free &> /dev/null' lucid wait + fi + zplugin load zdharma/fast-syntax-highlighting + + else + print 'Please install git.' + fi + + # }}}2 + +elif is-at-least 4.3.11; then + + if [[ ! -d ${HOME}/dotfiles/prompts/agkozak-zsh-prompt ]]; then + ( mkdir -p "${HOME}/dotfiles/prompts" \ + && cd "${HOME}/dotfiles/prompts" \ + && git clone 'https://github.com/agkozak/agkozak-zsh-prompt' ) + fi + source "${HOME}/dotfiles/prompts/agkozak-zsh-prompt/agkozak-zsh-prompt.plugin.zsh" + +fi + +# }}}1 + +# Styles and completions {{{1 + +autoload -Uz compinit +compinit -u -d "${HOME}/.zcompdump_${ZSH_VERSION}" + +(( ! AGKDOT_NO_ZPLUGIN )) && is-at-least 5 && zplugin cdreplay -q + +# https://www.zsh.org/mla/users/2015/msg00467.html +# shellcheck disable=SC2016 +zstyle -e ':completion:*:*:ssh:*:my-accounts' users-hosts \ + '[[ -f ${HOME}/.ssh/config && $key = hosts ]] && key=my_hosts reply=()' + +# Allow SSH tab completion for mosh hostnames +compdef mosh=ssh + +# rationalise-dot() {{{2 +# https://grml.org/zsh/zsh-lovers.html + +rationalise-dot() { + if [[ $LBUFFER = *.. ]]; then + LBUFFER+=/.. + else + LBUFFER+=. + fi +} + +zle -N rationalise-dot +bindkey . rationalise-dot +# Without the following, typing a period aborts incremental history search +bindkey -M isearch . self-insert + +# }}}2 + +# Menu-style completion +zstyle ':completion:*' menu select + +# use the vi navigation keys (hjkl) besides cursor keys in menu completion +zmodload zsh/complist +bindkey -M menuselect 'h' vi-backward-char # left +bindkey -M menuselect 'k' vi-up-line-or-history # up +bindkey -M menuselect 'l' vi-forward-char # right +bindkey -M menuselect 'j' vi-down-line-or-history # bottom + +# Use dircolors $LS_COLORS for completion when possible +zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" + +# Allow pasting URLs as CLI arguments +if [[ $ZSH_VERSION != '5.1.1' ]] && [[ $TERM != 'dumb' ]] \ + && (( ! $+INSIDE_EMACS )); then + if is-at-least 5.1; then + autoload -Uz bracketed-paste-magic + zle -N bracketed-paste bracketed-paste-magic + fi + autoload -Uz url-quote-magic + zle -N self-insert url-quote-magic +elif [[ $TERM == 'dumb' ]]; then + unset zle_bracketed_paste # Avoid ugly control sequences +fi + +# Use Esc-K for run-help +bindkey -M vicmd 'K' run-help + +# Allow v to edit the command line +autoload -Uz edit-command-line +zle -N edit-command-line +bindkey -M vicmd 'v' edit-command-line + +# Fuzzy matching of completions +# https://grml.org/zsh/zsh-lovers.html +zstyle ':completion:*' completer _complete _match _approximate +zstyle ':completion:*:match:*' original only +zstyle -e ':completion:*:approximate:*' \ + max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)' + +# Have the completion system announce what it is completing +zstyle ':completion:*' format 'Completing %d' + +# In menu-style completion, give a status bar +zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' + +# In the line editor, number of matches to show before asking permission +LISTMAX=9999 + +# vi mode and exceptions {{{2 + +# bindkey -v # `set -o vi` is in .shrc + +# Borrowed from emacs mode +bindkey '^P' up-history +bindkey '^N' down-history +bindkey '^R' history-incremental-search-backward +setopt NO_FLOW_CONTROL # Or the next command won't work +bindkey '^S' history-incremental-search-forward + +# More zsh-history-substring-search bindings +bindkey '^P' history-substring-search-up +bindkey '^N' history-substring-search-down + +# }}}2 + +# }}}1 + +# Miscellaneous {{{1 + +# Disable echo escape sequences in MSys2 or Cygwin +[[ $OSTYPE == (msys|cygwin) ]] && alias echo='echo -E' + +# 10ms for key sequences +KEYTIMEOUT=1 + +# Static named directories +[[ -d ${HOME}/public_html/wp-content ]] \ + && hash -d wp-content="$HOME/public_html/wp-content" +[[ -d ${HOME}/.zplugin/plugins/agkozak---agkozak-zsh-prompt ]] \ + && hash -d agk="$HOME/.zplugin/plugins/agkozak---agkozak-zsh-prompt" +[[ -d ${HOME}/.zplugin/plugins/agkozak---zsh-z ]] \ + && hash -d z="$HOME/.zplugin/plugins/agkozak---zsh-z" + +# Dynamic named directories +# https://superuser.com/questions/751523/dynamic-directory-hash +if [[ -d '/c/wamp64/www' ]]; then + zsh_directory_name() { + emulate -L zsh + setopt extendedglob + + local -a match mbegin mend + local pp1=/c/wamp64/www/ + local pp2=wp-content + + if [[ $1 = d ]]; then + if [[ $2 = (#b)($pp1/)([^/]##)(/$pp2)* ]]; then + typeset -ga reply + reply=(wp-content:$match[2] $(( ${#match[1]} + ${#match[2]} + ${#match[3]} )) ) + else + return 1 + fi + elif [[ $1 = n ]]; then + [[ $2 != (#b)wp-content:(?*) ]] && return 1 + typeset -ga reply + reply=($pp1/$match[1]/$pp2) + elif [[ $1 = c ]]; then + local expl + local -a dirs + dirs=($pp1/*/$pp2) + for (( i=1; i<=$#dirs; i++ )); do + dirs[$i]=wp-content:${${dirs[$i]#$pp1/}%/$pp2} + done + _wanted dynamic-dirs expl 'user specific directory' compadd -S\] -a dirs + return + else + return 1 + fi + return 0 + } +fi + +# which should not be aliased in ZSH +alias which &> /dev/null && unalias which + +# }}}1 + +# While tinkering with ZSH-z +if (( SHLVL == 1 )); then + [[ ! -d ${HOME}/.zbackup ]] && mkdir "${HOME}/.zbackup" + cp "${HOME}/.z" "${HOME}/.zbackup/.z_${EPOCHSECONDS}" 2> /dev/null +fi + +# Compile or recompile ~/.zcompdump {{{1 + +compile_or_recompile "${HOME}/.zcompdump_${ZSH_VERSION}" + +# }}}1 + +# End .zshrc benchmark {{{1 + +if (( AGKDOT_BENCHMARKS )); then + print ".zshrc loaded in ${$(( SECONDS * 1000 ))%.*}ms total." + typeset -i SECONDS +fi + +# }}}1 + +# Source ~/.zshrc.local, if present {{{1 + +if [[ -f ${HOME}/.zshrc.local ]]; then + source "${HOME}/.zshrc.local" +fi + +# }}}1 + +# vim: ai:fdm=marker:ts=2:et:sts=2:sw=2 From b318149080d29ab95f3158313c93c1c6fef1df9a Mon Sep 17 00:00:00 2001 From: Alexandros Kozak Date: Wed, 20 Nov 2019 10:05:26 -0800 Subject: [PATCH 34/51] More vim folding markers --- agkozak/.profile | 32 ++++++++++++++++++++++++-------- agkozak/.shrc | 43 ++++++++++++++++++++++++++++++++++--------- agkozak/.zshenv | 24 ++++++++++++++++++++---- agkozak/.zshrc | 9 ++++++--- 4 files changed, 84 insertions(+), 24 deletions(-) diff --git a/agkozak/.profile b/agkozak/.profile index a94e533..3c418b4 100644 --- a/agkozak/.profile +++ b/agkozak/.profile @@ -5,9 +5,15 @@ # shellcheck shell=sh # shellcheck disable=SC2034 +# AGKDOT_SYSTEMINFO {{{1 + export AGKDOT_SYSTEMINFO AGKDOT_SYSTEMINFO=$(uname -a) +# }}}1 + +# Environment variables {{{1 + export EDITOR VISUAL if command -v vim > /dev/null 2>&1; then EDITOR='vim' @@ -31,13 +37,13 @@ case $(ls -l "$(command -v less)") in esac esac -if command -v lesspipe > /dev/null 2>&1; then - export LESSOPEN - LESSOPEN='|~/.lessfilter %s' -elif command -v lesspipe.sh > /dev/null 2>&1; then - export LESSOPEN - LESSOPEN="$(command -v lesspipe.sh) %s" -fi +# if command -v lesspipe > /dev/null 2>&1; then +# export LESSOPEN +# LESSOPEN='| ~/.lessfilter %s' +# elif command -v lesspipe.sh > /dev/null 2>&1; then +# export LESSOPEN +# LESSOPEN='| lesspipe.sh %s' +# fi if [ -f "$HOME/.lynx.cfg" ]; then export LYNX_CFG @@ -120,13 +126,23 @@ case $AGKDOT_SYSTEMINFO in ;; esac +# }}}1 + +# umask {{{1 + if [ "$(umask)" = "000" ]; then # For WSL umask 022 fi +# }}}1 + +# Source ~/.profile.local {{{1 + if [ -f "$HOME/.profile.local" ]; then # shellcheck source=/dev/null . "$HOME/.profile.local" fi -# vim: ts=2:sts=2:sw=2:ai:et +# }}}1 + +# vim: fdm=marker:ts=2:sts=2:sw=2:ai:et diff --git a/agkozak/.shrc b/agkozak/.shrc index 8fa4dc2..496fef5 100644 --- a/agkozak/.shrc +++ b/agkozak/.shrc @@ -8,19 +8,30 @@ # # shellcheck shell=sh -# Only run this script when shell is interactive +# Only run this script when shell is interactive {{{1 + case $- in *i*) ;; *) exit ;; esac +# }}}1 + +# AGKDOT_SYSTEMINFO {{{1 + export AGKDOT_SYSTEMINFO : "${AGKDOT_SYSTEMINFO:=$(uname -a)}" +# }}}1 + +# Source ~/.profile {{{1 + #shellcheck source=/dev/null [ -z "$ENV" ] && [ -f "$HOME/.profile" ] && . "$HOME/.profile" -# Begin .shrc benchmark {{{ +# }}}1 + +# Begin .shrc benchmark {{{1 _agkdot_is_busybox() { [ "${AGKDOT_IS_BUSYBOX:-0}" -eq 1 ] && return 0 @@ -47,7 +58,7 @@ if [ "${AGKDOT_BENCHMARKS:-0}" -eq 1 ]; then } fi -# }}} +# }}}1 # Raspberry Pi LXTerminal {{{1 @@ -256,6 +267,8 @@ fi # }}}1 +# Miscellaneous {{{1 + # search path for cd(1) # CDPATH=:$HOME @@ -277,13 +290,15 @@ if [ -z "$ZSH_VERSION" ]; then esac fi -# find shorthand {{{ +# }}}1 + +# find shorthand {{{1 f() { find . -name "$1" 2>&1 | grep -v 'Permission denied' } -# }}} +# }}}1 # Pull in updates from the dotfiles repo and install them {{{1 @@ -303,14 +318,16 @@ update_dotfiles() { # }}}1 -# Disable flow control -- allows use of Ctrl-Q as tmux/screen prefix -# +# Disable flow control -- allows use of Ctrl-Q as tmux/screen prefix {{{1 + # zsh might be running in ksh emulation mode if [ "$0" = 'ksh' ] || [ -z "$ZSH_VERSION" ]; then stty -ixon fi -# End .shrc benchmark {{{ +# }}}1 + +# End .shrc benchmark {{{1 if [ "${AGKDOT_BENCHMARKS:-0}" -eq 1 ]; then [ "${AGKDOT_ZSHRC_LOADING:-0}" -eq 1 ] || { @@ -329,11 +346,19 @@ fi unset AGKDOT_SHRC_START AGKDOT_SHRC_FINISH AGKDOT_DIFFERENCE -# }}} +# }}}1 + +# Source ~/.shrc.local {{{1 # shellcheck source=/dev/null if [ -f "$HOME/.shrc.local" ]; then . "$HOME/.shrc.local"; fi +# }}}1 + +# Clean up environment {{{1 + if [ -n "${AGKDOT_IS_BUSYBOX}" ]; then unset AGKDOT_IS_BUSYBOX; fi +# }}}1 + # vim: ft=sh:fdm=marker:ts=2:et:sw=2:ai:sts=2 diff --git a/agkozak/.zshenv b/agkozak/.zshenv index f759eec..109fd08 100644 --- a/agkozak/.zshenv +++ b/agkozak/.zshenv @@ -2,10 +2,14 @@ # # https://github.com/agkozak/dotfiles -# Benchmarks +# Benchmarks {{{1 + typeset -F SECONDS=0 -# if ~/.profile has not been loaded and /etc/zsh/zshenv has +# }}}1 + +# if ~/.profile has not been loaded and /etc/zsh/zshenv has {{{1 + if [[ -z $ENV ]] && [[ -n $PATH ]]; then case $- in *l*) ;; @@ -13,7 +17,10 @@ if [[ -z $ENV ]] && [[ -n $PATH ]]; then esac fi -# Add snap binary and desktop directories to environment +# }}}1 + +# Add snap binary and desktop directories to environment {{{1 + if whence -w snap &> /dev/null && [[ -f /etc/profile.d/apps-bin-path.sh ]]; then if [[ ! $PATH == */snap/bin* ]] || [[ ! $XDG_DATA_DIRS == */snapd/* ]]; then emulate sh @@ -22,9 +29,18 @@ if whence -w snap &> /dev/null && [[ -f /etc/profile.d/apps-bin-path.sh ]]; then fi fi +# }}}1 + +# source ~/.zshenv.local {{{1 + [[ -f ${HOME}/.zshenv.local ]] && source ${HOME}/.zshenv.local -# Benchmarks +# }}}1 + +# Benchmarks {{{1 + typeset -g AGKDOT_ZSHENV_BENCHMARK=${$(( SECONDS * 1000))%.*} +# }}}1 + # vim: ai:fdm=marker:ts=2:et:sts=2:sw=2 diff --git a/agkozak/.zshrc b/agkozak/.zshrc index b1c2ade..a815a79 100644 --- a/agkozak/.zshrc +++ b/agkozak/.zshrc @@ -4,13 +4,16 @@ # # shellcheck disable=SC1090,SC2034,SC2128,SC2148,SC2154 -# If zsh is emulating another shell +# If zsh is emulating another shell {{{1 + if [[ $0 == 'ksh' ]] || [[ $0 == 'sh' ]]; then source "$HOME/.shrc" && exit elif [[ $0 == 'bash' ]]; then source "$HOME/.bashrc" && exit fi +# }}}1 + # Begin .zshrc benchmarks {{{1 # To run zprof, execute @@ -531,14 +534,14 @@ fi # which should not be aliased in ZSH alias which &> /dev/null && unalias which -# }}}1 - # While tinkering with ZSH-z if (( SHLVL == 1 )); then [[ ! -d ${HOME}/.zbackup ]] && mkdir "${HOME}/.zbackup" cp "${HOME}/.z" "${HOME}/.zbackup/.z_${EPOCHSECONDS}" 2> /dev/null fi +# }}}1 + # Compile or recompile ~/.zcompdump {{{1 compile_or_recompile "${HOME}/.zcompdump_${ZSH_VERSION}" From 35b4d75715575de1c981e7bc94824bc2c570946a Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 21 Jan 2020 22:12:37 +0100 Subject: [PATCH 35/51] =?UTF-8?q?Zplugin=20=E2=86=92=20Zinit=20rename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 00dani/zshrc.zsh | 46 +++---- Dockerfile | 6 +- NICHOLAS85/.zshrc | 38 +++--- README.md | 63 ++++++---- jubi/.zshrc | 48 ++++---- .../.zsh/{zplugin.zsh => zinit.zsh} | 34 +++--- lainiwa/1st_config/.zshrc | 2 +- .../.zsh/{zplugin.zsh => zinit.zsh} | 34 +++--- lainiwa/2nd_config/.zshrc | 2 +- psprint/zshrc.zsh | 112 +++++++++--------- 10 files changed, 201 insertions(+), 184 deletions(-) rename lainiwa/1st_config/.zsh/{zplugin.zsh => zinit.zsh} (86%) rename lainiwa/2nd_config/.zsh/{zplugin.zsh => zinit.zsh} (86%) diff --git a/00dani/zshrc.zsh b/00dani/zshrc.zsh index 73c5675..49d743c 100644 --- a/00dani/zshrc.zsh +++ b/00dani/zshrc.zsh @@ -2,35 +2,35 @@ export XDG_CACHE_HOME=${XDG_CACHE_HOME:=~/.cache} -typeset -A ZPLGM -ZPLG_HOME=$XDG_CACHE_HOME/zsh/zplugin -ZPLGM[HOME_DIR]=$ZPLG_HOME -ZPLGM[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump - -if [[ ! -f $ZPLG_HOME/bin/zplugin.zsh ]]; then - git clone https://github.com/psprint/zplugin $ZPLG_HOME/bin - zcompile $ZPLG_HOME/bin/zplugin.zsh +typeset -A ZINIT +ZINIT_HOME=$XDG_CACHE_HOME/zsh/zinit +ZINIT[HOME_DIR]=$ZINIT_HOME +ZINIT[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump + +if [[ ! -f $ZINIT_HOME/bin/zinit.zsh ]]; then + git clone https://github.com/psprint/zinit $ZINIT_HOME/bin + zcompile $ZINIT_HOME/bin/zinit.zsh fi -source $ZPLG_HOME/bin/zplugin.zsh +source $ZINIT_HOME/bin/zinit.zsh load=light -zplugin $load willghatch/zsh-saneopt +zinit $load willghatch/zsh-saneopt -zplugin $load mafredri/zsh-async -zplugin $load rupa/z -zplugin $load sindresorhus/pure +zinit $load mafredri/zsh-async +zinit $load rupa/z +zinit $load sindresorhus/pure -zplugin ice nocompile:! pick:c.zsh atpull:%atclone atclone:'dircolors -b LS_COLORS > c.zsh' -zplugin $load trapd00r/LS_COLORS +zinit ice nocompile:! pick:c.zsh atpull:%atclone atclone:'dircolors -b LS_COLORS > c.zsh' +zinit $load trapd00r/LS_COLORS -zplugin ice silent wait:1 atload:_zsh_autosuggest_start -zplugin $load zsh-users/zsh-autosuggestions +zinit ice silent wait:1 atload:_zsh_autosuggest_start +zinit $load zsh-users/zsh-autosuggestions -zplugin ice blockf; zplugin $load zsh-users/zsh-completions +zinit ice blockf; zinit $load zsh-users/zsh-completions -zplugin ice silent wait:1; zplugin $load mollifier/cd-gitroot -zplugin ice silent wait:1; zplugin $load micha/resty -zplugin ice silent wait:1; zplugin $load supercrabtree/k +zinit ice silent wait:1; zinit $load mollifier/cd-gitroot +zinit ice silent wait:1; zinit $load micha/resty +zinit ice silent wait:1; zinit $load supercrabtree/k -zplugin ice silent wait!1 atload"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit" -zplugin $load zdharma/fast-syntax-highlighting +zinit ice silent wait!1 atload"ZINIT[COMPINIT_OPTS]=-C; zpcompinit" +zinit $load zdharma/fast-syntax-highlighting diff --git a/Dockerfile b/Dockerfile index 5dcf589..d03050d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,8 @@ RUN adduser --disabled-password --gecos '' user && \ usermod --shell /bin/zsh user USER user -# Install zplugin -RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)" +# Install zinit +RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" # Copy configs into home directory ARG FOLDER @@ -44,7 +44,7 @@ RUN if [ -f /home/user/bootstrap.sh ]; then \ # Install all plugins ARG TERM ENV TERM ${TERM} -RUN SHELL=/bin/zsh zsh -i -c -- 'zplugin module build; -zplg-scheduler burst || true ' +RUN SHELL=/bin/zsh zsh -i -c -- 'zinit module build; @zinit-scheduler burst || true ' CMD zsh -i -l diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index e48dd60..e7f675b 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -1,33 +1,33 @@ # https://github.com/NICHOLAS85/dotfiles/blob/xps_13_9365/.zshrc -# Install zplugin if not installed -if [ ! -d "${HOME}/.zplugin" ]; then - sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)" +# Install zinit if not installed +if [ ! -d "${HOME}/.zinit" ]; then + sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" fi -module_path+=( "/home/nicholas/.zplugin/bin/zmodules/Src" ) -zmodload zdharma/zplugin +module_path+=( "/home/nicholas/.zinit/bin/zmodules/Src" ) +zmodload zdharma/zplugin &>/dev/null -### Added by Zplugin's installer -source "${HOME}/.zplugin/bin/zplugin.zsh" -autoload -Uz _zplugin -(( ${+_comps} )) && _comps[zplugin]=_zplugin -### End of Zplugin's installer chunk +### Added by Zinit's installer +source "${HOME}/.zinit/bin/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit +### End of Zinit's installer chunk -if [[ ! -d "${ZPLGM[PLUGINS_DIR]}/_local---config-files" ]]; then +if [[ ! -d "${ZINIT[PLUGINS_DIR]}/_local---config-files" ]]; then curl https://codeload.github.com/NICHOLAS85/dotfiles/tar.gz/xps_13_9365 | \ - tar -xz --strip=3 dotfiles-xps_13_9365/.zplugin/plugins/_local---config-files - mv _local---config-files "${ZPLGM[PLUGINS_DIR]}/" + tar -xz --strip=3 dotfiles-xps_13_9365/.zinit/plugins/_local---config-files + mv _local---config-files "${ZINIT[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'1' 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() { zplugin depth'1' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } -zct() { -zplg-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" \ +zt() { zinit depth'1' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } +zct() { .zinit-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" \ atinit'[ -f "${thmf}/${MYPROMPT}-pre" ] && source "${thmf}/${MYPROMPT}-pre"' \ atload'![ -f "${thmf}/${MYPROMPT}-post" ] && source "${thmf}/${MYPROMPT}-post"'; \ - ZPLG_ICE+=( "${(kv)ZPLG_ICES[@]}"); } + ZINIT_ICE+=( "${(kv)ZINIT_ICES[@]}"); } ################## # Initial Prompt # @@ -48,7 +48,7 @@ zt for \ # Annexes # ########### -zt light-mode for zplugin/z-a-patch-dl +zt light-mode for zinit/z-a-patch-dl ############################ # Conditional themes block # @@ -84,7 +84,7 @@ zt 0a light-mode for \ \ as'program' pick'bin/git-dsf' zdharma/zsh-diff-so-fancy \ \ - blockf atpull'zplugin creinstall -q "$PWD"' zsh-users/zsh-completions \ + blockf atpull'zinit creinstall -q "$PWD"' zsh-users/zsh-completions \ \ compile'{src/*.zsh,src/strategies/*}' atload'_zsh_autosuggest_start' zsh-users/zsh-autosuggestions @@ -142,7 +142,7 @@ zt light-mode for \ \ trigger-load'!updatelocal' blockf NICHOLAS85/updatelocal \ \ - trigger-load'!gencomp' pick'zsh-completion-generator.plugin.zsh' atload'zplugin creinstall -q "$PWD"' \ + trigger-load'!gencomp' pick'zsh-completion-generator.plugin.zsh' atload'zinit creinstall -q "$PWD"' \ RobSis/zsh-completion-generator $isdolphin || dotscheck diff --git a/README.md b/README.md index 032914d..6e4514f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -- [zplugin-configs](#zplugin-configs) +- [zinit-configs](#zinit-configs) - [Pull-requests welcomed!](#pull-requests-welcomed) - [Searching the repository](#searching-the-repository) - [OR ...](#or-) @@ -14,20 +14,23 @@ -# zplugin-configs +# zinit-configs +

Pull-requests welcomed!

-Feel free to submit your zshrc if it contains `zplugin` commands (or just the section with the commands extracted). +Feel free to submit your zshrc if it contains `zinit` commands. # Searching the repository -Use the Github search interface – just enter a query e.g. "trapd00r/LS_COLORS" like in the picture below, to find zshrc with references to this plugin, and ensure that you activate the "*in this repository*" variant of the search: +Use the Github search interface – just enter a query e.g. "trapd00r/LS_COLORS" +like in the picture below, to find zshrc with references to this plugin, and +ensure that you activate the "*in this repository*" variant of the search: -![Starting search](https://raw.githubusercontent.com/zdharma/zplugin-configs/img/srch.png) +![Starting search](https://raw.githubusercontent.com/zdharma/zinit-configs/img/srch.png) Then, results should appear like below: -![Search results](https://raw.githubusercontent.com/zdharma/zplugin-configs/img/srch-rslt.png) +![Search results](https://raw.githubusercontent.com/zdharma/zinit-configs/img/srch-rslt.png) ## OR ... @@ -38,54 +41,68 @@ just clone the repository and issue `ack`, `ag` or `grep` command :) You can either: - open a PR – fastest method - - submit an issue with URL to the zshrc (or with the zshrc pasted) – [a quick link](https://github.com/zdharma/zplugin-configs/issues/new?assignees=&labels=&template=request-to-add-zshrc-to-the-zplugin-configs-repo.md) + - submit an issue with URL to the zshrc (or with the zshrc pasted) – [a quick + link](https://github.com/zdharma/zinit-configs/issues/new?assignees=&labels=&template=request-to-add-zshrc-to-the-zinit-configs-repo.md) # The repository structure -The structure of the repository is very simple: in its main directory there are directories located, named after the user-names of the submitting users. In those directories there are the zshrc files that the user decided to share. +The structure of the repository is very simple: in its main directory there are +directories located, named after the user-names of the submitting users. In +those directories there are the zshrc files that the user decided to share. # Try configurations with docker ## Requirements -You should have [docker](https://docs.docker.com/install/) and `zsh` installed to use this functionality. -Check you have them present on your system: +You should have [docker](https://docs.docker.com/install/) and `zsh` installed +to use this functionality. Check you have them present on your system: + ```sh docker version zsh --version ``` -The other dependency is interactive filter. You should have either [fzf](https://github.com/junegunn/fzf) or [fzy](https://github.com/jhawthorn/fzy) in your `$PATH`. -You might choose to install any of them via zplugin: +The other dependency is interactive filter. You should have either +[fzf](https://github.com/junegunn/fzf) or +[fzy](https://github.com/jhawthorn/fzy) in your `$PATH`. You might choose to +install any of them via zinit: + ```sh # Install fzf -zplugin ice from"gh-r" as"command" -zplugin load junegunn/fzf-bin +zinit ice from"gh-r" as"command" +zinit load junegunn/fzf-bin # or fzy -zplugin ice as"command" make"\!PREFIX=$ZPFX install" \ +zinit ice as"command" make"\!PREFIX=$ZPFX install" \ atclone"cp contrib/fzy-* $ZPFX/bin/" \ pick"$ZPFX/bin/fzy*" -zplugin load jhawthorn/fzy +zinit load jhawthorn/fzy ``` Keep in mind you will need a few Gb of free space to store docker images. ## Running a configuration -To try a configuration, you have to clone this repository and execute a `run.sh` script: +To try a configuration, you have to clone this repository and execute a `run.sh` +script: + ```sh # Clone repository with configurations -git clone 'https://github.com/zdharma/zplugin-configs' +git clone 'https://github.com/zdharma/zinit-configs' # Run the configuration picker -./zplugin-configs/run.sh +./zinit-configs/run.sh ``` -... or you can install this repository as a `zsh` plugin! +… or you can install this repository as a `zsh` plugin! + ```sh # Then, install this repo -zplugin load zdharma/zplugin-configs +zinit load zdharma/zinit-configs # Run the command -zplugin-configs +zinit-configs ``` -Now you will have to wait for a few minutes, while the required environment is being installed into the docker image. The next time you will want to try a configuration, loading it will take less time. +Now you will have to wait for a few minutes, while the required environment is +being installed into the docker image. The next time you will want to try +a configuration, loading it will take less time. + + diff --git a/jubi/.zshrc b/jubi/.zshrc index 7fe6f09..aaf1918 100644 --- a/jubi/.zshrc +++ b/jubi/.zshrc @@ -1,27 +1,27 @@ -### Added by Zplugin's installer -source ~/.zplugin/bin/zplugin.zsh -autoload -Uz _zplugin -(( ${+_comps} )) && _comps[zplugin]=_zplugin -### End of Zplugin installer's chunk +### Added by Zinit's installer +source ~/.zinit/bin/zinit.zsh +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit +### End of Zinit installer's chunk -##### BEGIN Zplugin stuff ##### -### needs: zplugin, fzf +##### BEGIN Zinit stuff ##### +### needs: zinit, fzf # z -zplugin ice wait blockf lucid -zplugin light rupa/z +zinit ice wait blockf lucid +zinit light rupa/z # z tab completion -zplugin ice wait lucid -zplugin light changyuheng/fz +zinit ice wait lucid +zinit light changyuheng/fz # z / fzf (ctrl-g) -zplugin ice wait lucid -zplugin light andrewferrier/fzf-z +zinit ice wait lucid +zinit light andrewferrier/fzf-z # cd -zplugin ice wait lucid -zplugin light changyuheng/zsh-interactive-cd +zinit ice wait lucid +zinit 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 -zplugin ice wait lucid atload'__bind_history_keys' -zplugin light zsh-users/zsh-history-substring-search +zinit ice wait lucid atload'__bind_history_keys' +zinit light zsh-users/zsh-history-substring-search # autosuggestions, trigger precmd hook upon load -zplugin ice wait lucid atload'_zsh_autosuggest_start' -zplugin light zsh-users/zsh-autosuggestions +zinit ice wait lucid atload'_zsh_autosuggest_start' +zinit light zsh-users/zsh-autosuggestions export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=10 # Tab completions -zplugin ice wait lucid blockf atpull'zplugin creinstall -q .' -zplugin light zsh-users/zsh-completions +zinit ice wait lucid blockf atpull'zinit creinstall -q .' +zinit light zsh-users/zsh-completions # Syntax highlighting -zplugin ice wait lucid atinit'zpcompinit; zpcdreplay' -zplugin light zdharma/fast-syntax-highlighting +zinit ice wait lucid atinit'zpcompinit; zpcdreplay' +zinit light zdharma/fast-syntax-highlighting -##### END Zplugin stuff ##### +##### END Zinit stuff ##### diff --git a/lainiwa/1st_config/.zsh/zplugin.zsh b/lainiwa/1st_config/.zsh/zinit.zsh similarity index 86% rename from lainiwa/1st_config/.zsh/zplugin.zsh rename to lainiwa/1st_config/.zsh/zinit.zsh index 4e49849..c2916a6 100644 --- a/lainiwa/1st_config/.zsh/zplugin.zsh +++ b/lainiwa/1st_config/.zsh/zinit.zsh @@ -1,29 +1,29 @@ ################################################################# -# INSTALL `zplugin` AND LOAD IT +# INSTALL `zinit` AND LOAD IT # -# Install `zplugin` if not installed -if [ ! -d "${HOME}/.zplugin" ]; then - sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)" +# Install `zinit` if not installed +if [ ! -d "${HOME}/.zinit" ]; then + sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" fi -# Load `zplugin` -source "${HOME}/.zplugin/bin/zplugin.zsh" -autoload -Uz _zplugin -(( ${+_comps} )) && _comps[zplugin]=_zplugin +# Load `zinit` +source "${HOME}/.zinit/bin/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit ################################################################# # FUNCTIONS TO MAKE CONFIGURATION LESS VERBOSE # -turbo0() { zplugin ice wait"0a" lucid "${@}"; } -turbo1() { zplugin ice wait"0b" lucid "${@}"; } -turbo2() { zplugin ice wait"0c" lucid "${@}"; } -zcommand() { zplugin ice wait"0b" lucid as"command" "${@}"; } -zload() { zplugin load "${@}"; } -zsnippet() { zplugin snippet "${@}"; } +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 "${@}"; } ################################################################# @@ -115,7 +115,7 @@ zcommand from"gh-r" mv'tl-* -> tl' if'[[ -n $DISPLAY ]]' # INSTALL `k` COMMAND AND GENERATE COMPLITIONS # turbo0; zload RobSis/zsh-completion-generator -turbo1 atclone"gencomp k; ZPLGM[COMPINIT_OPTS]='-i' zpcompinit" atpull'%atclone' +turbo1 atclone"gencomp k; ZINIT[COMPINIT_OPTS]='-i' zpcompinit" atpull'%atclone' zload supercrabtree/k alias l='k -h' @@ -151,7 +151,7 @@ export GITCD_HOME=${HOME}/tmp # Install completions for `my` script and for python-gist # (use `-f` flag to force completion installation) -zplugin ice as"completion" if"[ -f '${HOME}/.zsh/completions/_my' ]" id-as"my"; +zinit 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"; @@ -171,7 +171,7 @@ turbo1; zload zdharma/history-search-multi-word # Syntax highlighting # (compinit without `-i` spawns warning on `sudo -s`) -turbo0 atinit"ZPLGM[COMPINIT_OPTS]='-i' zpcompinit; zpcdreplay" +turbo0 atinit"ZINIT[COMPINIT_OPTS]='-i' zpcompinit; zpcdreplay" zload zdharma/fast-syntax-highlighting # Autosuggestions diff --git a/lainiwa/1st_config/.zshrc b/lainiwa/1st_config/.zshrc index 79023a3..6e71297 100644 --- a/lainiwa/1st_config/.zshrc +++ b/lainiwa/1st_config/.zshrc @@ -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/zplugin.zsh" \ + "${HOME}/.zsh/zinit.zsh" \ "${HOME}/.zsh/completions.zsh" \ "${HOME}/.zsh/other/command-not-found.zsh" \ "${HOME}/.local/bin/virtualenvwrapper_lazy.sh" diff --git a/lainiwa/2nd_config/.zsh/zplugin.zsh b/lainiwa/2nd_config/.zsh/zinit.zsh similarity index 86% rename from lainiwa/2nd_config/.zsh/zplugin.zsh rename to lainiwa/2nd_config/.zsh/zinit.zsh index 4e49849..c2916a6 100644 --- a/lainiwa/2nd_config/.zsh/zplugin.zsh +++ b/lainiwa/2nd_config/.zsh/zinit.zsh @@ -1,29 +1,29 @@ ################################################################# -# INSTALL `zplugin` AND LOAD IT +# INSTALL `zinit` AND LOAD IT # -# Install `zplugin` if not installed -if [ ! -d "${HOME}/.zplugin" ]; then - sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)" +# Install `zinit` if not installed +if [ ! -d "${HOME}/.zinit" ]; then + sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" fi -# Load `zplugin` -source "${HOME}/.zplugin/bin/zplugin.zsh" -autoload -Uz _zplugin -(( ${+_comps} )) && _comps[zplugin]=_zplugin +# Load `zinit` +source "${HOME}/.zinit/bin/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit ################################################################# # FUNCTIONS TO MAKE CONFIGURATION LESS VERBOSE # -turbo0() { zplugin ice wait"0a" lucid "${@}"; } -turbo1() { zplugin ice wait"0b" lucid "${@}"; } -turbo2() { zplugin ice wait"0c" lucid "${@}"; } -zcommand() { zplugin ice wait"0b" lucid as"command" "${@}"; } -zload() { zplugin load "${@}"; } -zsnippet() { zplugin snippet "${@}"; } +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 "${@}"; } ################################################################# @@ -115,7 +115,7 @@ zcommand from"gh-r" mv'tl-* -> tl' if'[[ -n $DISPLAY ]]' # INSTALL `k` COMMAND AND GENERATE COMPLITIONS # turbo0; zload RobSis/zsh-completion-generator -turbo1 atclone"gencomp k; ZPLGM[COMPINIT_OPTS]='-i' zpcompinit" atpull'%atclone' +turbo1 atclone"gencomp k; ZINIT[COMPINIT_OPTS]='-i' zpcompinit" atpull'%atclone' zload supercrabtree/k alias l='k -h' @@ -151,7 +151,7 @@ export GITCD_HOME=${HOME}/tmp # Install completions for `my` script and for python-gist # (use `-f` flag to force completion installation) -zplugin ice as"completion" if"[ -f '${HOME}/.zsh/completions/_my' ]" id-as"my"; +zinit 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"; @@ -171,7 +171,7 @@ turbo1; zload zdharma/history-search-multi-word # Syntax highlighting # (compinit without `-i` spawns warning on `sudo -s`) -turbo0 atinit"ZPLGM[COMPINIT_OPTS]='-i' zpcompinit; zpcdreplay" +turbo0 atinit"ZINIT[COMPINIT_OPTS]='-i' zpcompinit; zpcdreplay" zload zdharma/fast-syntax-highlighting # Autosuggestions diff --git a/lainiwa/2nd_config/.zshrc b/lainiwa/2nd_config/.zshrc index 79023a3..6e71297 100644 --- a/lainiwa/2nd_config/.zshrc +++ b/lainiwa/2nd_config/.zshrc @@ -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/zplugin.zsh" \ + "${HOME}/.zsh/zinit.zsh" \ "${HOME}/.zsh/completions.zsh" \ "${HOME}/.zsh/other/command-not-found.zsh" \ "${HOME}/.local/bin/virtualenvwrapper_lazy.sh" diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index eaeaf3a..ecd804b 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -7,7 +7,7 @@ fi # Exports # -module_path+=("$HOME/.zplugin/bin/zmodules/Src"); zmodload zdharma/zplugin +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} @@ -256,27 +256,27 @@ zflai-msg "[zshrc] ssl tunnel PID: $!" typeset -F4 SECONDS=0 -[[ ! -f ~/.zplugin/bin/zplugin.zsh ]] && { - command mkdir -p ~/.zplugin - command git clone https://github.com/zdharma/zplugin ~/.zplugin/bin +[[ ! -f ~/.zinit/bin/zinit.zsh ]] && { + command mkdir -p ~/.zinit + command git clone https://github.com/zdharma/zinit ~/.zinit/bin } -source "$HOME/.zplugin/bin/zplugin.zsh" -autoload -Uz _zplugin -(( ${+_comps} )) && _comps[zplugin]=_zplugin +source "$HOME/.zinit/bin/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit # Zplugin annexes -# zplugin/z-a-man \ -zplugin light-mode for \ - zplugin/z-a-test \ - zplugin/z-a-patch-dl \ - zplugin/z-a-submods \ - zplugin/z-a-bin-gem-node \ - zplugin/z-a-rust +# zinit-zsh/z-a-man \ +zinit light-mode for \ + zinit-zsh/z-a-test \ + zinit-zsh/z-a-patch-dl \ + zinit-zsh/z-a-submods \ + zinit-zsh/z-a-bin-gem-node \ + zinit-zsh/z-a-rust # Fast-syntax-highlighting & autosuggestions -zplugin wait lucid for \ - atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" \ +zinit wait lucid for \ + atinit"ZINIT[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" \ zdharma/fast-syntax-highlighting \ atload"!_zsh_autosuggest_start" \ zsh-users/zsh-autosuggestions \ @@ -285,14 +285,14 @@ zplugin wait lucid for \ # 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) -zplugin wait lucid for \ +zinit wait lucid for \ zdharma/zsh-unique-id \ OMZ::lib/git.zsh \ atload"unalias grv g" \ OMZ::plugins/git/git.plugin.zsh # Theme no. 1 - zprompts -zplugin lucid \ +zinit lucid \ load'![[ $MYPROMPT = 1 ]]' \ unload'![[ $MYPROMPT != 1 ]]' \ atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3 yellow red green blue' \ @@ -300,58 +300,58 @@ zplugin lucid \ psprint/zprompts # Theme no. 2 – lambda-mod-zsh-theme -zplugin lucid load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' nocd for \ +zinit lucid load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' nocd for \ halfo/lambda-mod-zsh-theme # Theme no. 3 – lambda-gitster -zplugin lucid load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' nocd for \ +zinit lucid load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' nocd for \ ergenekonyigit/lambda-gitster # Theme no. 4 – geometry -zplugin lucid load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ +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 # Theme no. 5 – pure -zplugin lucid load'![[ $MYPROMPT = 5 ]]' unload'![[ $MYPROMPT != 5 ]]' \ +zinit 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 -zplugin lucid load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' \ +zinit 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 -zplugin load'![[ $MYPROMPT = 7 ]]' unload'![[ $MYPROMPT != 7 ]]' \ +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 # Theme no. 8 - powerlevel10k -zplugin load'![[ $MYPROMPT = 8 ]]' unload'![[ $MYPROMPT != 8 ]]' \ +zinit load'![[ $MYPROMPT = 8 ]]' unload'![[ $MYPROMPT != 8 ]]' \ atload'!source ~/.p10k.zsh; _p9k_precmd' lucid nocd for \ romkatv/powerlevel10k # Theme no. 9 - git-prompt -zplugin lucid load'![[ $MYPROMPT = 9 ]]' unload'![[ $MYPROMPT != 9 ]]' \ +zinit lucid load'![[ $MYPROMPT = 9 ]]' unload'![[ $MYPROMPT != 9 ]]' \ atload'!_zsh_git_prompt_precmd_hook' nocd for \ woefe/git-prompt.zsh # zunit, color -zplugin wait"2" lucid as"null" for \ +zinit wait"2" lucid as"null" for \ sbin atclone"./build.zsh" atpull"%atclone" \ molovo/zunit \ sbin"color.zsh -> color" \ molovo/color # revolver -zplugin wait"2" lucid as"program" pick"revolver" for psprint/revolver +zinit wait"2" lucid as"program" pick"revolver" for psprint/revolver # On OSX, you might need to install coreutils from homebrew and use the # g-prefix – gsed, gdircolors -: zplugin wait"0c" lucid reset \ +: zinit wait"0c" lucid reset \ atclone"local P=${${(M)OSTYPE:#*darwin*}:+g} \${P}sed -i \ '/DIR/c\DIR 38;5;63;1' LS_COLORS; \ @@ -360,50 +360,50 @@ zplugin wait"2" lucid as"program" pick"revolver" for psprint/revolver atload'zstyle ":completion:*:default" list-colors "${(s.:.)LS_COLORS}";' for \ trapd00r/LS_COLORS -zplugin wait"0c" lucid \ +zinit wait"0c" lucid \ atload'zstyle ":completion:*" list-colors "${(s.:.)LS_COLORS}";' for \ zpm-zsh/dircolors-material # Zconvey shell integration plugin -zplugin wait lucid \ +zinit wait lucid \ sbin"cmds/zc-bg-notify"sbin"cmds/plg-zsh-notify" for \ zdharma/zconvey # zsh-startify, a vim-startify like plugin -: zplugin wait"0b" lucid atload"zsh-startify" for zdharma/zsh-startify -: zplugin wait lucid pick"manydots-magic" compile"manydots-magic" for knu/zsh-manydots-magic +: 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 # fzy -zplugin wait"1" lucid as"program" pick"$ZPFX/bin/fzy*" \ +zinit wait"1" lucid as"program" pick"$ZPFX/bin/fzy*" \ atclone"cp contrib/fzy-* $ZPFX/bin/" \ make"!PREFIX=$ZPFX install" for \ jhawthorn/fzy # remark -zplugin wait'1c' lucid id-as'remark' \ +zinit wait'1c' lucid id-as'remark' \ sbin'n:node_modules/.bin/remark' \ node'remark <- !remark-cli; remark-man' for \ zdharma/null # zsh-autopair # fzf-marks, at slot 0, for quick Ctrl-G accessibility -zplugin wait lucid for \ +zinit wait lucid for \ hlissner/zsh-autopair \ urbainvaes/fzf-marks # hiredis library needed for zredis plugin -zplugin wait"1" lucid make"PREFIX=$ZPFX all install" pick"/dev/null" for \ +zinit wait"1" lucid make"PREFIX=$ZPFX all install" pick"/dev/null" for \ redis/hiredis # zredis together with some binding/tying zstyle ":plugin:zredis" configure_opts "--without-tcsetpgrp" zstyle ":plugin:zredis" cflags "-Wall -O2 -g -Wno-unused-but-set-variable" -zplugin wait"1" lucid \ +zinit wait"1" lucid \ atload'ztie -d db/redis -a 127.0.0.1:4815/5 -zSL main rdhash' for \ zdharma/zredis # A few wait"1 plugins -zplugin wait"1" lucid for \ +zinit wait"1" lucid for \ zdharma/zredis-cmd \ service"redis" \ zservices/redis \ @@ -414,60 +414,60 @@ zplugin wait"1" lucid for \ psprint/zsh-editing-workbench # Github-Issue-Tracker – the notifier thread -zplugin lucid id-as"GitHub-notify" \ +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 # Github-Issue-Tracker – the issue-puller thread GIT_SLEEP_TIME=700 -GIT_PROJECTS=zdharma/zsh-github-issues:zdharma/zplugin +GIT_PROJECTS=zdharma/zsh-github-issues:zdharma/zinit -zplugin wait"2" lucid service"GIT" \ +zinit wait"2" lucid service"GIT" \ pick"zsh-github-issues.service.zsh" for \ zdharma/zsh-github-issues # Gitignore plugin – commands gii and gi -zplugin wait"2" lucid trigger-load'!gi;!gii' \ +zinit wait"2" lucid trigger-load'!gi;!gii' \ dl'https://gist.githubusercontent.com/psprint/1f4d0a3cb89d68d3256615f247e2aac9/raw -> templates/Zsh.gitignore' \ for \ voronkovich/gitignore.plugin.zsh # F-Sy-H automatic themes – available for patrons # https://patreon.com/psprint -: zplugin wait"1" lucid from"psprint@gitlab.com" for psprint/fsh-auto-themes +: zinit wait"1" lucid from"psprint@gitlab.com" for psprint/fsh-auto-themes # ogham/exa, sharkdp/fd, fzf -zplugin wait"2" lucid as"null" from"gh-r" for \ +zinit wait"2" lucid as"null" from"gh-r" for \ mv"exa* -> exa" sbin ogham/exa \ mv"fd* -> fd" sbin"fd/fd" @sharkdp/fd \ sbin junegunn/fzf-bin # vramsteg -zplugin wait"2" lucid as"null" sbin"src/vramsteg" \ +zinit wait"2" lucid as"null" sbin"src/vramsteg" \ atclone'cmake .' atpull'%atclone' make for \ psprint/vramsteg-zsh # A few wait'2' plugins -zplugin wait"2" lucid for \ +zinit wait"2" lucid for \ zdharma/declare-zsh \ zdharma/zflai \ blockf \ zdharma/zui \ - zplugin/zplugin-console \ + zinit/zinit-console \ trigger-load'!crasis' \ - zdharma/zplugin-crasis \ + zdharma/zinit-crasis \ atinit"forgit_ignore='fgi'" \ wfxr/forgit # git-cal -zplugin wait"2" lucid as"null" \ +zinit 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 -zplugin as"null" wait"3" lucid for \ +zinit as"null" wait"3" lucid for \ sbin Fakerr/git-recall \ sbin paulirish/git-open \ sbin paulirish/git-recent \ @@ -480,7 +480,7 @@ zplugin as"null" wait"3" lucid for \ sbin"git-url;git-guclone" make"GITURL_NO_CGITURL=1" zdharma/git-url # fbterm -: zplugin wait"3" lucid as"command" \ +: 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" \ @@ -491,7 +491,7 @@ zplugin as"null" wait"3" lucid for \ izmntuk/fbterm # asciinema -: zplugin wait lucid as"command" \ +: 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" \ @@ -500,7 +500,7 @@ zplugin as"null" wait"3" lucid for \ asciinema/asciinema # Notifications, configured to use zconvey -: zplugin wait lucid for marzocchi/zsh-notify +: zinit wait lucid for marzocchi/zsh-notify zflai-msg "[zshrc] Zplugin block took ${(M)$(( SECONDS * 1000 ))#*.?} ms" @@ -508,8 +508,8 @@ zflai-msg "[zshrc] Zplugin block took ${(M)$(( SECONDS * 1000 ))#*.?} ms" MYPROMPT=8 # Load within zshrc – for the instant prompt -zplugin atload'!source ~/.p10k.zsh' lucid nocd -zplugin load romkatv/powerlevel10k +zinit atload'!source ~/.p10k.zsh' lucid nocd +zinit load romkatv/powerlevel10k # # Zstyles & other From 4d62e6b34c7ea1738f2100d377488ce6cc21d10c Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 21 Jan 2020 22:16:28 +0100 Subject: [PATCH 36/51] =?UTF-8?q?Zplugin=20=E2=86=92=20Zinit=20rename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agkozak/.zshrc | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/agkozak/.zshrc b/agkozak/.zshrc index a815a79..306f0d0 100644 --- a/agkozak/.zshrc +++ b/agkozak/.zshrc @@ -269,33 +269,33 @@ fi # }}}1 -# zplugin {{{1 +# zinit {{{1 if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then # Optional binary module - if [[ -f "$HOME/.zplugin/bin/zmodules/Src/zdharma/zplugin.so" ]]; then - module_path+=( "$HOME/.zplugin/bin/zmodules/Src" ) + if [[ -f "$HOME/.zinit/bin/zmodules/Src/zdharma/zplugin.so" ]]; then + module_path+=( "$HOME/.zinit/bin/zmodules/Src" ) zmodload zdharma/zplugin fi if whence -w git &> /dev/null; then - if [[ ! -d ${HOME}/.zplugin/bin ]]; then - print 'Installing zplugin...' - mkdir -p "${HOME}/.zplugin" - git clone https://github.com/zdharma/zplugin.git "${HOME}/.zplugin/bin" - compile_or_recompile "${HOME}/.zplugin/bin/zplugin.zsh" + 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" fi # Configuration hash - typeset -A ZPLGM + typeset -A ZINIT # Location of .zcompdump file - ZPLGM[ZCOMPDUMP_PATH]="${HOME}/.zcompdump_${ZSH_VERSION}" + ZINIT[ZCOMPDUMP_PATH]="${HOME}/.zcompdump_${ZSH_VERSION}" - # zplugin and its plugins and snippets - source "${HOME}/.zplugin/bin/zplugin.zsh" + # zinit and its plugins and snippets + source "${HOME}/.zinit/bin/zinit.zsh" # Load plugins and snippets {{{2 @@ -305,12 +305,12 @@ if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then # AGKOZAK_MULTILINE=0 # AGKOZAK_PROMPT_CHAR=( '❯' '❯' '❮' ) # AGKOZAK_PROMPT_DEBUG=1 - zplugin ver"develop" for agkozak/agkozak-zsh-prompt + zinit ver"develop" for agkozak/agkozak-zsh-prompt - # zplugin light agkozak/polyglot + # zinit light agkozak/polyglot # if which kubectl &> /dev/null; then - # zplugin light jonmosco/kube-ps1 - # zplugin light agkozak/polyglot-kube-ps1 + # zinit light jonmosco/kube-ps1 + # zinit light agkozak/polyglot-kube-ps1 # fi # agkozak/zsh-z @@ -318,23 +318,23 @@ if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then ZSHZ_DEBUG=1 [[ $OSTYPE == freebsd* ]] && typeset -g ZSHZ_NO_RESOLVE_SYMLINKS=1 - zplugin ver"develop" lucid wait for \ + zinit 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 - zplugin lucid wait for jreese/zsh-titles + zinit lucid wait for jreese/zsh-titles fi if [[ $AGKDOT_SYSTEMINFO != *ish* ]]; then - zplugin lucid wait for zdharma/zui - zplugin lucid wait'1' for zdharma/zbrowse + zinit lucid wait for zdharma/zui + zinit lucid wait'1' for zdharma/zbrowse fi - zplugin snippet OMZ::plugins/extract/extract.plugin.zsh + zinit snippet OMZ::plugins/extract/extract.plugin.zsh - zplugin lucid wait for zsh-users/zsh-history-substring-search + zinit 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 +348,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 - zplugin ice \ + zinit ice \ atload'unset "FAST_HIGHLIGHT[chroma-git]"; fast-theme free &> /dev/null' \ lucid wait else - zplugin ice atload'fast-theme free &> /dev/null' lucid wait + zinit ice atload'fast-theme free &> /dev/null' lucid wait fi - zplugin load zdharma/fast-syntax-highlighting + zinit load zdharma/fast-syntax-highlighting else print 'Please install git.' @@ -380,7 +380,7 @@ fi autoload -Uz compinit compinit -u -d "${HOME}/.zcompdump_${ZSH_VERSION}" -(( ! AGKDOT_NO_ZPLUGIN )) && is-at-least 5 && zplugin cdreplay -q +(( ! AGKDOT_NO_ZPLUGIN )) && is-at-least 5 && zinit cdreplay -q # https://www.zsh.org/mla/users/2015/msg00467.html # shellcheck disable=SC2016 @@ -488,10 +488,10 @@ KEYTIMEOUT=1 # Static named directories [[ -d ${HOME}/public_html/wp-content ]] \ && hash -d wp-content="$HOME/public_html/wp-content" -[[ -d ${HOME}/.zplugin/plugins/agkozak---agkozak-zsh-prompt ]] \ - && hash -d agk="$HOME/.zplugin/plugins/agkozak---agkozak-zsh-prompt" -[[ -d ${HOME}/.zplugin/plugins/agkozak---zsh-z ]] \ - && hash -d z="$HOME/.zplugin/plugins/agkozak---zsh-z" +[[ -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" # Dynamic named directories # https://superuser.com/questions/751523/dynamic-directory-hash From f091408be17f0c6e63d3cc7aa37903768eb072c7 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 21 Jan 2020 22:34:29 +0100 Subject: [PATCH 37/51] =?UTF-8?q?Zplugin=20=E2=86=92=20Zinit=20rename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- psprint/zshrc.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index ecd804b..9193063 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -454,7 +454,7 @@ zinit wait"2" lucid for \ zdharma/zflai \ blockf \ zdharma/zui \ - zinit/zinit-console \ + zinit-zsh/zinit-console \ trigger-load'!crasis' \ zdharma/zinit-crasis \ atinit"forgit_ignore='fgi'" \ From 3218f7f9c601d035a1ca732d2ae8b09aa72ffdb5 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Wed, 22 Jan 2020 00:44:59 +0100 Subject: [PATCH 38/51] psprint: update --- psprint/zshrc.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index 9193063..65ca563 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -366,7 +366,7 @@ zinit wait"0c" lucid \ # Zconvey shell integration plugin zinit wait lucid \ - sbin"cmds/zc-bg-notify"sbin"cmds/plg-zsh-notify" for \ + sbin"cmds/zc-bg-notify" sbin"cmds/plg-zsh-notify" for \ zdharma/zconvey # zsh-startify, a vim-startify like plugin @@ -474,7 +474,7 @@ zinit as"null" wait"3" lucid for \ sbin davidosomething/git-my \ sbin atload"export _MENU_THEME=legacy" \ arzzen/git-quick-stats \ - make"PREFIX=$ZPFX install" iwata/git-now \ + 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 From acdaab2064693d4346c986ef540110137b6e59c4 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Wed, 22 Jan 2020 08:53:22 +0100 Subject: [PATCH 39/51] jubi: Make the docker image start --- jubi/bootstrap.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jubi/bootstrap.sh b/jubi/bootstrap.sh index d82cd65..7c4e76b 100644 --- a/jubi/bootstrap.sh +++ b/jubi/bootstrap.sh @@ -5,6 +5,8 @@ case `uname` in brew install fzf ;; Linux) - sudo apt install fzf + # No such package + # sudo apt install fzf + : ;; esac From 51c2be99224ab3f5d25e0b707f1f1da81136937d Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Wed, 22 Jan 2020 01:04:05 -0500 Subject: [PATCH 40/51] NICHOLAS85: Zplugin -> Zinit transition and more --- .../plugins/_local---config-files/LICENSE | 0 .../plugins/_local---config-files/README.md | 0 .../_local---config-files/completions/_clight | 37 +++ .../completions/_colorls | 37 +++ .../completions/_dynamicwall | 17 ++ .../completions/_gebaard | 13 + .../_local---config-files/completions/_git | 243 ++++++++++++++++++ .../_local---config-files/completions/_groff | 53 ++++ .../_local---config-files/completions/_nl | 24 ++ .../completions/_tlp-stat | 18 ++ .../completions/err_ggrep | 2 + .../config-files.plugin.zsh | 56 ++-- .../_local---config-files/functions/@shexit | 1 + .../functions/apt-history | 1 + .../functions/auto-ls-colorls | 0 .../functions/autoenv-files | 6 + .../_local---config-files/functions/dotscheck | 0 .../functions/history-stat | 0 .../_local---config-files/functions/kate | 1 + .../_local---config-files/functions/sudo | 5 +- .../functions/zpcompinit_fast} | 2 +- .../patches/LS_COLORS.patch | 0 .../patches/auto-ls.patch | 10 + .../_local---config-files/patches/pure.patch | 0 .../patches/rm-trash.patch | 0 .../patches/systemd.patch | 11 + .../_local---config-files/themes/dolphin-post | 0 .../_local---config-files/themes/dolphin-pre | 0 .../themes/spaceship-async-post | 0 .../themes/spaceship-post | 0 NICHOLAS85/.zshrc | 196 +++++++------- 31 files changed, 622 insertions(+), 111 deletions(-) rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/LICENSE (100%) rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/README.md (100%) create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/_clight create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/_colorls create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/_dynamicwall create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/_gebaard create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/_git create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/_groff create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/_nl create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/_tlp-stat create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/err_ggrep rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/config-files.plugin.zsh (76%) create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/@shexit create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/apt-history rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/functions/auto-ls-colorls (100%) create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/autoenv-files rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/functions/dotscheck (100%) rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/functions/history-stat (100%) create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/functions/sudo (87%) rename NICHOLAS85/{.zplugin/plugins/_local---config-files/functions/_zpcompinit_fast => .zinit/plugins/_local---config-files/functions/zpcompinit_fast} (92%) rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/patches/LS_COLORS.patch (100%) create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/patches/pure.patch (100%) rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/patches/rm-trash.patch (100%) create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/patches/systemd.patch rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/themes/dolphin-post (100%) rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/themes/dolphin-pre (100%) rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/themes/spaceship-async-post (100%) rename NICHOLAS85/{.zplugin => .zinit}/plugins/_local---config-files/themes/spaceship-post (100%) diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/LICENSE b/NICHOLAS85/.zinit/plugins/_local---config-files/LICENSE similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/LICENSE rename to NICHOLAS85/.zinit/plugins/_local---config-files/LICENSE diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/README.md b/NICHOLAS85/.zinit/plugins/_local---config-files/README.md similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/README.md rename to NICHOLAS85/.zinit/plugins/_local---config-files/README.md diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_clight b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_clight new file mode 100644 index 0000000..6c77007 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_clight @@ -0,0 +1,37 @@ +#compdef clight + +# zsh completions for 'clight' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-f,--frames}'[frames taken for each capture, Between 1]' + {-d,--device}'[0 Path to webcam device. If empty, first]' + {-b,--backlight}'[path to backlight syspath. If empty]' + '--no-backlight-smooth[disable smooth backlight transitions]' + '--no-gamma-smooth[disable smooth gamma transitions]' + '--no-dimmer-smooth[disable smooth dimmer transitions]' + '--day-temp[daily gamma temperature, between 1000]' + '--night-temp[nightly gamma temperature, between 1000]' + '--lat[your desired latitude]' + '--lon[your desired longitude]' + '--sunrise[7:00 Force sunrise time for gamma correction]' + '--sunset[9:00 Force sunset time for gamma correction]' + '--no-gamma[disable gamma correction tool]' + '--no-dimmer[disable dimmer tool]' + '--no-dpms[disable dpms tool]' + '--no-inhibit[disable]' + '--no-backlight[disable backlight module]' + '--dimmer-pct[backlight level used while screen is]' + '--verbose[enable verbose mode]' + '--no-auto-calib[disable screen backlight automatic]' + '--no-kbd-backlight[disable keyboard backlight calibration]' + '--shutter-thres[threshold to consider a capture as]' + {-v,--version}'[show version info]' + {-c,--conf-file}'[specify a conf file to be parsed]' + '--gamma-long-transition[enable a very long smooth transition for]' + '--usage[display brief usage message]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_colorls b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_colorls new file mode 100644 index 0000000..aa8b6b6 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_colorls @@ -0,0 +1,37 @@ +#compdef colorls + +# zsh completions for 'colorls' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-a,--all}'[do not ignore entries starting with .]' + {-A,--almost-all}'[do not list . and ..]' + {-d,--dirs}'[show only directories]' + {-f,--files}'[show only files]' + {--gs,--git-status}'[show git status for each file]' + '--report[show brief report]' + '--format[use format: accross (-x), horizontal (-x), long (-l), single-column (-1)]' + '-1[list one file per line]' + {-l,--long}'[use a long listing format]' + '-x[list entries by lines instead of by columns]' + '--tree[shows tree view of the directory]' + {--sd,--sort-dirs,--group-directories-first}'[sort directories first]' + {--sf,--sort-files}'[sort files first]' + '-t[sort by modification time, newest first]' + '-U[do not sort; list entries in directory order]' + '-S[sort by file size, largest first]' + '-X[sort by file extension]' + '--sort[sort by WORD instead of name: none, size (-S), time (-t), extension (-X)]' + {-r,--reverse}'[reverse order while sorting]' + {-h,--human-readable}'[]' + '--color[colorize the output: auto, always (default if omitted), never]' + '--light[use light color scheme]' + '--dark[use dark color scheme]' + '--hyperlink[]' + '--help[prints this help]' + '--version[show version]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_dynamicwall b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_dynamicwall new file mode 100644 index 0000000..05520c8 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_dynamicwall @@ -0,0 +1,17 @@ +#compdef dynamicwall + +# zsh completions for 'dynamicwall' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-f,--force}'[update wallpaper immediately, optionally to a specific time]' + {-p,--preview}'[run a 24 hour preview for a certain theme]' + {-c,--config}'[edit your config file using your default editor]' + {-s,--status}'[display systemd service status/crontab and system-sleep script log]' + {-l,--list}'[list available themes to choose from]' + {-h,--help}'[show help]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_gebaard b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_gebaard new file mode 100644 index 0000000..8bb57e7 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_gebaard @@ -0,0 +1,13 @@ +#compdef gebaard + +# zsh completions for 'gebaard' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-b,--background}'[daemonize]' + {-h,--help}'[prints this help text]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_git b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_git new file mode 100644 index 0000000..886bf95 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_git @@ -0,0 +1,243 @@ +#compdef git gitk + +# zsh completion wrapper for git +# +# Copyright (c) 2012-2013 Felipe Contreras +# +# You need git's bash completion script installed somewhere, by default it +# would be the location bash-completion uses. +# +# If your script is somewhere else, you can configure it on your ~/.zshrc: +# +# zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh +# +# The recommended way to install this script is to copy to '~/.zsh/_git', and +# then add the following to your ~/.zshrc file: +# +# fpath=(~/.zsh $fpath) + +complete () +{ + # do nothing + return 0 +} + +zstyle -T ':completion:*:*:git:*' tag-order && \ + zstyle ':completion:*:*:git:*' tag-order 'common-commands' + +zstyle -s ":completion:*:*:git:*" script script +if [ -z "$script" ]; then + local -a locations + local e + locations=( + $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash + '/etc/bash_completion.d/git' # fedora, old debian + '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian + '/usr/share/bash-completion/git' # gentoo + ) + for e in $locations; do + test -f $e && script="$e" && break + done +fi +GIT_SOURCING_ZSH_COMPLETION=y . "$script" + +__gitcomp () +{ + emulate -L zsh + + local cur_="${3-$cur}" + + case "$cur_" in + --*=) + ;; + *) + local c IFS=$' \t\n' + local -a array + for c in ${=1}; do + c="$c${4-}" + case $c in + --*=*|*.) ;; + *) c="$c " ;; + esac + array+=("$c") + done + compset -P '*[=:]' + compadd -Q -S '' -p "${2-}" -a -- array && _ret=0 + ;; + esac +} + +__gitcomp_direct () +{ + emulate -L zsh + + local IFS=$'\n' + compset -P '*[=:]' + compadd -Q -- ${=1} && _ret=0 +} + +__gitcomp_nl () +{ + emulate -L zsh + + local IFS=$'\n' + compset -P '*[=:]' + compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 +} + +__gitcomp_nl_append () +{ + emulate -L zsh + + local IFS=$'\n' + compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 +} + +__gitcomp_file_direct () +{ + emulate -L zsh + + local IFS=$'\n' + compset -P '*[=:]' + compadd -f -- ${=1} && _ret=0 +} + +__gitcomp_file () +{ + emulate -L zsh + + local IFS=$'\n' + compset -P '*[=:]' + compadd -p "${2-}" -f -- ${=1} && _ret=0 +} + +__git_zsh_bash_func () +{ + emulate -L ksh + + local command=$1 + + local completion_func="_git_${command//-/_}" + declare -f $completion_func >/dev/null && $completion_func && return + + local expansion=$(__git_aliased_command "$command") + if [ -n "$expansion" ]; then + words[1]=$expansion + completion_func="_git_${expansion//-/_}" + declare -f $completion_func >/dev/null && $completion_func + fi +} + +__git_zsh_cmd_common () +{ + local -a list + list=( + add:'add file contents to the index' + bisect:'find by binary search the change that introduced a bug' + branch:'list, create, or delete branches' + checkout:'checkout a branch or paths to the working tree' + clone:'clone a repository into a new directory' + commit:'record changes to the repository' + diff:'show changes between commits, commit and working tree, etc' + fetch:'download objects and refs from another repository' + grep:'print lines matching a pattern' + init:'create an empty Git repository or reinitialize an existing one' + log:'show commit logs' + merge:'join two or more development histories together' + mv:'move or rename a file, a directory, or a symlink' + pull:'fetch from and merge with another repository or a local branch' + push:'update remote refs along with associated objects' + rebase:'forward-port local commits to the updated upstream head' + reset:'reset current HEAD to the specified state' + rm:'remove files from the working tree and from the index' + show:'show various types of objects' + status:'show the working tree status' + tag:'create, list, delete or verify a tag object signed with GPG') + _describe -t common-commands 'common commands' list && _ret=0 +} + +__git_zsh_cmd_alias () +{ + local -a list + list=(${${${(0)"$(git config -z --get-regexp '^alias\.')"}#alias.}%$'\n'*}) + _describe -t alias-commands 'aliases' list $* && _ret=0 +} + +__git_zsh_cmd_all () +{ + local -a list + emulate ksh -c __git_compute_all_commands + list=( ${=__git_all_commands} ) + _describe -t all-commands 'all commands' list && _ret=0 +} + +__git_zsh_main () +{ + local curcontext="$curcontext" state state_descr line + typeset -A opt_args + local -a orig_words + + orig_words=( ${words[@]} ) + + _arguments -C \ + '(-p --paginate --no-pager)'{-p,--paginate}'[pipe all output into ''less'']' \ + '(-p --paginate)--no-pager[do not pipe git output into a pager]' \ + '--git-dir=-[set the path to the repository]: :_directories' \ + '--bare[treat the repository as a bare repository]' \ + '(- :)--version[prints the git suite version]' \ + '--exec-path=-[path to where your core git programs are installed]:: :_directories' \ + '--html-path[print the path where git''s HTML documentation is installed]' \ + '--info-path[print the path where the Info files are installed]' \ + '--man-path[print the manpath (see `man(1)`) for the man pages]' \ + '--work-tree=-[set the path to the working tree]: :_directories' \ + '--namespace=-[set the git namespace]' \ + '--no-replace-objects[do not use replacement refs to replace git objects]' \ + '(- :)--help[prints the synopsis and a list of the most commonly used commands]: :->arg' \ + '(-): :->command' \ + '(-)*:: :->arg' && return + + case $state in + (command) + _alternative \ + 'alias-commands:alias:__git_zsh_cmd_alias' \ + 'common-commands:common:__git_zsh_cmd_common' \ + 'all-commands:all:__git_zsh_cmd_all' && _ret=0 + ;; + (arg) + local command="${words[1]}" __git_dir + + if (( $+opt_args[--bare] )); then + __git_dir='.' + else + __git_dir=${opt_args[--git-dir]} + fi + + (( $+opt_args[--help] )) && command='help' + + words=( ${orig_words[@]} ) + + __git_zsh_bash_func $command + ;; + esac +} + +_git () +{ + local _ret=1 + local cur cword prev + + cur=${words[CURRENT]} + prev=${words[CURRENT-1]} + let cword=CURRENT-1 + + if (( $+functions[__${service}_zsh_main] )); then + __${service}_zsh_main + else + emulate ksh -c __${service}_main + fi + + let _ret && _default && _ret=0 + return _ret +} + +_git diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_groff b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_groff new file mode 100644 index 0000000..d5fe52b --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_groff @@ -0,0 +1,53 @@ +#compdef groff + +# zsh completions for 'groff' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + '-h[print this message]' + '-v[print version number]' + '-e[preprocess with eqn]' + '-g[preprocess with grn]' + '-j[preprocess with chem]' + '-k[preprocess with preconv]' + '-p[preprocess with pic]' + '-s[preprocess with soelim]' + '-t[preprocess with tbl]' + '-G[preprocess with grap]' + '-J[preprocess with gideal]' + '-R[preprocess with refer]' + '-a[produce ASCII description of output]' + '-b[print backtraces with errors or warnings]' + '-c[disable color output]' + '-dcs[define a string c as s]' + '-ffam[use fam as the default font family]' + '-i[read standard input after named input files]' + '-l[spool the output]' + '-mname[read macros tmac.name]' + '-nnum[number first page n]' + '-olist[output only pages in list]' + '-rcn[define a number register c as n]' + '-wname[enable warning name]' + '-z[suppress formatted output]' + '-C[enable compatibility mode]' + '-Darg[use arg as default input encoding. Implies -k]' + '-E[inhibit all errors]' + '-Fdir[search dir for device directories]' + '-Idir[search dir for soelim, troff, and grops. Implies -s]' + '-Karg[use arg as input encoding. Implies -k]' + '-Larg[pass arg to the spooler]' + '-Mdir[search dir for macro files]' + '-N[dont allow newlines within eqn delimiters]' + '-Parg[pass arg to the postprocessor]' + '-S[enable safer mode (the default)]' + '-Tdev[use device dev]' + '-U[enable unsafe mode]' + '-V[print commands on stdout instead of running them]' + '-Wname[inhibit warning name]' + '-X[use X11 previewer rather than usual postprocessor]' + '-Z[dont postprocess]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_nl b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_nl new file mode 100644 index 0000000..7785f50 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_nl @@ -0,0 +1,24 @@ +#compdef nl + +# zsh completions for 'nl' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-b,--body-numbering}'[use STYLE for numbering body lines]' + {-d,--section-delimiter}'[use CC for logical page delimiters]' + {-f,--footer-numbering}'[use STYLE for numbering footer lines]' + {-h,--header-numbering}'[use STYLE for numbering header lines]' + {-i,--line-increment}'[line number increment at each line]' + {-l,--join-blank-lines}'[group of NUMBER empty lines counted as one]' + {-n,--number-format}'[insert line numbers according to FORMAT]' + {-p,--no-renumber}'[do not reset line numbers for each section]' + {-s,--number-separator}'[add STRING after (possible) line number]' + {-v,--starting-line-number}'[first line number for each section]' + {-w,--number-width}'[use NUMBER columns for line numbers]' + '--help[display this help and exit]' + '--version[output version information and exit]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_tlp-stat b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_tlp-stat new file mode 100644 index 0000000..979f031 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_tlp-stat @@ -0,0 +1,18 @@ +#compdef tlp-stat + +# zsh completions for 'tlp-stat' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-d,--disk}'[| -e | --pcie |]' + {-g,--graphics}'[| -p | --processor |]' + {-r,--rfkill}'[| -s | --system |]' + {-t,--temp}'[| -u | --usb |]' + {-w,--warn}'[| -v | --verbose |]' + {-P,--pev}'[| | --psup |]' + {-T,--trace}'[]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/err_ggrep b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/err_ggrep new file mode 100644 index 0000000..ab0dc2b --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/err_ggrep @@ -0,0 +1,2 @@ +No options found for ggrep. Was fetching from following invocation: `ggrep --help'. +Program reacted with exit code: 127. diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh similarity index 76% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh rename to NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh index 9c7239b..9ec22a0 100644 --- a/NICHOLAS85/.zplugin/plugins/_local---config-files/config-files.plugin.zsh +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh @@ -16,44 +16,59 @@ autoload -Uz $fpath[1]/*(.:t) # Variables # ######################### -pchf="/${0:h}/patches" -thmf="/${0:h}/themes" - +pchf="${0:h}/patches" +thmf="${0:h}/themes" +GENCOMPL_FPATH="${0:h}/completions" HISTFILE="${HOME}/.histfile" +WD_CONFIG="${ZPFX}/warprc" +ZSHZ_DATA="${ZPFX}/z" +AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" # Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) UPDATELOCAL_GITDIR="${HOME}/github/Built" +UL_Acond='! $isdolphin' # Condition checked before running UL_Acomm +UL_Acomm='cache=($chpwd_functions); chpwd_functions=()' # Command run if UL_Acond true +UL_Bcomm='chpwd_functions=($cache); [ -z $1 ] && { checkupdates && print -n "\033[1;32m➜ \033[0m" } &!' # Command run after updatelocal finishes if UL_Acond was true ZSH_AUTOSUGGEST_USE_ASYNC=true ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=30 HISTORY_SUBSTRING_SEARCH_FUZZY=set +(){ local stratum strata=( arch bedrock debian hijacked init ) +for stratum in ${strata}; do hash -d "${stratum}"="/bedrock/strata/${stratum}"; done } + +LD_PRELOAD=~arch/usr/lib/libgtk3-nocsd.so.0 # Fix unable to preload msg +export OPENCV_LOG_LEVEL=ERROR # Hide nonimportant errors for howdy +export rm_opts=(-I -v) +export EDITOR=micro +FZF_DEFAULT_OPTS=" +--border +--height 80% +--extended +--ansi +--reverse +--cycle +--bind ctrl-s:toggle-sort +--bind 'alt-e:execute($EDITOR {} >/dev/tty /dev/null | head -200\" +--preview-window right:50%:hidden +" +FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" colorlscommand=(lsd --group-dirs first) colorlsgitcommand=(colorls --sd --gs -A) AUTO_LS_COMMANDS=(colorls) AUTO_LS_NEWLINE=false -export EDITOR=micro +ZSHZ_EXCLUDE_DIRS=( / ) FZ_HISTORY_CD_CMD=zshz ZSHZ_CMD="/dev/null" # Don't set the alias, fz will cover that - -FZF_DEFAULT_COMMAND="fd --type file --color=always" -FZF_DEFAULT_OPTS="--ansi" - -ZSHZ_EXCLUDE_DIRS=( / ) - forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin -WD_CONFIG="${ZPFX}/warprc" -ZSHZ_DATA="${ZPFX}/z" - -export rm_opts=(-I -v) - # Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) -dotsvar=( gtkrc-2.0 kwinrulesrc \.\./ \.config/gtk-3\.0/settings\.ini ) +dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' \.config/gtk-3\.0/settings\.ini ) # Export variables when connected via SSH if [[ -n $SSH_CONNECTION ]]; then @@ -86,19 +101,18 @@ fi alias ..='command .. 2>/dev/null || cd $(dirname $PWD)' # Access zsh config files -alias zshconf="$EDITOR ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}* &!" +alias zshconf="kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}*" -#alias zshconfatom="atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}* &!" +alias zshconfatom="atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}* &!" # dot file management -alias dots=' /usr/bin/git --git-dir=$HOME/.dots/ --work-tree=$HOME' +alias dots=' command git --git-dir=$HOME/.dots/ --work-tree=$HOME' # ^Space added to remove this command from history +alias t='tail -f' alias g='git' alias gi="git-ignore" alias open='xdg-open' - - alias -- -='cd -' alias atom='atom-beta --disable-gpu' alias apm='apm-beta' diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/@shexit b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/@shexit new file mode 100644 index 0000000..26304f5 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/@shexit @@ -0,0 +1 @@ +echo "$PWD" > $TMPDIR/olddir diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/apt-history b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/apt-history new file mode 100644 index 0000000..72cc25f --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/apt-history @@ -0,0 +1 @@ + zcat -qf /var/log/apt/history.log* | grep -Po '^Commandline: apt install (?!.*--reinstall)\K.*' diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-colorls b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/auto-ls-colorls similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/functions/auto-ls-colorls rename to NICHOLAS85/.zinit/plugins/_local---config-files/functions/auto-ls-colorls diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/autoenv-files b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/autoenv-files new file mode 100644 index 0000000..c4df5bc --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/autoenv-files @@ -0,0 +1,6 @@ +dirs=( $( { sed -e 's/:\(.*\):/\1/' $AUTOENV_AUTH_FILE } | sed 's/:.*//' | +FZF_DEFAULT_OPTS="$FORGIT_FZF_DEFAULT_OPTS -0 -m --nth 2..,.. +--preview='[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --style=numbers --color=always {}) 2> /dev/null | head -500' +$FORGIT_ADD_FZF_OPTS" fzf ) ) + +${dirs:+kate} $dirs diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/dotscheck b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/functions/dotscheck rename to NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/history-stat b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/history-stat similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/functions/history-stat rename to NICHOLAS85/.zinit/plugins/_local---config-files/functions/history-stat diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate new file mode 100644 index 0000000..68973f5 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate @@ -0,0 +1 @@ +command kate "${@}" &! diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/sudo b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo similarity index 87% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/functions/sudo rename to NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo index d92647b..cb9e4de 100644 --- a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/sudo +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo @@ -1,4 +1,3 @@ -# _do_sudo from https://github.com/robbyrussell/oh-my-zsh/pull/8163, modified function _do_sudo() { [[ -z ${__do_sudo_glob+x} ]] && local __do_sudo_glob=1 [[ -z ${__do_sudo_expanded+x} ]] && local -A __do_sudo_expanded @@ -49,10 +48,10 @@ do ((++pos)) first=("${first[@]}" "$arg") else - noglob _do_sudo ${first[@]} env PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ${@:$pos} + noglob _do_sudo ${first[@]} env PATH="$ZPFX/bin:/bedrock/cross/pin/bin:/bedrock/bin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/snap/bin:/bedrock/cross/bin" ${@:$pos} unset -f _do_sudo return fi done -noglob _do_sudo "${@}" +command sudo "${@}" unset -f _do_sudo diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/_zpcompinit_fast b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zpcompinit_fast similarity index 92% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/functions/_zpcompinit_fast rename to NICHOLAS85/.zinit/plugins/_local---config-files/functions/zpcompinit_fast index 92a9929..a518c62 100644 --- a/NICHOLAS85/.zplugin/plugins/_local---config-files/functions/_zpcompinit_fast +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zpcompinit_fast @@ -1,6 +1,6 @@ setopt extendedglob local_options autoload -Uz compinit -local zcompf="${ZPLGM[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump}" +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" diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/LS_COLORS.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/LS_COLORS.patch similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/patches/LS_COLORS.patch rename to NICHOLAS85/.zinit/plugins/_local---config-files/patches/LS_COLORS.patch diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch new file mode 100644 index 0000000..1632841 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch @@ -0,0 +1,10 @@ +--- desyncr---auto-ls/auto-ls.zsh 2019-12-24 01:12:17.899589679 -0500 ++++ desyncr---auto-ls/auto-ls.patch 2020-01-08 10:52:13.052391760 -0500 +@@ -34,6 +34,7 @@ + # 1. Called from `chpwd_functions` – show file list + # 2. Called by another ZLE plugin (like `dirhistory`) through `zle accept-line` – show file list + # 3. Called by ZLE itself – only should file list if prompt was empty ++ local cmd + if ! zle \ + || { [[ ${WIDGET} != accept-line ]] && [[ ${LASTWIDGET} != .accept-line ]] }\ + || { [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]] }; then diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/pure.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/patches/pure.patch rename to NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/patches/rm-trash.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/patches/rm-trash.patch rename to NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/systemd.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/systemd.patch new file mode 100644 index 0000000..827d8ea --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/systemd.patch @@ -0,0 +1,11 @@ +--- systemd.plugin.zsh/systemd.plugin.zsh 2019-11-17 22:02:30.372142924 -0500 ++++ systemd.plugin.zsh/systemd.plugin.zsh-patch 2019-11-17 22:04:35.429430301 -0500 +@@ -6,7 +6,7 @@ + start stop reload restart try-restart isolate kill + reset-failed enable disable reenable preset mask unmask + link load cancel set-environment unset-environment +- edit) ++ edit daemon-reload) + + for c in $user_commands; do; alias sc-$c="systemctl $c"; done + for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-post rename to NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-pre b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-pre similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/themes/dolphin-pre rename to NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-pre diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-async-post rename to NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post diff --git a/NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post similarity index 100% rename from NICHOLAS85/.zplugin/plugins/_local---config-files/themes/spaceship-post rename to NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index e7f675b..3461ca9 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -1,18 +1,22 @@ # https://github.com/NICHOLAS85/dotfiles/blob/xps_13_9365/.zshrc -# Install zinit if not installed -if [ ! -d "${HOME}/.zinit" ]; then - sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" -fi - -module_path+=( "/home/nicholas/.zinit/bin/zmodules/Src" ) -zmodload zdharma/zplugin &>/dev/null - +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 -source "${HOME}/.zinit/bin/zinit.zsh" +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 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" +fi +source "$ZINIT_HOME/$ZINIT_BIN_DIR_NAME/zinit.zsh" autoload -Uz _zinit (( ${+_comps} )) && _comps[zinit]=_zinit -### End of Zinit's installer chunk +### 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 curl https://codeload.github.com/NICHOLAS85/dotfiles/tar.gz/xps_13_9365 | \ @@ -21,9 +25,9 @@ if [[ ! -d "${ZINIT[PLUGINS_DIR]}/_local---config-files" ]]; then 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'1' and lucid +# 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'1' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } +zt() { zinit depth'3' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } zct() { .zinit-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" \ atinit'[ -f "${thmf}/${MYPROMPT}-pre" ] && source "${thmf}/${MYPROMPT}-pre"' \ atload'![ -f "${thmf}/${MYPROMPT}-post" ] && source "${thmf}/${MYPROMPT}-post"'; \ @@ -35,114 +39,134 @@ zct() { .zinit-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1 ################## zt for \ - pick'async.zsh' light-mode mafredri/zsh-async \ -\ + pick'async.zsh' light-mode \ + mafredri/zsh-async \ if'[[ ${MYPROMPT=spaceship-async} = "spaceship-async" ]]' \ compile'{lib/*,sections/*,tests/*.zsh}' pick'spaceship.zsh' silent \ atload'!source "../_local---config-files/themes/${MYPROMPT}-post"' \ - maximbaz/spaceship-prompt \ -\ - blockf nocompletions light-mode _local/config-files + maximbaz/spaceship-prompt \ + blockf light-mode \ + _local/config-files ########### # Annexes # ########### -zt light-mode for zinit/z-a-patch-dl +zt light-mode for \ + zinit-zsh/z-a-patch-dl \ + zinit-zsh/z-a-bin-gem-node ############################ # Conditional themes block # ############################ zt pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' for \ - if'zct spaceship-async' maximbaz/spaceship-prompt \ -\ - if'zct spaceship' denysdovhan/spaceship-prompt + if'zct spaceship-async' \ + maximbaz/spaceship-prompt \ + if'zct spaceship' \ + denysdovhan/spaceship-prompt -zt if'zct dolphin' pick"pure.zsh" patch"$pchf/pure.patch" nocompile'!' reset-prompt for sindresorhus/pure +zt pick"pure.zsh" patch"$pchf/%PLUGIN%.patch" nocompile'!' reset reset-prompt for \ + if'zct dolphin' \ + sindresorhus/pure # Plugins -zt for OMZ::lib/history.zsh +zt for OMZ::lib/history.zsh ################## # Wait'0a' block # ################## zt 0a light-mode for \ - pick'fz.sh' changyuheng/fz \ -\ - OMZ::lib/completion.zsh \ -\ - has'systemctl' OMZ::plugins/systemd/systemd.plugin.zsh \ -\ - make sei40kr/zsh-fast-alias-tips \ -\ - OMZ::plugins/sudo/sudo.plugin.zsh \ -\ - atload'unalias help; unalias rm' OMZ::plugins/common-aliases/common-aliases.plugin.zsh \ -\ - as'program' pick'bin/git-dsf' zdharma/zsh-diff-so-fancy \ -\ - blockf atpull'zinit creinstall -q "$PWD"' zsh-users/zsh-completions \ -\ - compile'{src/*.zsh,src/strategies/*}' atload'_zsh_autosuggest_start' zsh-users/zsh-autosuggestions + pick'fz.sh' \ + changyuheng/fz \ + OMZ::lib/completion.zsh \ + has'systemctl' patch"$pchf/systemd.patch" nocompile'!' \ + OMZ::plugins/systemd/systemd.plugin.zsh \ + sei40kr/zsh-fast-alias-tips \ + OMZ::plugins/sudo/sudo.plugin.zsh \ + blockf atpull'zinit creinstall -q "$PWD"' \ + zsh-users/zsh-completions \ + compile'{src/*.zsh,src/strategies/*}' atload'_zsh_autosuggest_start' \ + zsh-users/zsh-autosuggestions ################## # Wait'0b' block # ################## zt 0b light-mode for \ - patch"$pchf/LS_COLORS.patch" atclone"dircolors -b LS_COLORS > c.zsh" \ - atpull'%atclone' pick"c.zsh" nocompile'!' reset \ + atclone"dircolors -b LS_COLORS > c.zsh" atpull'%atclone' \ + patch"$pchf/%PLUGIN%.patch" pick"c.zsh" nocompile'!' reset \ atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”' \ - trapd00r/LS_COLORS \ -\ - compile'{hsmw-*,test/*}' zdharma/history-search-multi-word \ -\ - as'program' pick'rm-trash/rm-trash' atload'alias rm="rm-trash ${rm_opts}"' \ - patch"$pchf/rm-trash.patch" compile'rm-trash/rm-trash' nocompile'!' reset \ - nateshmbhat/rm-trash \ -\ - from"gh-r" as"program" pick'*/micro' bpick'*linux64*' reset zyedidia/micro \ -\ - has'thefuck' trackbinds bindmap'\e\e -> ^[OP^[OP' pick'init.zsh' laggardkernel/zsh-thefuck \ -\ - OMZ::plugins/command-not-found/command-not-found.plugin.zsh \ -\ - pick'autopair.zsh' nocompletions hlissner/zsh-autopair \ -\ - pick'manydots-magic' compile'manydots-magic' knu/zsh-manydots-magic \ -\ - atinit'_zpcompinit_fast; zpcdreplay' 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 - -zt 0b if'[[ ${isdolphin} != true ]]' for desyncr/auto-ls - -zt 0c id-as'Cleanup' atinit'unset -f zct zt' as'null' nocd light-mode for zdharma/null + trapd00r/LS_COLORS \ + compile'{hsmw-*,test/*}' \ + zdharma/history-search-multi-word \ + has'thefuck' trackbinds bindmap'\e\e -> ^[OP^[OP' pick'init.zsh' \ + laggardkernel/zsh-thefuck \ + OMZ::plugins/command-not-found/command-not-found.plugin.zsh \ + pick'autopair.zsh' nocompletions \ + hlissner/zsh-autopair \ + pick'manydots-magic' \ + knu/zsh-manydots-magic \ + pick'autoenv.zsh' nocompletions \ + Tarrasch/zsh-autoenv \ + atinit'zpcompinit_fast; zpcdreplay' \ + 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 + +zt 0b if'[[ ${isdolphin} != true ]]' patch"$pchf/%PLUGIN%.patch" for \ + desyncr/auto-ls + +################## +# Wait'0c' block # +################## + +zt 0c light-mode pick'/dev/null' for \ + sbin'fd*/fd; fd*/fd -> fdfind' from"gh-r" \ + @sharkdp/fd \ + sbin'bin/git-ignore' atload'export GI_TEMPLATE="$PWD/.git-ignore"' \ + laggardkernel/git-ignore + +zt 0c light-mode as'null' sbin for \ + sbin"bin/git-dsf;bin/diff-so-fancy" \ + zdharma/zsh-diff-so-fancy \ + 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 \ + from'gh-r' \ + junegunn/fzf-bin \ + from'gh-r' \ + sei40kr/fast-alias-tips-bin \ + id-as'Cleanup' nocd atinit'unset -f zct zt' \ + zdharma/null ###################### # 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'!git' paulirish/git-open \ -\ - trigger-load'!ga;!gcf;!gclean;!gd;!gd;!glo;!grh;!gss' wfxr/forgit \ -\ - trigger-load'!git-ignore' pick'init.zsh' blockf laggardkernel/git-ignore \ -\ - trigger-load'!zshz' blockf agkozak/zsh-z \ -\ - trigger-load'!updatelocal' blockf NICHOLAS85/updatelocal \ -\ - trigger-load'!gencomp' pick'zsh-completion-generator.plugin.zsh' atload'zinit creinstall -q "$PWD"' \ - RobSis/zsh-completion-generator - -$isdolphin || dotscheck + 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 lucid nocd as\"null\" wait\"1\" atload\"zinit creinstall -q _local/config-files; zpcompinit\" for /dev/null; gencomp"' \ + RobSis/zsh-completion-generator + +$isdolphin || { +dotscheck +[[ $PWD = ~ ]] && { cd "$(cat $TMPDIR/olddir)" } 2>/dev/null || true +trap @shexit EXIT +} From b47a3a92f77cf4d7afbea9070a0a1db69cfed517 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Wed, 22 Jan 2020 15:55:24 +0100 Subject: [PATCH 41/51] psprint: Add .p10k.zsh --- psprint/.p10k.zsh | 1117 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1117 insertions(+) create mode 100644 psprint/.p10k.zsh diff --git a/psprint/.p10k.zsh b/psprint/.p10k.zsh new file mode 100644 index 0000000..d780cf5 --- /dev/null +++ b/psprint/.p10k.zsh @@ -0,0 +1,1117 @@ +# Generated by Powerlevel10k configuration wizard on 2020-01-16 at 01:20 CET. +# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 34064. +# Wizard options: powerline, classic, light, time, vertical separators, sharp heads, +# flat tails, 1 line, compact, concise, transient_prompt, instant_prompt=quiet. +# Type `p10k configure` to generate another config. +# +# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate +# your own config based on it. +# +# Tip: Looking for a nice color? Here's a one-liner to print colormap. +# +# for i in {0..255}; do print -Pn "%${i}F${(l:3::0:)i}%f " ${${(M)$((i%8)):#7}:+$'\n'}; done + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh + setopt no_unset extended_glob + + # Unset all configuration options. This allows you to apply configiguration changes without + # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. + unset -m 'POWERLEVEL9K_*' + + autoload -Uz is-at-least && is-at-least 5.1 || return + + zmodload zsh/langinfo + if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then + local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8} + fi + + # The list of segments shown on the left. Fill it with the most important segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # os_icon # os identifier + dir # current directory + vcs # git status + # prompt_char # prompt symbol + ) + + # The list of segments shown on the right. Fill it with less important segments. + # Right prompt on the last prompt line (where you are typing your commands) gets + # automatically hidden when the input line reaches it. Right prompt above the + # last prompt line gets hidden if it would overlap with left prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + status # exit code of the last command + command_execution_time # duration of the last command + background_jobs # presence of background jobs + direnv # direnv status (https://direnv.net/) + virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) + anaconda # conda environment (https://conda.io/) + pyenv # python environment (https://github.com/pyenv/pyenv) + goenv # go environment (https://github.com/syndbg/goenv) + nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) + nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) + nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) + # node_version # node.js version + # go_version # go version (https://golang.org) + # rust_version # rustc version (https://www.rust-lang.org) + # dotnet_version # .NET version (https://dotnet.microsoft.com) + rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) + rvm # ruby version from rvm (https://rvm.io) + fvm # flutter version management (https://github.com/leoafarias/fvm) + luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) + jenv # java version from jenv (https://github.com/jenv/jenv) + plenv # perl version from plenv (https://github.com/tokuhirom/plenv) + kubecontext # current kubernetes context (https://kubernetes.io/) + terraform # terraform workspace (https://www.terraform.io) + aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) + aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) + azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) + gcloud # google cloud cli acccount and project (https://cloud.google.com/) + google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) + context # user@hostname + nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) + ranger # ranger shell (https://github.com/ranger/ranger) + nnn # nnn shell (https://github.com/jarun/nnn) + vim_shell # vim shell indicator (:sh) + midnight_commander # midnight commander shell (https://midnight-commander.org/) + vi_mode # vi mode (you don't need this if you've enabled prompt_char) + # vpn_ip # virtual private network indicator + # ram # free RAM + # load # CPU load + todo # todo items (https://github.com/todotxt/todo.txt-cli) + time # current time + # public_ip # public IP address + # proxy # system-wide http/https/ftp proxy + # battery # internal battery + # example # example user-defined segment (see prompt_example function below) + ) + + # To disable default icons for all segments, set POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION=''. + # + # To enable default icons for all segments, don't define POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION + # or set it to '${P9K_VISUAL_IDENTIFIER}'. + # + # To remove trailing space from all default icons, set POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION + # to '${P9K_VISUAL_IDENTIFIER% }'. + # + # To enable default icons for one segment (e.g., dir), set + # POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'. + # + # To assign a specific icon to one segment (e.g., dir), set + # POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='⭐'. + # + # To assign a specific icon to a segment in a given state (e.g., dir in state NOT_WRITABLE), + # set POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'. + # + # Note: You can use $'\u2B50' instead of '⭐'. It's especially convenient when specifying + # icons that your text editor cannot render. Don't forget to put $ and use single quotes when + # defining icons via Unicode codepoints. + # + # Note: Many default icons cannot be displayed with system fonts. You'll need to install a + # capable font to use them. See POWERLEVEL9K_MODE below. + typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}' + + # This option makes a difference only when default icons are enabled for all or some prompt + # segments (see POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION above). LOCK_ICON can be printed as + # $'\uE0A2', $'\uE138' or $'\uF023' depending on POWERLEVEL9K_MODE. The correct value of this + # parameter depends on the provider of the font your terminal is using. + # + # Font Provider | POWERLEVEL9K_MODE + # ---------------------------------+------------------- + # Powerline | powerline + # Font Awesome | awesome-fontconfig + # Adobe Source Code Pro | awesome-fontconfig + # Source Code Pro | awesome-fontconfig + # Awesome-Terminal Fonts (regular) | awesome-fontconfig + # Awesome-Terminal Fonts (patched) | awesome-patched + # Nerd Fonts | nerdfont-complete + # Other | compatible + # + # If this looks overwhelming, either stick with a preinstalled system font and set + # POWERLEVEL9K_MODE=compatible, or install the recommended Powerlevel10k font from + # https://github.com/romkatv/powerlevel10k/#recommended-meslo-nerd-font-patched-for-powerlevel10k + # and set POWERLEVEL9K_MODE=nerdfont-complete. + typeset -g POWERLEVEL9K_MODE=powerline + + # When set to true, icons appear before content on both sides of the prompt. When set + # to false, icons go after content. If empty or not set, icons go before content in the left + # prompt and after content in the right prompt. + # + # You can also override it for a specific segment: + # + # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false + # + # Or for a specific segment in specific state: + # + # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false + typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= + + # Add an empty line before each prompt. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + + # Connect left prompt lines with these symbols. You'll probably want to use the same color + # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─' + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─' + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─' + # Connect right prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%242F─╮' + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%242F─┤' + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%242F─╯' + + # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or + # '─'. The last two make it easier to see the alignment between left and right prompt and to + # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + # for more compact prompt if using using this option. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= + if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then + # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE + # ornaments defined above. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 + # Start filler from the edge of the screen if there are no left segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' + # End filler on the edge of the screen if there are no right segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' + fi + + # Default background color. + typeset -g POWERLEVEL9K_BACKGROUND=238 + + # Separator between same-color segments on the left. + typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%246F|' + # Separator between same-color segments on the right. + typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='%246F|' + # Separator between different-color segments on the left. + typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='' + # Separator between different-color segments on the right. + typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='' + # The right end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' + # The left end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + # Left prompt terminator for lines without any segments. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + #################################[ os_icon: os identifier ]################################## + # OS identifier color. + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255 + # Make the icon bold. + typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT}' + + ################################[ prompt_char: prompt symbol ]################################ + # Transparent background. + typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= + # Green prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='Ⅴ' + # Prompt symbol in overwrite vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true + # No line terminator if prompt_char is the last segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= + # No line introducer if prompt_char is the first segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + # No surrounding whitespace. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= + + ##################################[ dir: current directory ]################################## + # Default current directory color. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=31 + # If directory is too long, shorten some of its segments to the shortest possible unique + # prefix. The shortened directory can be tab-completed to the original. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique + # Replace removed segment suffixes with this symbol. + typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= + # Color of the shortened directory segments. + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 + # Color of the anchor directory segments. Anchor segments are never shortened. The first + # segment is always an anchor. + typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 + # Display anchor directory segments in bold. + typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true + # Don't shorten directories that contain any of these files. They are anchors. + local anchor_files=( + .bzr + .citc + .git + .hg + .node-version + .python-version + .ruby-version + .shorten_folder_marker + .svn + .terraform + CVS + Cargo.toml + composer.json + go.mod + package.json + ) + typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" + # Don't shorten this many last directory segments. They are anchors. + typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 + # Shorten directory if it's longer than this even if there is space for it. The value can + # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, + # directory will be shortened only when prompt doesn't fit or when other parameters demand it + # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). + # If set to `0`, directory will always be shortened to its minimum length. + typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this + # many columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least + # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 + # If set to true, embed a hyperlink into the directory. Useful for quickly + # opening a directory in the file manager simply by clicking the link. + # Can also be handy when the directory is shortened, as it allows you to see + # the full directory that was used in previous commands. + typeset -g POWERLEVEL9K_DIR_HYPERLINK=false + + # Enable special styling for non-writable directories. + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=true + # Show this icon when the current directory is not writable. POWERLEVEL9K_DIR_SHOW_WRITABLE + # above must be set to true for this parameter to have effect. + typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='∅' + + # Custom prefix. + # typeset -g POWERLEVEL9K_DIR_PREFIX='%248Fin ' + + # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons for different directories. + # It must be an array with 3 * N elements. Each triplet consists of: + # + # 1. A pattern against which the current directory is matched. Matching is done with + # extended_glob option enabled. + # 2. Directory class for the purpose of styling. + # 3. Icon. + # + # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. If there + # are no matches, the directory will have no icon. + # + # Example: + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=( + # '~/work(|/*)' WORK '(╯°□°)╯︵ ┻━┻' + # '~(|/*)' HOME '⌂' + # '*' DEFAULT '') + # + # With these settings, the current directory in the prompt may look like this: + # + # (╯°□°)╯︵ ┻━┻ ~/work/projects/important/urgent + # + # Or like this: + # + # ⌂ ~/best/powerlevel10k + # + # You can also set different colors for directories of different classes. Remember to override + # FOREGROUND, SHORTENED_FOREGROUND and ANCHOR_FOREGROUND for every directory class that you wish + # to have its own color. + # + # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 + # + typeset -g POWERLEVEL9K_DIR_CLASSES=() + + #####################################[ vcs: git status ]###################################### + # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= + POWERLEVEL9K_VCS_BRANCH_ICON=${(g::)POWERLEVEL9K_VCS_BRANCH_ICON} + + # Untracked files icon. It's really a question mark, your font isn't broken. + # Change the value of this parameter to show a different icon. + typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' + POWERLEVEL9K_VCS_UNTRACKED_ICON=${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON} + + # Formatter for Git status. + # + # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # + # You can edit the function to customize how Git status looks. + # + # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: + # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. + function my_git_formatter() { + emulate -L zsh + + if [[ -n $P9K_CONTENT ]]; then + # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from + # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. + typeset -g my_git_format=$P9K_CONTENT + return + fi + + if (( $1 )); then + # Styling for up-to-date Git status. + local meta='%248F' # grey foreground + local clean='%76F' # green foreground + local modified='%178F' # yellow foreground + local untracked='%39F' # blue foreground + local conflicted='%196F' # red foreground + else + # Styling for incomplete and stale Git status. + local meta='%244F' # grey foreground + local clean='%244F' # grey foreground + local modified='%244F' # grey foreground + local untracked='%244F' # grey foreground + local conflicted='%244F' # grey foreground + fi + + local res + local where # branch or tag + if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then + res+="${clean}${POWERLEVEL9K_VCS_BRANCH_ICON}" + where=${(V)VCS_STATUS_LOCAL_BRANCH} + elif [[ -n $VCS_STATUS_TAG ]]; then + res+="${meta}#" + where=${(V)VCS_STATUS_TAG} + fi + + # If local branch name or tag is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + (( $#where > 32 )) && where[13,-13]="…" + res+="${clean}${where//\%/%%}" # escape % + + # Display the current Git commit if there is no branch or tag. + # Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line. + [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" + + # Show tracking branch name if it differs from local branch. + if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then + res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % + fi + + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + # *42 if have stashes. + (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" + # 'merge' if the repo is in an unusual state. + [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" + # ~42 if have merge conflicts. + (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" + # +42 if have staged changes. + (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" + # !42 if have unstaged changes. + (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" + # ?42 if have untracked files. It's really a question mark, your font isn't broken. + # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. + # Remove the next line if you don't want to see untracked files at all. + (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" + + typeset -g my_git_format=$res + } + functions -M my_git_formatter 2>/dev/null + + # Disable the default Git status formatting. + typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true + # Install our own Git status formatter. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' + typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' + # Enable counters for staged, unstaged, etc. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 + + # Icon color. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 + typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 + # Custom icon. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_VCS_PREFIX='%248Fon ' + + # Show status of repositories of these types. You can add svn and/or hg if you are + # using them. If you do, your prompt may become slow even when your current directory + # isn't in an svn or hg reposotiry. + typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) + + # These settings are used for respositories other than Git or when gitstatusd fails and + # Powerlevel10k has to fall back to using vcs_info. + typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 + + ##########################[ status: exit code of the last command ]########################### + # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and + # style them independently from the regular OK and ERROR state. + typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true + + # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as + # it will signify success by turning green. + typeset -g POWERLEVEL9K_STATUS_OK=true + typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when some part of a pipe command fails but the overall exit status is zero. It may look + # like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as + # it will signify error by turning red. + typeset -g POWERLEVEL9K_STATUS_ERROR=true + typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when the last command was terminated by a signal. + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 + # Use terse signal names: "INT" instead of "SIGINT(2)". + typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when some part of a pipe command fails and the overall exit status is also non-zero. + # It may look like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' + + ###################[ command_execution_time: duration of the last command ]################### + # Show duration of the last command if takes longer than this many seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 + # Show this many fractional digits. Zero means round to seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Execution time color. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=248 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Custom icon. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%248Ftook ' + + #######################[ background_jobs: presence of background jobs ]####################### + # Don't show the number of background jobs. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false + # Background jobs color. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=37 + # Icon to show when there are background jobs. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='≡' + + #######################[ direnv: direnv status (https://direnv.net/) ]######################## + # Direnv color. + typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 + # Icon to show when direnv is active. + typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}' + + ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### + # NordVPN connection indicator color. + typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 + # Hide NordVPN connection indicator when not connected. + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= + # Custom icon. + # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## + # Ranger shell color. + typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 + # Custom icon. + typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='▲' + + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### + # Nnn shell color. + typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### + # Vim shell indicator color. + typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 + # Icon to show when in a vim shell. + typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}' + + ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### + # Midnight Commander shell color. + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 + # Icon to show when in a midnight commander shell. + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}' + + ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### + # Text and color for normal (a.k.a. command) vi mode. + typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL + typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=106 + # Text and color for visual vi mode. + typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL + typeset -g POWERLEVEL9K_VI_MODE_VISUAL_FOREGROUND=68 + # Text and color for overtype (a.k.a. overwrite and replace) vi mode. + typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE + typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_FOREGROUND=172 + # Text and color for insert vi mode. + typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= + typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66 + + # Custom icon. + typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='▲' + + ######################################[ ram: free RAM ]####################################### + # RAM color. + typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 + # Custom icon. + # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ load: CPU load ]###################################### + # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. + typeset -g POWERLEVEL9K_LOAD_WHICH=5 + # Load color when load is under 50%. + typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 + # Load color when load is between 50% and 70%. + typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 + # Load color when load is over 70%. + typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 + # Custom icon. + # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ + # Todo color. + typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 + # Hide todo when the total number of tasks is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true + # Hide todo when the number of tasks after filtering is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false + + # Todo format. The following parameters are available within the expansion. + # + # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. + # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. + # + # These variables correspond to the last line of the output of `todo.sh -p ls`: + # + # TODO: 24 of 42 tasks shown + # + # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. + # + # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ context: user@hostname ]################################## + # Context color when running with privileges. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 + # Context color in SSH without privileges. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 + # Default context color (no privileges, no SSH). + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 + + # Context format when running with privileges: bold user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' + # Context format when in SSH without privileges: user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' + # Default context format (no privileges, no SSH): user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' + + # Don't show context unless running with privileges or in SSH. + # Tip: Remove the next line to always show context. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%248Fwith ' + + ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### + # Python virtual environment color. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 + # Don't show Python version next to the virtual environment name. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ anaconda: conda environment (https://conda.io/) ]###################### + # Anaconda environment color. + typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 + # Don't show Python version next to the anaconda environment name. + typeset -g POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_ANACONDA_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ + # Pyenv color. + typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 + # Hide python version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) + # If set to false, hide python version if it's the same as global: + # $(pyenv version-name) == $(pyenv global). + typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ + # Goenv color. + typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 + # Don't show the current Go version if it's the same as global. + typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## + # Nodenv color. + typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 + # Don't show node version if it's the same as global: $(nodenv version-name) == $(nodenv global). + typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### + # Nvm color. + typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ + # Nodeenv color. + typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 + # Don't show Node version next to the environment name. + typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false + # Separate environment name from Node version only with a space. + typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############################[ node_version: node.js version ]############################### + # Node version color. + typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 + # Show node version only when in a directory tree containing package.json. + typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ go_version: go version (https://golang.org) ]######################## + # Go version color. + typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 + # Show go version only when in a go project subdirectory. + typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## + # Rust version color. + typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 + # Show rust version only when in a rust project subdirectory. + typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ + # .NET version color. + typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 + # Show .NET version only when in a .NET project subdirectory. + typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## + # Rbenv color. + typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 + # Hide ruby version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) + # If set to false, hide ruby version if it's the same as global: + # $(rbenv version-name) == $(rbenv global). + typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## + # Rvm color. + typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 + # Don't show @gemset at the end. + typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false + # Don't show ruby- at the front. + typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ + # Fvm color. + typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### + # Lua color. + typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 + # Hide lua version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) + # If set to false, hide lua version if it's the same as global: + # $(luaenv version-name) == $(luaenv global). + typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ + # Java color. + typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 + # Hide java version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) + # If set to false, hide java version if it's the same as global: + # $(jenv version-name) == $(jenv global). + typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ + # Perl color. + typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 + # Hide perl version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) + # If set to false, hide perl version if it's the same as global: + # $(plenv version-name) == $(plenv global). + typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ terraform: terraform workspace (https://www.terraform.io) ]################# + # Terraform color. + typeset -g POWERLEVEL9K_TERRAFORM_FOREGROUND=38 + # Custom icon. + typeset -g POWERLEVEL9K_TERRAFORM_VISUAL_IDENTIFIER_EXPANSION='tf' + + #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# + # Show kubecontext only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show kubecontext. + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx' + + # Kubernetes context classes for the purpose of using different colors, icons and expansions with + # different contexts. + # + # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current kubernetes context gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current kubernetes context is "deathray-testing/default", its class is TEST + # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='○' + + # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext + # segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # Within the expansion the following parameters are always available: + # + # - P9K_CONTENT The content that would've been displayed if there was no content + # expansion defined. + # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE + # in the output of `kubectl config get-contexts`. If there is no + # namespace, the parameter is set to "default". + # + # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), + # the following extra parameters are available: + # + # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. + # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. + # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. + # + # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, + # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=gke + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + # + # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=eks + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= + # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' + # Append the current context's namespace if it's not "default". + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' + + # Custom prefix. + # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%248Fat ' + + #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# + # Show aws only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show aws. + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi' + + # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current AWS profile gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AWS_CLASSES defines the context class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current AWS profile is "company_test", its class is TEST + # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 + # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# + # AWS Elastic Beanstalk environment color. + typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 + # Custom icon. + typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='eb' + + ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## + # Show azure only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show azure. + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi' + # Azure account name color. + typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 + # Custom icon. + typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='az' + + ##########[ gcloud: google cloud acccount and project (https://cloud.google.com/) ]########### + # Show gcloud only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show gcloud. + typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' + # Google cloud color. + typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 + + # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION if the default + # is too verbose or not informative enough. + # + # P9K_GCLOUD_ACCOUNT: the output of `gcloud config get-value account` + # P9K_GCLOUD_PROJECT: the output of `gcloud config get-value project` + # ${VARIABLE//\%/%%}: ${VARIABLE} with all occurences of '%' replaced with '%%'. + # + typeset -g POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT//\%/%%}' + + # Custom icon. + # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# + # Show google_app_cred only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show google_app_cred. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi' + + # Google application credentials classes for the purpose of using different colors, icons and + # expansions with different credentials. + # + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first + # element in each pair defines a pattern against which the current kubernetes context gets + # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion + # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION + # parameters, you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. + # The first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD + # '*:*test*:*' TEST + # '*' DEFAULT) + # + # If your current Google application credentials is "service_account deathray-testing x@y.com", + # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD # These values are examples that are unlikely + # '*:*test*:*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by + # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # You can use the following parameters in the expansion. Each of them corresponds to one of the + # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. + # + # Parameter | JSON key file field + # ---------------------------------+--------------- + # P9K_GOOGLE_APP_CRED_TYPE | type + # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id + # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurences of '%' replaced by '%%'. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' + + ###############################[ public_ip: public IP address ]############################### + # Public IP color. + typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 + # Custom icon. + # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ########################[ vpn_ip: virtual private network indicator ]######################### + # VPN IP color. + typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 + # When on VPN, show just an icon without the IP address. + typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= + # Regular expression for the VPN network interface. Run ifconfig while on VPN to see the + # name of the interface. + typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(wg|(.*tun))[0-9]*' + # Icon to show when on VPN. + typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}' + + #########################[ proxy: system-wide http/https/ftp proxy ]########################## + # Proxy color. + typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ battery: internal battery ]################################# + # Show battery in red when it's below this level and not connected to power supply. + typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 + typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 + # Show battery in green when it's charging or fully charged. + typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 + # Show battery in yellow when it's discharging. + typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 + # Battery pictograms going from low to high level of charge. + typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█') + # Don't show the remaining time to charge/discharge. + typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false + + ####################################[ time: current time ]#################################### + # Current time color. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands as opposed to the default + # behavior where they contain the end times of their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + # Custom icon. + typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_TIME_PREFIX='%248Fat ' + + # Example of a user-defined prompt segment. Function prompt_example will be called on every + # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or + # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. + # + # Type `p10k help segment` for documentation and a more sophisticated example. + function prompt_example() { + p10k segment -f 208 -i '⭐' -t 'hello, %n' + } + + # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job + # is to generate the prompt segment for display in instant prompt. See + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # + # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function + # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k + # will replay these calls without actually calling instant_prompt_*. It is imperative that + # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this + # rule is not observed, the content of instant prompt will be incorrect. + # + # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If + # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. + function instant_prompt_example() { + # Since prompt_example always makes the same `p10k segment` calls, we can call it from + # instant_prompt_example. This will give us the same `example` prompt segment in the instant + # and regular prompts. + prompt_example + } + + # User-defined prompt segments can be customized the same way as built-in segments. + # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 + # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' From ef371a0fcd00500acf3067ac9e35d78b8e1568cc Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Mon, 30 Mar 2020 15:31:34 -0400 Subject: [PATCH 42/51] NICHOLAS85: Update personal files --- .../_local---config-files/completions/_git | 243 ------------------ .../config-files.plugin.zsh | 65 +++-- .../functions/_dircycle_update_cycled | 11 + .../_local---config-files/functions/dotscheck | 18 +- .../_local---config-files/functions/sudo | 11 +- .../{zpcompinit_fast => zicompinit_fast} | 10 +- .../patches/auto-ls.patch | 24 +- .../_local---config-files/patches/fz.patch | 30 +++ .../patches/systemd.patch | 11 - .../themes/spaceship-async-post | 13 +- .../themes/spaceship-async2-post | 55 ++++ .../themes/spaceship-post | 11 +- NICHOLAS85/.zshrc | 114 ++++---- 13 files changed, 241 insertions(+), 375 deletions(-) delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/completions/_git create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/_dircycle_update_cycled rename NICHOLAS85/.zinit/plugins/_local---config-files/functions/{zpcompinit_fast => zicompinit_fast} (81%) create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/patches/systemd.patch create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async2-post diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_git b/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_git deleted file mode 100644 index 886bf95..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_git +++ /dev/null @@ -1,243 +0,0 @@ -#compdef git gitk - -# zsh completion wrapper for git -# -# Copyright (c) 2012-2013 Felipe Contreras -# -# You need git's bash completion script installed somewhere, by default it -# would be the location bash-completion uses. -# -# If your script is somewhere else, you can configure it on your ~/.zshrc: -# -# zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh -# -# The recommended way to install this script is to copy to '~/.zsh/_git', and -# then add the following to your ~/.zshrc file: -# -# fpath=(~/.zsh $fpath) - -complete () -{ - # do nothing - return 0 -} - -zstyle -T ':completion:*:*:git:*' tag-order && \ - zstyle ':completion:*:*:git:*' tag-order 'common-commands' - -zstyle -s ":completion:*:*:git:*" script script -if [ -z "$script" ]; then - local -a locations - local e - locations=( - $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash - '/etc/bash_completion.d/git' # fedora, old debian - '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian - '/usr/share/bash-completion/git' # gentoo - ) - for e in $locations; do - test -f $e && script="$e" && break - done -fi -GIT_SOURCING_ZSH_COMPLETION=y . "$script" - -__gitcomp () -{ - emulate -L zsh - - local cur_="${3-$cur}" - - case "$cur_" in - --*=) - ;; - *) - local c IFS=$' \t\n' - local -a array - for c in ${=1}; do - c="$c${4-}" - case $c in - --*=*|*.) ;; - *) c="$c " ;; - esac - array+=("$c") - done - compset -P '*[=:]' - compadd -Q -S '' -p "${2-}" -a -- array && _ret=0 - ;; - esac -} - -__gitcomp_direct () -{ - emulate -L zsh - - local IFS=$'\n' - compset -P '*[=:]' - compadd -Q -- ${=1} && _ret=0 -} - -__gitcomp_nl () -{ - emulate -L zsh - - local IFS=$'\n' - compset -P '*[=:]' - compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 -} - -__gitcomp_nl_append () -{ - emulate -L zsh - - local IFS=$'\n' - compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 -} - -__gitcomp_file_direct () -{ - emulate -L zsh - - local IFS=$'\n' - compset -P '*[=:]' - compadd -f -- ${=1} && _ret=0 -} - -__gitcomp_file () -{ - emulate -L zsh - - local IFS=$'\n' - compset -P '*[=:]' - compadd -p "${2-}" -f -- ${=1} && _ret=0 -} - -__git_zsh_bash_func () -{ - emulate -L ksh - - local command=$1 - - local completion_func="_git_${command//-/_}" - declare -f $completion_func >/dev/null && $completion_func && return - - local expansion=$(__git_aliased_command "$command") - if [ -n "$expansion" ]; then - words[1]=$expansion - completion_func="_git_${expansion//-/_}" - declare -f $completion_func >/dev/null && $completion_func - fi -} - -__git_zsh_cmd_common () -{ - local -a list - list=( - add:'add file contents to the index' - bisect:'find by binary search the change that introduced a bug' - branch:'list, create, or delete branches' - checkout:'checkout a branch or paths to the working tree' - clone:'clone a repository into a new directory' - commit:'record changes to the repository' - diff:'show changes between commits, commit and working tree, etc' - fetch:'download objects and refs from another repository' - grep:'print lines matching a pattern' - init:'create an empty Git repository or reinitialize an existing one' - log:'show commit logs' - merge:'join two or more development histories together' - mv:'move or rename a file, a directory, or a symlink' - pull:'fetch from and merge with another repository or a local branch' - push:'update remote refs along with associated objects' - rebase:'forward-port local commits to the updated upstream head' - reset:'reset current HEAD to the specified state' - rm:'remove files from the working tree and from the index' - show:'show various types of objects' - status:'show the working tree status' - tag:'create, list, delete or verify a tag object signed with GPG') - _describe -t common-commands 'common commands' list && _ret=0 -} - -__git_zsh_cmd_alias () -{ - local -a list - list=(${${${(0)"$(git config -z --get-regexp '^alias\.')"}#alias.}%$'\n'*}) - _describe -t alias-commands 'aliases' list $* && _ret=0 -} - -__git_zsh_cmd_all () -{ - local -a list - emulate ksh -c __git_compute_all_commands - list=( ${=__git_all_commands} ) - _describe -t all-commands 'all commands' list && _ret=0 -} - -__git_zsh_main () -{ - local curcontext="$curcontext" state state_descr line - typeset -A opt_args - local -a orig_words - - orig_words=( ${words[@]} ) - - _arguments -C \ - '(-p --paginate --no-pager)'{-p,--paginate}'[pipe all output into ''less'']' \ - '(-p --paginate)--no-pager[do not pipe git output into a pager]' \ - '--git-dir=-[set the path to the repository]: :_directories' \ - '--bare[treat the repository as a bare repository]' \ - '(- :)--version[prints the git suite version]' \ - '--exec-path=-[path to where your core git programs are installed]:: :_directories' \ - '--html-path[print the path where git''s HTML documentation is installed]' \ - '--info-path[print the path where the Info files are installed]' \ - '--man-path[print the manpath (see `man(1)`) for the man pages]' \ - '--work-tree=-[set the path to the working tree]: :_directories' \ - '--namespace=-[set the git namespace]' \ - '--no-replace-objects[do not use replacement refs to replace git objects]' \ - '(- :)--help[prints the synopsis and a list of the most commonly used commands]: :->arg' \ - '(-): :->command' \ - '(-)*:: :->arg' && return - - case $state in - (command) - _alternative \ - 'alias-commands:alias:__git_zsh_cmd_alias' \ - 'common-commands:common:__git_zsh_cmd_common' \ - 'all-commands:all:__git_zsh_cmd_all' && _ret=0 - ;; - (arg) - local command="${words[1]}" __git_dir - - if (( $+opt_args[--bare] )); then - __git_dir='.' - else - __git_dir=${opt_args[--git-dir]} - fi - - (( $+opt_args[--help] )) && command='help' - - words=( ${orig_words[@]} ) - - __git_zsh_bash_func $command - ;; - esac -} - -_git () -{ - local _ret=1 - local cur cword prev - - cur=${words[CURRENT]} - prev=${words[CURRENT-1]} - let cword=CURRENT-1 - - if (( $+functions[__${service}_zsh_main] )); then - __${service}_zsh_main - else - emulate ksh -c __${service}_main - fi - - let _ret && _default && _ret=0 - return _ret -} - -_git diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh index 9ec22a0..4eb7e8b 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh @@ -31,17 +31,19 @@ UL_Acomm='cache=($chpwd_functions); chpwd_functions=()' # Command run if UL_Acon UL_Bcomm='chpwd_functions=($cache); [ -z $1 ] && { checkupdates && print -n "\033[1;32m➜ \033[0m" } &!' # Command run after updatelocal finishes if UL_Acond was true ZSH_AUTOSUGGEST_USE_ASYNC=true -ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=30 - +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 +ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c50,)" +ZSH_AUTOSUGGEST_MANUAL_REBIND=set +ZSH_AUTOSUGGEST_STRATEGY=(history completion) +FAST_ALIAS_TIPS_PREFIX="» $(tput setaf 6)" +FAST_ALIAS_TIPS_SUFFIX="$(tput sgr0) «" HISTORY_SUBSTRING_SEARCH_FUZZY=set -(){ local stratum strata=( arch bedrock debian hijacked init ) -for stratum in ${strata}; do hash -d "${stratum}"="/bedrock/strata/${stratum}"; done } - -LD_PRELOAD=~arch/usr/lib/libgtk3-nocsd.so.0 # Fix unable to preload msg export OPENCV_LOG_LEVEL=ERROR # Hide nonimportant errors for howdy export rm_opts=(-I -v) export EDITOR=micro +export SYSTEMD_EDITOR=${EDITOR} +export GIT_DISCOVERY_ACROSS_FILESYSTEM=true # etckeeper on bedrock FZF_DEFAULT_OPTS=" --border --height 80% @@ -55,16 +57,14 @@ FZF_DEFAULT_OPTS=" --preview-window right:50%:hidden " FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" -colorlscommand=(lsd --group-dirs first) -colorlsgitcommand=(colorls --sd --gs -A) +colorlscommand="lsd --group-dirs first" +colorlsgitcommand="colorls --sd --gs -A" -AUTO_LS_COMMANDS=(colorls) +AUTO_LS_COMMANDS="colorls" AUTO_LS_NEWLINE=false -ZSHZ_EXCLUDE_DIRS=( / ) - FZ_HISTORY_CD_CMD=zshz -ZSHZ_CMD="/dev/null" # Don't set the alias, fz will cover that +ZSHZ_CMD="" # Don't set the alias, fz will cover that forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin # Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) @@ -81,7 +81,7 @@ fi # Set variables if on ac mode if [[ $(cat /run/tlp/last_pwr) = 0 ]]; then - alias micro="\micro -fastdirty false" + alias micro="micro -fastdirty false" fi # Used to programatically disable plugins when opening the terminal view in dolphin @@ -97,27 +97,34 @@ fi # Aliases # ######################### -# Allows leaving from deleted directories -alias ..='command .. 2>/dev/null || cd $(dirname $PWD)' - # Access zsh config files -alias zshconf="kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}*" - -alias zshconfatom="atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}* &!" - -# dot file management -alias dots=' command git --git-dir=$HOME/.dots/ --work-tree=$HOME' -# ^Space added to remove this command from history +alias zshconf="(){ setopt extendedglob local_options; kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}*~*.zwc }" +alias zshconfatom="(){ setopt extendedglob local_options; atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}*~*.zwc &! }" alias t='tail -f' alias g='git' -alias gi="git-ignore" alias open='xdg-open' -alias -- -='cd -' alias atom='atom-beta --disable-gpu' alias apm='apm-beta' - -unalias zplg +alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories +alias -- -='_dircycle_update_cycled +1 || true' +alias -- +='_dircycle_update_cycled -0 || true' + +(( ${+commands[brl]} )) && { +(){ local stratum strata=( /bedrock/run/enabled_strata/* ) +for stratum in ${strata:t}; do +hash -d "${stratum}"="/bedrock/strata/${stratum}" +alias "${stratum}"="strat ${stratum}" +alias "r${stratum}"="strat -r ${stratum}" +[[ -d "/bedrock/strata/${stratum}/etc/.git" ]] && \ +alias "${stratum:0:1}edots"="command sudo strat -r ${stratum} git --git-dir=/etc/.git --work-tree=/etc" +done } +alias bedots='command sudo git --git-dir=/bedrock/.git --work-tree=/bedrock' +LD_PRELOAD=~arch/usr/lib/libgtk3-nocsd.so.0 # Fix unable to preload msg +} +# dot file management +alias dots=' command git --git-dir=$HOME/.dots/ --work-tree=$HOME' +# ^Space added to remove this command from history ######################### # Other # @@ -134,7 +141,6 @@ setopt interactive_comments # Allow comments even in interactive shells (especia setopt pushd_ignore_dups # don't push multiple copies of the same directory onto the directory stack setopt auto_pushd # make cd push the old directory onto the directory stack setopt pushdminus # swapped the meaning of cd +1 and cd -1; we want them to mean the opposite of what they mean -setopt correct_all # autocorrect commands # Fuzzy matching of completions for when you mistype them: zstyle ':completion:*' completer _complete _match _approximate @@ -159,3 +165,6 @@ zstyle ':completion:*' rehash true bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word +bindkey -s '^[[5~' '' # Do nothing on pageup and pagedown. Better than printing '~'. +bindkey -s '^[[6~' '' +bindkey '^[[3;5~' kill-word # ctrl+del delete next word diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/_dircycle_update_cycled b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/_dircycle_update_cycled new file mode 100644 index 0000000..11f6ac1 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/_dircycle_update_cycled @@ -0,0 +1,11 @@ +setopt localoptions nopushdminus + +[[ ${#dirstack} -eq 0 ]] && return + +while ! builtin pushd -q $1 &>/dev/null; do + # A missing directory was found; pop it out of the directory stack. + builtin popd -q $1 + + # Stop trying if there are no more directories in the directory stack. + [[ ${#dirstack} -eq 0 ]] && break +done diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck index c8adbb4..a6ac913 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck @@ -1,20 +1,14 @@ if [ -d $HOME/.dots ]; then - local dotsvar1 dotsvar2 dotsvar3 dotsvar4 - dots(){ /usr/bin/git --git-dir=$HOME/.dots/ --work-tree=$HOME "${@}" 2>/dev/null} + local dotsvar1 dotsvar2 dotsvar3 dotsvar4 dotcmd + dotcmd="/usr/bin/git --git-dir=$HOME/.dots/ --work-tree=$HOME" dotsvar1=("${dotsvar[@]/%/'}") dotsvar2=("${dotsvar1[@]/#/-e '}") dotsvar3=(grep -v "${dotsvar2[*]}") - dotsvar4=$(dots status | eval "${dotsvar3[*]}") - if [[ "$dotsvar4" =~ "Changes not staged" ]] && [[ "$dotsvar4" =~ "modified|Changes to be committed" ]]; then + dotsvar4=$(eval $dotcmd ls-files --modified --deleted --exclude-standard | eval "${dotsvar3[*]}") + if ! [ -z $dotsvar4 ]; then echo "" - dots status -s - elif [[ "$dotsvar4" =~ "ahead of" ]]; then - dots status - dots push - elif [[ "$dotsvar4" =~ "is behind" ]]; then - dots status + eval $dotcmd status -s else - return 0 + return 1 fi fi -echo \ No newline at end of file diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo index cb9e4de..3d0dad8 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo @@ -3,7 +3,7 @@ function _do_sudo() { [[ -z ${__do_sudo_expanded+x} ]] && local -A __do_sudo_expanded local -a args local -a cmd_alias_arr - local cmd_alias + local cmd_alias first=true while (($#)); do case "$1" in command|exec|-) shift; break ;; @@ -11,7 +11,7 @@ function _do_sudo() { noglob) __do_sudo_glob=0; shift ;; [1-9]) args+=( $1 ); shift ;; *) - cmd_alias="$(command -v 2>/dev/null -- "$1")" + $first && { first=false; cmd_alias="$(command -v 2>/dev/null -- "$1")" } if [[ "$?" -eq 0 ]] && [[ "$cmd_alias" == 'alias'* ]] && [[ -z "$__do_sudo_expanded["$1"]" ]]; then __do_sudo_expanded["$1"]=1 IFS=' ' read -A cmd_alias_arr <<< "$(sed -e "s/[^=]*=//" -e "s/^'//" -e "s/'$//" <<< "$cmd_alias")" @@ -41,16 +41,17 @@ function _do_sudo() { } local -a first -local pos=1 second +local pos=1 second ret for arg in "$@" do if [[ ${arg:0:1} == "-" ]]; then ((++pos)) first=("${first[@]}" "$arg") else - noglob _do_sudo ${first[@]} env PATH="$ZPFX/bin:/bedrock/cross/pin/bin:/bedrock/bin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/snap/bin:/bedrock/cross/bin" ${@:$pos} + noglob _do_sudo ${first[@]} ${@:$pos} + ret=$? unset -f _do_sudo - return + return $ret fi done command sudo "${@}" diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zpcompinit_fast b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zicompinit_fast similarity index 81% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/zpcompinit_fast rename to NICHOLAS85/.zinit/plugins/_local---config-files/functions/zicompinit_fast index a518c62..fd14fa8 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zpcompinit_fast +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zicompinit_fast @@ -5,11 +5,11 @@ 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.md-1) ]]; then - compinit -C -d "$zcompf" -else - compinit -i -d "$zcompf" +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 @@ -18,5 +18,5 @@ if [[ -s "$zcompf" && (! -s "${zcompf}.zwc" || "$zcompf" -nt "${zcompf}.zwc") ]] [[ -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" &! + { zcompile -M "$zcompf" && command rm -f "$zcompf.zwc.old" }&! fi diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch index 1632841..a9056f7 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch @@ -1,10 +1,24 @@ ---- desyncr---auto-ls/auto-ls.zsh 2019-12-24 01:12:17.899589679 -0500 -+++ desyncr---auto-ls/auto-ls.patch 2020-01-08 10:52:13.052391760 -0500 -@@ -34,6 +34,7 @@ +Add compatibility with history-search-multi-word +--- desyncr---auto-ls/auto-ls.zsh 2020-01-31 18:55:08.466100189 -0500 ++++ desyncr---auto-ls/auto-ls.patch 2020-01-31 18:56:36.476222054 -0500 +@@ -34,9 +34,10 @@ # 1. Called from `chpwd_functions` – show file list # 2. Called by another ZLE plugin (like `dirhistory`) through `zle accept-line` – show file list # 3. Called by ZLE itself – only should file list if prompt was empty -+ local cmd ++ local cmd pLASTWIDGET=${LASTWIDGET} if ! zle \ || { [[ ${WIDGET} != accept-line ]] && [[ ${LASTWIDGET} != .accept-line ]] }\ - || { [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]] }; then +- || { [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]] }; then ++ || { [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]] && ! [[ $pLASTWIDGET =~ history-search-multi-word ]] }; then + zle && echo + for cmd in $AUTO_LS_COMMANDS; do + # If we detect a command with full path, ex: /bin/ls execute it +@@ -51,7 +52,7 @@ + + # Forward this event down the ZLE stack + if zle; then +- if [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]]; then ++ if [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]] && ! [[ $pLASTWIDGET =~ history-search-multi-word ]]; then + # Shortcut to reduce the number of empty lines appearing + # when pressing Enter + echo && zle redisplay diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch new file mode 100644 index 0000000..501de7b --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch @@ -0,0 +1,30 @@ +Remove code which caused z to hang when completing +--- changyuheng---fz/fz.sh 2020-02-25 15:05:44.397883607 -0500 ++++ changyuheng---fz/fz.sh-patch 2020-02-25 15:05:32.741982804 -0500 +@@ -27,7 +27,7 @@ + local dir seg starts_with_dir + if [[ "$1" == */ ]]; then + dir="$1" +- find -L "$(cd "$dir" 2>/dev/null && pwd)" -mindepth 1 -maxdepth 1 -type d \ ++ find -L "$(pwd)" -mindepth 1 -maxdepth 1 -type d \ + 2>/dev/null | while read -r line; do + base="${line##*/}" + if [[ "$base" == .* ]]; then +@@ -42,7 +42,7 @@ + seg=$(echo "$seg" | tr '[:upper:]' '[:lower:]') + fi + starts_with_dir=$( \ +- find -L "$(cd "$dir" 2>/dev/null && pwd)" -mindepth 1 -maxdepth 1 \ ++ find -L "$(pwd)" -mindepth 1 -maxdepth 1 \ + -type d 2>/dev/null | while read -r line; do \ + base="${line##*/}" + if [[ "$seg" != .* && "$base" == .* ]]; then +@@ -68,7 +68,7 @@ + if [ -n "$starts_with_dir" ]; then + echo "$starts_with_dir" + else +- find -L "$(cd "$dir" 2>/dev/null && pwd)" -mindepth 1 -maxdepth 1 \ ++ find -L "$(pwd)" -mindepth 1 -maxdepth 1 \ + -type d 2>/dev/null | while read -r line; do \ + base="${line##*/}" + if [[ "$seg" != .* && "$base" == .* ]]; then diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/systemd.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/systemd.patch deleted file mode 100644 index 827d8ea..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/systemd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- systemd.plugin.zsh/systemd.plugin.zsh 2019-11-17 22:02:30.372142924 -0500 -+++ systemd.plugin.zsh/systemd.plugin.zsh-patch 2019-11-17 22:04:35.429430301 -0500 -@@ -6,7 +6,7 @@ - start stop reload restart try-restart isolate kill - reset-failed enable disable reenable preset mask unmask - link load cancel set-environment unset-environment -- edit) -+ edit daemon-reload) - - for c in $user_commands; do; alias sc-$c="systemctl $c"; done - for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post index d0f2a51..3ddf47c 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post @@ -1,5 +1,5 @@ SPACESHIP_PROMPT_ORDER=( - time # Time stamps section +# time # Time stamps section user # Username section dir # Current directory section host # Hostname section @@ -19,21 +19,20 @@ SPACESHIP_PROMPT_ORDER=( # julia # Julia section docker # Docker section # aws # Amazon Web Services section - venv # virtualenv section - conda # conda virtualenv section - pyenv # Pyenv section +# venv # virtualenv section +# conda # conda virtualenv section +# pyenv # Pyenv section # dotnet # .NET section # ember # Ember.js section # kubecontext # Kubectl context section # terraform # Terraform workspace section exec_time # Execution time line_sep # Line break - battery # Battery level and status +# battery # Battery level and status vi_mode # Vi-mode indicator - jobs # Background jobs indicator char # Prompt character ) -SPACESHIP_RPROMPT_ORDER=(exit_code) +SPACESHIP_RPROMPT_ORDER=(exit_code jobs) #SPACESHIP_DIR_COLOR=117 SPACESHIP_DIR_COLOR=blue diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async2-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async2-post new file mode 100644 index 0000000..18ac076 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async2-post @@ -0,0 +1,55 @@ +SPACESHIP_PROMPT_ORDER=( + ssh # SSH connection indicator + user # Username section + dir # Current directory section + host # Hostname section + vcs::async # Version control system section + + package::async # Package version + # node::async # Node.js section + # ruby::async # Ruby section + # elm::async # Elm section + # elixir::async # Elixir section + # xcode::async # Xcode section + # swift::async # Swift section + # golang::async # Go section + # php::async # PHP section + # rust::async # Rust section + # haskell::async # Haskell Stack section + # julia::async # Julia section + # vagrant::async # Vagrant section + # docker::async # Docker section + # aws::async # Amazon Web Services section + # venv # virtualenv section + # conda::async # conda virtualenv section + # pyenv::async # Pyenv section + # dotnet::async # .NET section + # ember::async # Ember.js section + # kubecontext::async # Kubectl context section + # terraform::async # Terraform workspace section + + exec_time # Execution time + line_sep # Line break + char # Prompt character, with vi-mode indicator integrated +) + +SPACESHIP_RPROMPT_ORDER=( + exit_code # Exit code section + + jobs # Background jobs indicator + # battery # Battery level and status + # time # Time stampts section +) + +SPACESHIP_PROMPT_ADD_NEWLINE=false +SPACESHIP_EXIT_CODE_SHOW=true +SPACESHIP_VI_MODE_SHOW=false +SPACESHIP_SECTION_PLACEHOLDER= + +SPACESHIP_CHAR_SYMBOL='➜ ' +SPACESHIP_USER_SUFFIX="in " +SPACESHIP_DIR_COLOR=blue +SPACESHIP_DIR_PREFIX= +SPACESHIP_DIR_TRUNC_PREFIX="…/" +SPACESHIP_VCS_UNSTAGED="!" +SPACESHIP_VCS_STAGED="+" diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post index 7c0e662..0dd931d 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post @@ -17,21 +17,20 @@ SPACESHIP_PROMPT_ORDER=( # julia # Julia section docker # Docker section # aws # Amazon Web Services section - venv # virtualenv section - conda # conda virtualenv section - pyenv # Pyenv section +# venv # virtualenv section +# conda # conda virtualenv section +# pyenv # Pyenv section # dotnet # .NET section # ember # Ember.js section # kubecontext # Kubectl context section # terraform # Terraform workspace section exec_time # Execution time line_sep # Line break - battery # Battery level and status +# battery # Battery level and status vi_mode # Vi-mode indicator - jobs # Background jobs indicator char # Prompt character ) -SPACESHIP_RPROMPT_ORDER=(exit_code) +SPACESHIP_RPROMPT_ORDER=(exit_code jobs) #SPACESHIP_DIR_COLOR=117 SPACESHIP_DIR_COLOR=blue diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index 3461ca9..8d1a3e2 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -5,8 +5,8 @@ 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 git clone https://github.com/zdharma/zinit $ZINIT_HOME/$ZINIT_BIN_DIR_NAME && \\ + 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" fi @@ -19,6 +19,7 @@ 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 | \ tar -xz --strip=3 dotfiles-xps_13_9365/.zinit/plugins/_local---config-files mv _local---config-files "${ZINIT[PLUGINS_DIR]}/" @@ -29,9 +30,9 @@ fi # 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}"; } zct() { .zinit-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" \ - atinit'[ -f "${thmf}/${MYPROMPT}-pre" ] && source "${thmf}/${MYPROMPT}-pre"' \ + atinit'![ -f "${thmf}/${MYPROMPT}-pre" ] && source "${thmf}/${MYPROMPT}-pre"' \ atload'![ -f "${thmf}/${MYPROMPT}-post" ] && source "${thmf}/${MYPROMPT}-post"'; \ - ZINIT_ICE+=( "${(kv)ZINIT_ICES[@]}"); } + ZINIT_ICE+=("${(kv)ZINIT_ICES[@]}"); } ################## # Initial Prompt # @@ -41,10 +42,10 @@ zct() { .zinit-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1 zt for \ pick'async.zsh' light-mode \ mafredri/zsh-async \ - if'[[ ${MYPROMPT=spaceship-async} = "spaceship-async" ]]' \ - compile'{lib/*,sections/*,tests/*.zsh}' pick'spaceship.zsh' silent \ - atload'!source "../_local---config-files/themes/${MYPROMPT}-post"' \ - maximbaz/spaceship-prompt \ + if'[[ ${MYPROMPT=spaceship-async2} = "spaceship-async2" ]]' pick'spacezsh.zsh' \ + compile'{presets/^(*.zwc),lib/**/^(*.zwc),sections/^(*.zwc)}' \ + atload'!source "../_local---config-files/themes/${MYPROMPT}-post"' silent \ + laggardkernel/spacezsh-prompt \ blockf light-mode \ _local/config-files @@ -52,9 +53,10 @@ zt for \ # Annexes # ########### -zt light-mode for \ +zt light-mode compile'*handler' for \ zinit-zsh/z-a-patch-dl \ - zinit-zsh/z-a-bin-gem-node + zinit-zsh/z-a-bin-gem-node \ + zinit-zsh/z-a-submods ############################ # Conditional themes block # @@ -66,6 +68,10 @@ zt pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' for \ if'zct spaceship' \ denysdovhan/spaceship-prompt +zt pick'spacezsh.zsh' if'zct spaceship-async2' for \ + compile'{presets/^(*.zwc),lib/**/^(*.zwc),sections/^(*.zwc)}' \ + laggardkernel/spacezsh-prompt + zt pick"pure.zsh" patch"$pchf/%PLUGIN%.patch" nocompile'!' reset reset-prompt for \ if'zct dolphin' \ sindresorhus/pure @@ -74,21 +80,42 @@ zt pick"pure.zsh" patch"$pchf/%PLUGIN%.patch" nocompile'!' reset reset-prompt fo zt for OMZ::lib/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 + ################## # Wait'0a' block # ################## zt 0a light-mode for \ - pick'fz.sh' \ + pick'fz.sh' patch"$pchf/%PLUGIN%.patch" nocompile'!' \ changyuheng/fz \ OMZ::lib/completion.zsh \ - has'systemctl' patch"$pchf/systemd.patch" nocompile'!' \ + as'completion' mv'*.zsh -> _git' \ + felipec/git-completion \ + has'systemctl' \ OMZ::plugins/systemd/systemd.plugin.zsh \ - sei40kr/zsh-fast-alias-tips \ OMZ::plugins/sudo/sudo.plugin.zsh \ - blockf atpull'zinit creinstall -q "$PWD"' \ + blockf atpull'zinit creinstall -q .' \ zsh-users/zsh-completions \ - compile'{src/*.zsh,src/strategies/*}' atload'_zsh_autosuggest_start' \ + compile'{src/*.zsh,src/strategies/*}' pick'zsh-autosuggestions.zsh' \ + atload'_zsh_autosuggest_start' \ zsh-users/zsh-autosuggestions ################## @@ -96,77 +123,58 @@ zt 0a light-mode for \ ################## zt 0b light-mode for \ - atclone"dircolors -b LS_COLORS > c.zsh" atpull'%atclone' \ - patch"$pchf/%PLUGIN%.patch" pick"c.zsh" nocompile'!' reset \ - atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”' \ + pack'no-dir-color-swap' patch"$pchf/%PLUGIN%.patch" reset \ trapd00r/LS_COLORS \ compile'{hsmw-*,test/*}' \ zdharma/history-search-multi-word \ - has'thefuck' trackbinds bindmap'\e\e -> ^[OP^[OP' pick'init.zsh' \ - laggardkernel/zsh-thefuck \ OMZ::plugins/command-not-found/command-not-found.plugin.zsh \ - pick'autopair.zsh' nocompletions \ + pick'autopair.zsh' nocompletions atload'bindkey "^H" backward-kill-word' \ hlissner/zsh-autopair \ - pick'manydots-magic' \ + pick'manydots-magic' nocompile \ knu/zsh-manydots-magic \ pick'autoenv.zsh' nocompletions \ Tarrasch/zsh-autoenv \ - atinit'zpcompinit_fast; zpcdreplay' \ + atinit'zicompinit_fast; zicdreplay' \ 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 - -zt 0b if'[[ ${isdolphin} != true ]]' patch"$pchf/%PLUGIN%.patch" for \ + zsh-users/zsh-history-substring-search \ + if'[[ ${isdolphin} != true ]]' patch"$pchf/%PLUGIN%.patch" nocompile'!' \ desyncr/auto-ls ################## # 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 + zt 0c light-mode pick'/dev/null' for \ sbin'fd*/fd; fd*/fd -> fdfind' from"gh-r" \ @sharkdp/fd \ - sbin'bin/git-ignore' atload'export GI_TEMPLATE="$PWD/.git-ignore"' \ + sbin'bin/git-ignore' atload'export GI_TEMPLATE="$PWD/.git-ignore"; alias gi="git-ignore"' \ laggardkernel/git-ignore -zt 0c light-mode as'null' sbin for \ +zt 0c light-mode as'null' for \ sbin"bin/git-dsf;bin/diff-so-fancy" \ zdharma/zsh-diff-so-fancy \ + sbin \ + https://github.com/romkatv/dotfiles-public/blob/master/bin/ssh.zsh \ + 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 \ - from'gh-r' \ - junegunn/fzf-bin \ - from'gh-r' \ - sei40kr/fast-alias-tips-bin \ - id-as'Cleanup' nocd atinit'unset -f zct zt' \ + id-as'Cleanup' nocd atinit'unset -f zct zt; SPACESHIP_PROMPT_ADD_NEWLINE=true' \ zdharma/null -###################### -# 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 lucid nocd as\"null\" wait\"1\" atload\"zinit creinstall -q _local/config-files; zpcompinit\" for /dev/null; gencomp"' \ - RobSis/zsh-completion-generator - $isdolphin || { -dotscheck +dotscheck && echo [[ $PWD = ~ ]] && { cd "$(cat $TMPDIR/olddir)" } 2>/dev/null || true trap @shexit EXIT } From 0c788568aded1dac2130fad0d2744fa0a824d129 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Thu, 16 Apr 2020 14:59:06 +0200 Subject: [PATCH 43/51] Add brucebentley's dotfiles #26 --- brucebentley/.zshenv | 20 +++ brucebentley/zshrc.zsh | 327 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 347 insertions(+) create mode 100644 brucebentley/.zshenv create mode 100644 brucebentley/zshrc.zsh diff --git a/brucebentley/.zshenv b/brucebentley/.zshenv new file mode 100644 index 0000000..640a065 --- /dev/null +++ b/brucebentley/.zshenv @@ -0,0 +1,20 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# .zshenv +# +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +local dotdir="$HOME/.config/zsh" + +if [[ ! -f "$dotdir/.zshrc" ]] && [[ -f "$dotdir/zshrc" ]]; then + ( + cd "$dotdir" || exit; + for f in *; do + ln -s "$PWD/$f" "$PWD/.$f" + done + rm -rf .pkg .zsh + ) +elif [[ -f "$dotdir/.zshrc" ]]; then + ZDOTDIR="$dotdir" +else + echo 'no zshrc' > $HOME/nozshrc +fi diff --git a/brucebentley/zshrc.zsh b/brucebentley/zshrc.zsh new file mode 100644 index 0000000..9f66c9e --- /dev/null +++ b/brucebentley/zshrc.zsh @@ -0,0 +1,327 @@ +#!usr/bin/env zsh + +# - - - - - - - - - - - - - - - - - - - - +# Profiling Tools +# - - - - - - - - - - - - - - - - - - - - + +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 +fi + + +# - - - - - - - - - - - - - - - - - - - - +# Instant Prompt +# - - - - - - - - - - - - - - - - - - - - + +# Enable Powerlevel10k instant prompt. Should stay close to the top of `~/.zshrc`. +# 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" +fi + + +# - - - - - - - - - - - - - - - - - - - - +# Homebrew Configuration +# - - - - - - - - - - - - - - - - - - - - + +# If You Come From Bash You Might Have To Change Your $PATH. +# export PATH=:/usr/local/bin:/usr/local/sbin:$HOME/bin:$PATH +export PATH="$HOME/bin:/usr/local/bin:$PATH" + +# Homebrew Requires This. +export PATH="/usr/local/sbin:$PATH" + + +# - - - - - - - - - - - - - - - - - - - - +# Zsh Core Configuration +# - - - - - - - - - - - - - - - - - - - - + +# Install Functions. +export XDG_CONFIG_HOME="$HOME/.config" +export UPDATE_INTERVAL=15 + +export DOTFILES="$HOME/dotfiles" +export ZSH="$HOME/dotfiles/zsh" + +export CACHEDIR="$HOME/.local/share" +[[ -d "$CACHEDIR" ]] || mkdir -p "$CACHEDIR" + +# Load The Prompt System And Completion System And Initilize Them. +autoload -Uz compinit promptinit + +# Load And Initialize The Completion System Ignoring Insecure Directories With A +# Cache Time Of 20 Hours, So It Should Almost Always Regenerate The First Time A +# Shell Is Opened Each Day. +# See: https://gist.github.com/ctechols/ca1035271ad134841284 +_comp_files=(${ZDOTDIR:-$HOME}/.zcompdump(Nm-20)) +if (( $#_comp_files )); then + compinit -i -C +else + compinit -i +fi +unset _comp_files +promptinit +setopt prompt_subst + + +# - - - - - - - - - - - - - - - - - - - - +# ZSH Settings +# - - - - - - - - - - - - - - - - - - - - + +autoload -U colors && colors # Load Colors. +unsetopt case_glob # Use Case-Insensitve Globbing. +setopt globdots # Glob Dotfiles As Well. +setopt extendedglob # Use Extended Globbing. +setopt autocd # Automatically Change Directory If A Directory Is Entered. + +# Smart URLs. +autoload -Uz url-quote-magic +zle -N self-insert url-quote-magic + +# General. +setopt brace_ccl # Allow Brace Character Class List Expansion. +setopt combining_chars # Combine Zero-Length Punctuation Characters ( Accents ) With The Base Character. +setopt rc_quotes # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'. +unsetopt mail_warning # Don't Print A Warning Message If A Mail File Has Been Accessed. + +# Jobs. +setopt long_list_jobs # List Jobs In The Long Format By Default. +setopt auto_resume # Attempt To Resume Existing Job Before Creating A New Process. +setopt notify # Report Status Of Background Jobs Immediately. +unsetopt bg_nice # Don't Run All Background Jobs At A Lower Priority. +unsetopt hup # Don't Kill Jobs On Shell Exit. +unsetopt check_jobs # Don't Report On Jobs When Shell Exit. + +setopt correct # Turn On Corrections + +# Completion Options. +setopt complete_in_word # Complete From Both Ends Of A Word. +setopt always_to_end # Move Cursor To The End Of A Completed Word. +setopt path_dirs # Perform Path Search Even On Command Names With Slashes. +setopt auto_menu # Show Completion Menu On A Successive Tab Press. +setopt auto_list # Automatically List Choices On Ambiguous Completion. +setopt auto_param_slash # If Completed Parameter Is A Directory, Add A Trailing Slash. +setopt no_complete_aliases + +setopt menu_complete # Do Not Autoselect The First Completion Entry. +unsetopt flow_control # Disable Start/Stop Characters In Shell Editor. + +# Zstyle. +zstyle ':completion:*:*:*:*:*' menu select +zstyle ':completion:*:matches' group 'yes' +zstyle ':completion:*:options' description 'yes' +zstyle ':completion:*:options' auto-description '%d' +zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*' group-name '' +zstyle ':completion:*' verbose yes +zstyle ':completion::complete:*' use-cache on +zstyle ':completion::complete:*' cache-path "$HOME/.zcompcache" +zstyle ':completion:*' list-colors $LS_COLORS +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' +zstyle ':completion:*' rehash true + +# History. +HISTFILE="${ZDOTDIR:-$HOME}/.zhistory" +HISTSIZE=100000 +SAVEHIST=5000 +setopt appendhistory notify +unsetopt beep nomatch + +setopt bang_hist # Treat The '!' Character Specially During Expansion. +setopt inc_append_history # Write To The History File Immediately, Not When The Shell Exits. +setopt share_history # Share History Between All Sessions. +setopt hist_expire_dups_first # Expire A Duplicate Event First When Trimming History. +setopt hist_ignore_dups # Do Not Record An Event That Was Just Recorded Again. +setopt hist_ignore_all_dups # Delete An Old Recorded Event If A New Event Is A Duplicate. +setopt hist_find_no_dups # Do Not Display A Previously Found Event. +setopt hist_ignore_space # Do Not Record An Event Starting With A Space. +setopt hist_save_no_dups # Do Not Write A Duplicate Event To The History File. +setopt hist_verify # Do Not Execute Immediately Upon History Expansion. +setopt extended_history # Show Timestamp In History. + + +# - - - - - - - - - - - - - - - - - - - - +# Zinit Configuration +# - - - - - - - - - - - - - - - - - - - - + +__ZINIT="${ZDOTDIR:-$HOME}/.zinit/bin/zinit.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" +fi + +. "$__ZINIT" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit + + +# - - - - - - - - - - - - - - - - - - - - +# Theme +# - - - - - - - - - - - - - - - - - - - - + +# Most Themes Use This Option. +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 + +# Provide A Simple Prompt Till The Theme Loads +PS1="READY >" +zinit ice wait'!' lucid +zinit ice depth=1; zinit 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 + + +# - - - - - - - - - - - - - - - - - - - - +# 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 + +# Recommended Be Loaded Last. +zinit ice wait blockf lucid atpull'zinit creinstall -q .' +zinit load zsh-users/zsh-completions + +# rbenv +# zinit ice has'rbenv' id-as'rbenv' atpull'%atclone' \ +# atclone"rbenv init - --no-rehash > htlsne/zplugin-rbenv" +# zinit load zdharma/null + +# pyenv +# zinit ice has'pyenv' id-as'pyenv' atpull'%atclone' \ +# atclone"pyenv init - --no-rehash > pyenv.plugin.zsh" +# zinit load zdharma/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 + + +# - - - - - - - - - - - - - - - - - - - - +# User Configuration +# - - - - - - - - - - - - - - - - - - - - + +setopt no_beep +# export MANPATH="/usr/local/man:$MANPATH" + +# Load Custom Executable Functions +# [[ -f "$ZSH/config/functions.zsh" ]] && source "$ZSH/config/functions.zsh" + +# Local Config +# [[ -f ~/.zshrc.local ]] && source ~/.zshrc.local + +foreach piece ( + exports.zsh + node.zsh + aliases.zsh + functions.zsh +) { + . $ZSH/config/$piece +} + + +# - - - - - - - - - - - - - - - - - - - - +# cdr, persistent cd +# - - - - - - - - - - - - - - - - - - - - + +autoload -Uz chpwd_recent_dirs cdr add-zsh-hook +add-zsh-hook chpwd chpwd_recent_dirs +DIRSTACKFILE="$HOME/.cache/zsh/dirs" + +# Make `DIRSTACKFILE` If It 'S Not There. +if [[ ! -a $DIRSTACKFILE ]]; then + mkdir -p $DIRSTACKFILE[0,-5] + touch $DIRSTACKFILE +fi + +if [[ -f $DIRSTACKFILE ]] && [[ $#dirstack -eq 0 ]]; then + dirstack=( ${(f)"$(< $DIRSTACKFILE)"} ) +fi + +chpwd() { + print -l $PWD ${(u)dirstack} >>$DIRSTACKFILE + local d="$(sort -u $DIRSTACKFILE )" + echo "$d" > $DIRSTACKFILE +} + +DIRSTACKSIZE=20 + +setopt auto_pushd pushd_silent pushd_to_home + +setopt pushd_ignore_dups # Remove Duplicate Entries +setopt pushd_minus # This Reverts The +/- Operators. + + +# - - - - - - - - - - - - - - - - - - - - +# Theme / Prompt Customization +# - - - - - - - - - - - - - - - - - - - - + +# To Customize Prompt, Run `p10k configure` Or Edit `~/.p10k.zsh`. +[[ ! -f ~/.p10k.zsh ]] || . ~/.p10k.zsh + + +# - - - - - - - - - - - - - - - - - - - - +# End Profiling Script +# - - - - - - - - - - - - - - - - - - - - + +if [[ "$PROFILE_STARTUP" == true ]]; then + unsetopt xtrace + exec 2>&3 3>&- + zprof > ~/zshprofile$(date +'%s') +fi From a60ff64823778969ce2b66230fd8cfb1a957fe89 Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Sat, 18 Apr 2020 20:58:46 -0400 Subject: [PATCH 44/51] NICHOLAS85: Fix theme loading with changes @ https://github.com/zdharma/zinit/commit/f5b303450af0b332130a28f6ab6545b28cdd82d6 --- .../_local---config-files/config-files.plugin.zsh | 8 ++------ .../functions/_dircycle_update_cycled | 11 ----------- NICHOLAS85/.zshrc | 8 +++++--- 3 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/_dircycle_update_cycled diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh index 4eb7e8b..bfffe54 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh @@ -25,7 +25,7 @@ ZSHZ_DATA="${ZPFX}/z" AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" # Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) -UPDATELOCAL_GITDIR="${HOME}/github/Built" +UPDATELOCAL_GITDIR="${HOME}/github/built" UL_Acond='! $isdolphin' # Condition checked before running UL_Acomm UL_Acomm='cache=($chpwd_functions); chpwd_functions=()' # Command run if UL_Acond true UL_Bcomm='chpwd_functions=($cache); [ -z $1 ] && { checkupdates && print -n "\033[1;32m➜ \033[0m" } &!' # Command run after updatelocal finishes if UL_Acond was true @@ -107,8 +107,6 @@ alias open='xdg-open' alias atom='atom-beta --disable-gpu' alias apm='apm-beta' alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories -alias -- -='_dircycle_update_cycled +1 || true' -alias -- +='_dircycle_update_cycled -0 || true' (( ${+commands[brl]} )) && { (){ local stratum strata=( /bedrock/run/enabled_strata/* ) @@ -120,11 +118,9 @@ alias "r${stratum}"="strat -r ${stratum}" alias "${stratum:0:1}edots"="command sudo strat -r ${stratum} git --git-dir=/etc/.git --work-tree=/etc" done } alias bedots='command sudo git --git-dir=/bedrock/.git --work-tree=/bedrock' -LD_PRELOAD=~arch/usr/lib/libgtk3-nocsd.so.0 # Fix unable to preload msg } # dot file management -alias dots=' command git --git-dir=$HOME/.dots/ --work-tree=$HOME' -# ^Space added to remove this command from history +alias dots='command git --git-dir=$HOME/.dots/ --work-tree=$HOME' ######################### # Other # diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/_dircycle_update_cycled b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/_dircycle_update_cycled deleted file mode 100644 index 11f6ac1..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/_dircycle_update_cycled +++ /dev/null @@ -1,11 +0,0 @@ -setopt localoptions nopushdminus - -[[ ${#dirstack} -eq 0 ]] && return - -while ! builtin pushd -q $1 &>/dev/null; do - # A missing directory was found; pop it out of the directory stack. - builtin popd -q $1 - - # Stop trying if there are no more directories in the directory stack. - [[ ${#dirstack} -eq 0 ]] && break -done diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index 8d1a3e2..30099a9 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -6,8 +6,8 @@ ZINIT_BIN_DIR_NAME="${${ZINIT_BIN_DIR_NAME:-$ZPLG_BIN_DIR_NAME}:-bin}" 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" || \\ + 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" fi source "$ZINIT_HOME/$ZINIT_BIN_DIR_NAME/zinit.zsh" @@ -32,7 +32,7 @@ zt() { zinit depth'3' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } zct() { .zinit-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" \ atinit'![ -f "${thmf}/${MYPROMPT}-pre" ] && source "${thmf}/${MYPROMPT}-pre"' \ atload'![ -f "${thmf}/${MYPROMPT}-post" ] && source "${thmf}/${MYPROMPT}-post"'; \ - ZINIT_ICE+=("${(kv)ZINIT_ICES[@]}"); } + ZINIT_ICE+=("${(kv)ZINIT_ICES[@]}"); __turbo=1;} ################## # Initial Prompt # @@ -130,6 +130,8 @@ zt 0b light-mode for \ OMZ::plugins/command-not-found/command-not-found.plugin.zsh \ pick'autopair.zsh' nocompletions atload'bindkey "^H" backward-kill-word' \ hlissner/zsh-autopair \ + trackbinds bindmap'\e[1\;6D -> ^[[1\;5A; \e[1\;6C -> ^[[1\;5B' pick'dircycle.zsh'\ + michaelxmcbride/zsh-dircycle\ pick'manydots-magic' nocompile \ knu/zsh-manydots-magic \ pick'autoenv.zsh' nocompletions \ From 42041cc4b14952d06ab37ab87434b583f7708139 Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Thu, 21 May 2020 23:39:51 -0400 Subject: [PATCH 45/51] NICHOLAS85: Update personal files w/ fixes --- .../config-files.plugin.zsh | 18 +++++--- .../_local---config-files/functions/@shexit | 1 - .../_local---config-files/functions/mcsvr | 9 ++++ .../_local---config-files/patches/pure.patch | 12 +++--- NICHOLAS85/.zshrc | 41 ++++++++++--------- 5 files changed, 50 insertions(+), 31 deletions(-) delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/@shexit create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/mcsvr diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh index bfffe54..68e1f2c 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh @@ -23,16 +23,17 @@ HISTFILE="${HOME}/.histfile" WD_CONFIG="${ZPFX}/warprc" ZSHZ_DATA="${ZPFX}/z" AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" +export CUSTOMIZEPKG_CONFIG="${HOME}/.config/customizepkg" # Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) UPDATELOCAL_GITDIR="${HOME}/github/built" UL_Acond='! $isdolphin' # Condition checked before running UL_Acomm -UL_Acomm='cache=($chpwd_functions); chpwd_functions=()' # Command run if UL_Acond true -UL_Bcomm='chpwd_functions=($cache); [ -z $1 ] && { checkupdates && print -n "\033[1;32m➜ \033[0m" } &!' # Command run after updatelocal finishes if UL_Acond was true +#UL_Acomm='cache=($chpwd_functions); chpwd_functions=()' # Command run if UL_Acond true +#UL_Bcomm='chpwd_functions=($cache);' # Command run after updatelocal finishes if UL_Acond was true ZSH_AUTOSUGGEST_USE_ASYNC=true ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 -ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c50,)" +ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c100,)" ZSH_AUTOSUGGEST_MANUAL_REBIND=set ZSH_AUTOSUGGEST_STRATEGY=(history completion) FAST_ALIAS_TIPS_PREFIX="» $(tput setaf 6)" @@ -54,7 +55,7 @@ FZF_DEFAULT_OPTS=" --bind ctrl-s:toggle-sort --bind 'alt-e:execute($EDITOR {} >/dev/tty /dev/null | head -200\" ---preview-window right:50%:hidden +--preview-window right:60% " FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" colorlscommand="lsd --group-dirs first" @@ -90,6 +91,9 @@ if [[ $MYPROMPT = dolphin ]]; then # Aesthetic function for Dolphin, clear -x if cd while in Dolphin alias cd='clear -x; cd' else + autoload -Uz chpwd_recent_dirs + add-zsh-hook chpwd chpwd_recent_dirs + zstyle ':chpwd:*' recent-dirs-file "$TMPDIR/chpwd-recent-dirs" isdolphin=false fi @@ -120,7 +124,11 @@ done } alias bedots='command sudo git --git-dir=/bedrock/.git --work-tree=/bedrock' } # dot file management -alias dots='command git --git-dir=$HOME/.dots/ --work-tree=$HOME' +#alias dots='command git --git-dir=$HOME/.dots/ --work-tree=$HOME' +export DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" +export DOTBARE_DIR="$HOME/.dots" +export DOTBARE_TREE="$HOME" +export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" ######################### # Other # diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/@shexit b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/@shexit deleted file mode 100644 index 26304f5..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/@shexit +++ /dev/null @@ -1 +0,0 @@ -echo "$PWD" > $TMPDIR/olddir diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/mcsvr b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/mcsvr new file mode 100644 index 0000000..5788b49 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/mcsvr @@ -0,0 +1,9 @@ +local svrdir="${HOME}/bin/minecraft/servers" dir + +[ -x $svrdir/$1/serverstartlinux.sh ] && dir="$svrdir/$1" || { + dir=( $( echo $svrdir/* | tr ' ' '\n' | + FZF_DEFAULT_OPTS="$FORGIT_FZF_DEFAULT_OPTS -0 --nth 2..,.. + $FORGIT_ADD_FZF_OPTS" fzf ) ) +} + +[ ! -z $dir ] && systemd-inhibit --who="mcsvr ${1:-${dir:t}}" --why="Running Minecraft Server" $dir/serverstartlinux.sh diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch index c59d41b..baf24fa 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch @@ -1,13 +1,15 @@ -Removed directory from preprompt_parts variable ---- sindresorhus---pure/pure.zsh 2019-11-10 23:55:10.224774017 -0500 -+++ sindresorhus---pure/pure.zsh-patch 2019-11-10 23:57:09.871100319 -0500 -@@ -129,9 +129,6 @@ +--- sindresorhus---pure/pure.zsh 2020-05-03 23:43:20.780465483 -0400 ++++ sindresorhus---pure/pure.zsh-patch 2020-05-03 23:47:22.214491671 -0400 +@@ -131,12 +131,6 @@ # Initialize the preprompt array. local -a preprompt_parts +- # Username and machine, if applicable. +- [[ -n $prompt_pure_state[username] ]] && preprompt_parts+=($prompt_pure_state[username]) +- - # Set the path. - preprompt_parts+=('%F{${prompt_pure_colors[path]}}%~%f') - - # Add Git branch and dirty status info. + # Git branch and dirty status info. typeset -gA prompt_pure_vcs_info if [[ -n $prompt_pure_vcs_info[branch] ]]; then diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index 30099a9..a82c984 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -1,4 +1,4 @@ -# https://github.com/NICHOLAS85/dotfiles/blob/xps_13_9365/.zshrc +# https://github.com/NICHOLAS85/dotfiles/blob/xps_13_9365_refresh/.zshrc ZINIT_HOME="${ZINIT_HOME:-${ZPLG_HOME:-${ZDOTDIR:-$HOME}/.zinit}}" ZINIT_BIN_DIR_NAME="${${ZINIT_BIN_DIR_NAME:-$ZPLG_BIN_DIR_NAME}:-bin}" @@ -20,7 +20,7 @@ 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 | \ + 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]}/" fi @@ -32,7 +32,7 @@ zt() { zinit depth'3' lucid ${1/#[0-9][a-c]/wait"$1"} "${@:2}"; } zct() { .zinit-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" \ atinit'![ -f "${thmf}/${MYPROMPT}-pre" ] && source "${thmf}/${MYPROMPT}-pre"' \ atload'![ -f "${thmf}/${MYPROMPT}-post" ] && source "${thmf}/${MYPROMPT}-post"'; \ - ZINIT_ICE+=("${(kv)ZINIT_ICES[@]}"); __turbo=1;} + ZINIT_ICE+=("${(kv)ZINIT_ICES[@]}"); ___turbo=1;} ################## # Initial Prompt # @@ -62,12 +62,6 @@ zt light-mode compile'*handler' for \ # Conditional themes block # ############################ -zt pick'spaceship.zsh' compile'{lib/*,sections/*,tests/*.zsh}' for \ - if'zct spaceship-async' \ - maximbaz/spaceship-prompt \ - if'zct spaceship' \ - denysdovhan/spaceship-prompt - zt pick'spacezsh.zsh' if'zct spaceship-async2' for \ compile'{presets/^(*.zwc),lib/**/^(*.zwc),sections/^(*.zwc)}' \ laggardkernel/spacezsh-prompt @@ -104,8 +98,6 @@ zt light-mode for \ ################## zt 0a light-mode for \ - pick'fz.sh' patch"$pchf/%PLUGIN%.patch" nocompile'!' \ - changyuheng/fz \ OMZ::lib/completion.zsh \ as'completion' mv'*.zsh -> _git' \ felipec/git-completion \ @@ -116,7 +108,9 @@ zt 0a light-mode for \ zsh-users/zsh-completions \ compile'{src/*.zsh,src/strategies/*}' pick'zsh-autosuggestions.zsh' \ atload'_zsh_autosuggest_start' \ - zsh-users/zsh-autosuggestions + zsh-users/zsh-autosuggestions \ + pick'fz.sh' patch"$pchf/%PLUGIN%.patch" nocompile'!' atload'ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(autopair-insert __fz_zsh_completion)' \ + changyuheng/fz ################## # Wait'0b' block # @@ -128,15 +122,15 @@ zt 0b light-mode for \ compile'{hsmw-*,test/*}' \ zdharma/history-search-multi-word \ OMZ::plugins/command-not-found/command-not-found.plugin.zsh \ - pick'autopair.zsh' nocompletions atload'bindkey "^H" backward-kill-word' \ + 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\;5A; \e[1\;6C -> ^[[1\;5B' pick'dircycle.zsh'\ + trackbinds bindmap'\e[1\;6D -> ^[[1\;5B; \e[1\;6C -> ^[[1\;5A' pick'dircycle.zsh' \ michaelxmcbride/zsh-dircycle\ - pick'manydots-magic' nocompile \ + autoload'manydots-magic' atload'manydots-magic' \ knu/zsh-manydots-magic \ pick'autoenv.zsh' nocompletions \ Tarrasch/zsh-autoenv \ - atinit'zicompinit_fast; zicdreplay' \ + 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' \ @@ -155,7 +149,7 @@ zt 0c light-mode for \ sei40kr/fast-alias-tips-bin zt 0c light-mode pick'/dev/null' for \ - sbin'fd*/fd; fd*/fd -> fdfind' from"gh-r" \ + 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 @@ -172,11 +166,18 @@ zt 0c light-mode as'null' for \ sbin'*/rm-trash' atload'alias rm="rm-trash ${rm_opts}"' reset \ patch"$pchf/%PLUGIN%.patch" \ nateshmbhat/rm-trash \ - id-as'Cleanup' nocd atinit'unset -f zct zt; SPACESHIP_PROMPT_ADD_NEWLINE=true' \ + sbin'dotbare;dotbare -> dots' \ + kazhala/dotbare \ + id-as'Cleanup' nocd atinit'unset -f zct zt; SPACESHIP_PROMPT_ADD_NEWLINE=true; _zsh_autosuggest_bind_widgets' \ zdharma/null $isdolphin || { dotscheck && echo -[[ $PWD = ~ ]] && { cd "$(cat $TMPDIR/olddir)" } 2>/dev/null || true -trap @shexit EXIT +(){ + 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}") +} } From 79770c8efe36080bf222683aedc29c41ec29b532 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Fri, 19 Jun 2020 22:04:13 +0200 Subject: [PATCH 46/51] psprint: Switch the prompt --- psprint/zshrc.zsh | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index 65ca563..e6bcb3d 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -1,8 +1,3 @@ -# Enable Powerlevel10k instant prompt. Should stay at the top of ~/.zshrc. -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi - # # Exports # @@ -329,11 +324,6 @@ zinit load'![[ $MYPROMPT = 7 ]]' unload'![[ $MYPROMPT != 7 ]]' \ atload'!prompt_zinc_setup; prompt_zinc_precmd' nocd for \ robobenklein/zinc -# Theme no. 8 - powerlevel10k -zinit load'![[ $MYPROMPT = 8 ]]' unload'![[ $MYPROMPT != 8 ]]' \ - atload'!source ~/.p10k.zsh; _p9k_precmd' lucid nocd for \ - romkatv/powerlevel10k - # Theme no. 9 - git-prompt zinit lucid load'![[ $MYPROMPT = 9 ]]' unload'![[ $MYPROMPT != 9 ]]' \ atload'!_zsh_git_prompt_precmd_hook' nocd for \ @@ -504,12 +494,7 @@ zinit as"null" wait"3" lucid for \ zflai-msg "[zshrc] Zplugin block took ${(M)$(( SECONDS * 1000 ))#*.?} ms" -# powerlevel10k -MYPROMPT=8 - -# Load within zshrc – for the instant prompt -zinit atload'!source ~/.p10k.zsh' lucid nocd -zinit load romkatv/powerlevel10k +MYPROMPT=1 # # Zstyles & other From 7146d60035b984d1e030c0f310440f9c317d865a Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Fri, 19 Jun 2020 23:40:21 +0200 Subject: [PATCH 47/51] psprint: Update --- psprint/zshrc.zsh | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index e6bcb3d..4d9b0e1 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -263,7 +263,7 @@ autoload -Uz _zinit # Zplugin annexes # zinit-zsh/z-a-man \ zinit light-mode for \ - zinit-zsh/z-a-test \ + zinit-zsh/z-a-as-monitor \ zinit-zsh/z-a-patch-dl \ zinit-zsh/z-a-submods \ zinit-zsh/z-a-bin-gem-node \ @@ -339,20 +339,7 @@ zinit wait"2" lucid as"null" for \ # revolver zinit wait"2" lucid as"program" pick"revolver" for psprint/revolver -# On OSX, you might need to install coreutils from homebrew and use the -# g-prefix – gsed, gdircolors -: zinit wait"0c" lucid 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:*:default" list-colors "${(s.:.)LS_COLORS}";' for \ - trapd00r/LS_COLORS - -zinit wait"0c" lucid \ - atload'zstyle ":completion:*" list-colors "${(s.:.)LS_COLORS}";' for \ - zpm-zsh/dircolors-material +zi pack for dircolors-material # Zconvey shell integration plugin zinit wait lucid \ @@ -381,22 +368,8 @@ zinit wait lucid for \ hlissner/zsh-autopair \ urbainvaes/fzf-marks -# hiredis library needed for zredis plugin -zinit wait"1" lucid make"PREFIX=$ZPFX all install" pick"/dev/null" for \ - redis/hiredis - -# zredis together with some binding/tying -zstyle ":plugin:zredis" configure_opts "--without-tcsetpgrp" -zstyle ":plugin:zredis" cflags "-Wall -O2 -g -Wno-unused-but-set-variable" -zinit wait"1" lucid \ - atload'ztie -d db/redis -a 127.0.0.1:4815/5 -zSL main rdhash' for \ - zdharma/zredis - # A few wait"1 plugins zinit wait"1" lucid for \ - zdharma/zredis-cmd \ - service"redis" \ - zservices/redis \ psprint/zsh-navigation-tools \ atinit'zstyle ":history-search-multi-word" page-size "7"' \ zdharma/history-search-multi-word \ From 594131a2900186c681923cbc1a73bfffabbbfae8 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Mon, 29 Jun 2020 10:50:50 +0200 Subject: [PATCH 48/51] psprint: Update --- psprint/zshrc.zsh | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index 4d9b0e1..0f94865 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -324,8 +324,8 @@ zinit load'![[ $MYPROMPT = 7 ]]' unload'![[ $MYPROMPT != 7 ]]' \ atload'!prompt_zinc_setup; prompt_zinc_precmd' nocd for \ robobenklein/zinc -# Theme no. 9 - git-prompt -zinit lucid load'![[ $MYPROMPT = 9 ]]' unload'![[ $MYPROMPT != 9 ]]' \ +# 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 @@ -339,7 +339,7 @@ zinit wait"2" lucid as"null" for \ # revolver zinit wait"2" lucid as"program" pick"revolver" for psprint/revolver -zi pack for dircolors-material +zinit pack for dircolors-material # Zconvey shell integration plugin zinit wait lucid \ @@ -350,17 +350,8 @@ zinit wait lucid \ : 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 -# fzy -zinit wait"1" lucid as"program" pick"$ZPFX/bin/fzy*" \ - atclone"cp contrib/fzy-* $ZPFX/bin/" \ - make"!PREFIX=$ZPFX install" for \ - jhawthorn/fzy - # remark -zinit wait'1c' lucid id-as'remark' \ - sbin'n:node_modules/.bin/remark' \ - node'remark <- !remark-cli; remark-man' for \ - zdharma/null +zinit pack for remark # zsh-autopair # fzf-marks, at slot 0, for quick Ctrl-G accessibility @@ -403,13 +394,11 @@ zinit wait"2" lucid trigger-load'!gi;!gii' \ # 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 \ - sbin junegunn/fzf-bin + mv"fd* -> fd" sbin"fd/fd" @sharkdp/fd -# vramsteg -zinit wait"2" lucid as"null" sbin"src/vramsteg" \ - atclone'cmake .' atpull'%atclone' make for \ - psprint/vramsteg-zsh +# fzf, fzy +zinit pack"bgn-binary" for fzf +zinit pack"bgn" for fzy # A few wait'2' plugins zinit wait"2" lucid for \ From 28bc8ff51f632c603f5ad80d83f4273acdc12606 Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Mon, 27 Jul 2020 22:23:05 -0400 Subject: [PATCH 49/51] NICHOLAS85: Fix for latest version of zinit + update config --- .../config-files.plugin.zsh | 41 +- .../functions/auto-ls-colorls | 7 - .../_local---config-files/functions/chpwd_ls | 2 + .../_local---config-files/functions/whichedit | 7 + .../patches/auto-ls.patch | 24 - .../_local---config-files/patches/pure.patch | 15 - .../patches/rm-trash.patch | 47 +- .../patches/zsh-dircycle.patch | 13 + .../_local---config-files/themes/dolphin-post | 8 - .../themes/dolphin-post.zsh | 193 +++ .../_local---config-files/themes/dolphin-pre | 3 - .../themes/p10k-post.zsh | 1445 +++++++++++++++++ .../themes/spaceship-async-post | 63 - .../themes/spaceship-async2-post | 55 - .../themes/spaceship-post | 38 - NICHOLAS85/.zshrc | 125 +- 16 files changed, 1783 insertions(+), 303 deletions(-) delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/auto-ls-colorls create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/chpwd_ls create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/whichedit delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post.zsh delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-pre create mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/themes/p10k-post.zsh delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async2-post delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh index 68e1f2c..af2a925 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh @@ -12,6 +12,8 @@ fpath=("${0:h}/functions" "${fpath[@]}") autoload -Uz $fpath[1]/*(.:t) +! $isdolphin && add-zsh-hook chpwd chpwd_ls + ######################### # Variables # ######################### @@ -19,7 +21,6 @@ autoload -Uz $fpath[1]/*(.:t) pchf="${0:h}/patches" thmf="${0:h}/themes" GENCOMPL_FPATH="${0:h}/completions" -HISTFILE="${HOME}/.histfile" WD_CONFIG="${ZPFX}/warprc" ZSHZ_DATA="${ZPFX}/z" AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" @@ -27,9 +28,6 @@ export CUSTOMIZEPKG_CONFIG="${HOME}/.config/customizepkg" # Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) UPDATELOCAL_GITDIR="${HOME}/github/built" -UL_Acond='! $isdolphin' # Condition checked before running UL_Acomm -#UL_Acomm='cache=($chpwd_functions); chpwd_functions=()' # Command run if UL_Acond true -#UL_Bcomm='chpwd_functions=($cache);' # Command run after updatelocal finishes if UL_Acond was true ZSH_AUTOSUGGEST_USE_ASYNC=true ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 @@ -58,14 +56,13 @@ FZF_DEFAULT_OPTS=" --preview-window right:60% " FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" -colorlscommand="lsd --group-dirs first" -colorlsgitcommand="colorls --sd --gs -A" AUTO_LS_COMMANDS="colorls" AUTO_LS_NEWLINE=false FZ_HISTORY_CD_CMD=zshz ZSHZ_CMD="" # Don't set the alias, fz will cover that +ZSHZ_UNCOMMON=1 forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin # Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) @@ -74,7 +71,6 @@ dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' \.config/gtk-3\.0/settings\.ini ) # Export variables when connected via SSH if [[ -n $SSH_CONNECTION ]]; then export DISPLAY=:0 - colorlscommand=(lsd --group-dirs first --icon never) alias ls="lsd --group-dirs=first --icon=never" else alias ls='lsd --group-dirs=first' @@ -85,25 +81,13 @@ if [[ $(cat /run/tlp/last_pwr) = 0 ]]; then alias micro="micro -fastdirty false" fi -# Used to programatically disable plugins when opening the terminal view in dolphin -if [[ $MYPROMPT = dolphin ]]; then - isdolphin=true - # Aesthetic function for Dolphin, clear -x if cd while in Dolphin - alias cd='clear -x; cd' -else - autoload -Uz chpwd_recent_dirs - add-zsh-hook chpwd chpwd_recent_dirs - zstyle ':chpwd:*' recent-dirs-file "$TMPDIR/chpwd-recent-dirs" - isdolphin=false -fi - ######################### # Aliases # ######################### # Access zsh config files -alias zshconf="(){ setopt extendedglob local_options; kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}*~*.zwc }" -alias zshconfatom="(){ setopt extendedglob local_options; atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}*~*.zwc &! }" +alias zshconf="(){ setopt extendedglob local_options; kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc }" +alias zshconfatom="(){ setopt extendedglob local_options; atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc &! }" alias t='tail -f' alias g='git' @@ -111,6 +95,12 @@ alias open='xdg-open' alias atom='atom-beta --disable-gpu' alias apm='apm-beta' alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories +# Aesthetic function for Dolphin, clear -x if cd while in Dolphin +$isdolphin && alias cd='clear -x; cd' + +# dot file management +alias dots='DOTBARE_DIR="$HOME/.dots" DOTBARE_TREE="$HOME" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" dotbare' +export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" (( ${+commands[brl]} )) && { (){ local stratum strata=( /bedrock/run/enabled_strata/* ) @@ -121,14 +111,8 @@ alias "r${stratum}"="strat -r ${stratum}" [[ -d "/bedrock/strata/${stratum}/etc/.git" ]] && \ alias "${stratum:0:1}edots"="command sudo strat -r ${stratum} git --git-dir=/etc/.git --work-tree=/etc" done } -alias bedots='command sudo git --git-dir=/bedrock/.git --work-tree=/bedrock' +alias bedots='command sudo DOTBARE_FZF_DEFAULT_OPTS="$DOTBARE_FZF_DEFAULT_OPTS" DOTBARE_DIR="/bedrock/.git" DOTBARE_TREE="/bedrock" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/bdotbare" dotbare' } -# dot file management -#alias dots='command git --git-dir=$HOME/.dots/ --work-tree=$HOME' -export DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" -export DOTBARE_DIR="$HOME/.dots" -export DOTBARE_TREE="$HOME" -export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" ######################### # Other # @@ -165,6 +149,7 @@ zstyle ':completion:*' group-name '' zstyle ':completion:*' verbose yes zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' +zstyle ':completion:*' use-cache true zstyle ':completion:*' rehash true bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/auto-ls-colorls b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/auto-ls-colorls deleted file mode 100644 index 4d47364..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/auto-ls-colorls +++ /dev/null @@ -1,7 +0,0 @@ -if [ -d .git ] && ! [[ -n $SSH_CONNECTION ]]; then - eval "${colorlsgitcommand[@]}" - echo -else - eval "${colorlscommand[@]}" - echo -fi diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/chpwd_ls b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/chpwd_ls new file mode 100644 index 0000000..a9567a3 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/chpwd_ls @@ -0,0 +1,2 @@ +emulate -L zsh +lsd --group-dirs=first diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/whichedit b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/whichedit new file mode 100644 index 0000000..74b3935 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/whichedit @@ -0,0 +1,7 @@ +local fulldir="$(which ${1})" + +if file -b -L --mime-type "${fulldir}" | grep -q "text/"; then + "${EDITOR}" "${fulldir}" +else + echo "Not a text file, not editing..." +fi diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch deleted file mode 100644 index a9056f7..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/auto-ls.patch +++ /dev/null @@ -1,24 +0,0 @@ -Add compatibility with history-search-multi-word ---- desyncr---auto-ls/auto-ls.zsh 2020-01-31 18:55:08.466100189 -0500 -+++ desyncr---auto-ls/auto-ls.patch 2020-01-31 18:56:36.476222054 -0500 -@@ -34,9 +34,10 @@ - # 1. Called from `chpwd_functions` – show file list - # 2. Called by another ZLE plugin (like `dirhistory`) through `zle accept-line` – show file list - # 3. Called by ZLE itself – only should file list if prompt was empty -+ local cmd pLASTWIDGET=${LASTWIDGET} - if ! zle \ - || { [[ ${WIDGET} != accept-line ]] && [[ ${LASTWIDGET} != .accept-line ]] }\ -- || { [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]] }; then -+ || { [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]] && ! [[ $pLASTWIDGET =~ history-search-multi-word ]] }; then - zle && echo - for cmd in $AUTO_LS_COMMANDS; do - # If we detect a command with full path, ex: /bin/ls execute it -@@ -51,7 +52,7 @@ - - # Forward this event down the ZLE stack - if zle; then -- if [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]]; then -+ if [[ ${WIDGET} == accept-line ]] && [[ $#BUFFER -eq 0 ]] && ! [[ $pLASTWIDGET =~ history-search-multi-word ]]; then - # Shortcut to reduce the number of empty lines appearing - # when pressing Enter - echo && zle redisplay diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch deleted file mode 100644 index baf24fa..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/pure.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- sindresorhus---pure/pure.zsh 2020-05-03 23:43:20.780465483 -0400 -+++ sindresorhus---pure/pure.zsh-patch 2020-05-03 23:47:22.214491671 -0400 -@@ -131,12 +131,6 @@ - # Initialize the preprompt array. - local -a preprompt_parts - -- # Username and machine, if applicable. -- [[ -n $prompt_pure_state[username] ]] && preprompt_parts+=($prompt_pure_state[username]) -- -- # Set the path. -- preprompt_parts+=('%F{${prompt_pure_colors[path]}}%~%f') -- - # Git branch and dirty status info. - typeset -gA prompt_pure_vcs_info - if [[ -n $prompt_pure_vcs_info[branch] ]]; then diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch index 9effb20..61a8778 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch @@ -1,9 +1,50 @@ -Don't run on sudo ---- nateshmbhat---rm-trash/rm-trash/rm-trash 2019-11-10 19:53:09.176336482 -0500 -+++ nateshmbhat---rm-trash/rm-trash/rm-trash-patch 2019-11-10 19:47:32.273906720 -0500 +Don't run on sudo, Fix arg handling +--- nateshmbhat---rm-trash/rm-trash/rm-trash 2020-05-22 20:42:16.267371553 -0400 ++++ nateshmbhat---rm-trash/rm-trash/rm-trash-patch 2020-05-22 20:42:13.677459148 -0400 @@ -1,4 +1,5 @@ #!/bin/bash +[[ $EUID = 0 ]] && { echo "Root detected, running builtin rm"; command rm ${rm_opts} "${@}"; exit; } # MIT License +@@ -238,7 +239,7 @@ + + LOOPENTERFLAG=0 + +- for file in ${FILE_ARGS[@]} ++ for file in "${FILE_ARGS[@]}" + do + LOOPENTERFLAG=1 + if [ $DEBUGFLAG -eq 1 ] ; then +@@ -273,7 +274,7 @@ + exit 1 + fi + +- for arg in $@ ; do ++ for arg in "$@" ; do + + if [ "${arg:0:1}" == '-' ] ; then + if [ "$arg" == "--no-trash" ] ;then +@@ -283,7 +284,7 @@ + + OPTIONAL_ARGS+=($arg) + else +- FILE_ARGS+=($arg) ++ FILE_ARGS+=("$arg") + fi + + case "$arg" in +@@ -318,10 +319,10 @@ + + + +-handleArguments $@ ++handleArguments "$@" + if [ $DEBUGFLAG -eq 1 ] ;then + echo ${OPTIONAL_ARGS[@]} + echo ${FILE_ARGS[@]} + fi + +-main $@ +\ No newline at end of file ++main $@ diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch new file mode 100644 index 0000000..4cafdfb --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch @@ -0,0 +1,13 @@ +--- michaelxmcbride---zsh-dircycle/dircycle.zsh 2020-05-30 02:35:14.123391113 -0400 ++++ michaelxmcbride---zsh-dircycle/dircycle.zsh-patch 2020-05-30 02:39:33.544349578 -0400 +@@ -18,7 +18,9 @@ + prompt_pure_async_tasks + prompt_pure_preprompt_render + else +- zle reset-prompt ++ _p9k_precmd ++ zle .reset-prompt ++ zle -R + fi + } + diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post deleted file mode 100644 index d5c45ca..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post +++ /dev/null @@ -1,8 +0,0 @@ -# Add exit code to RPROMPT -precmd_pipestatus() { - RPROMPT="${(j.|.)pipestatus}" - if [[ ${(j.|.)pipestatus} = 0 ]]; then - RPROMPT="" - fi -} -add-zsh-hook precmd precmd_pipestatus diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post.zsh b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post.zsh new file mode 100644 index 0000000..36f9584 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post.zsh @@ -0,0 +1,193 @@ +# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure). +# +# Differences from Pure: +# +# - Git: +# - `@c4d3ec2c` instead of something like `v1.4.0~11` when in detached HEAD state. +# - No automatic `git fetch` (the same as in Pure with `PURE_GIT_PULL=0`). +# +# Apart from the differences listed above, the replication of Pure prompt is exact. This includes +# even the questionable parts. For example, just like in Pure, there is no indication of Git status +# being stale; prompt symbol is the same in command, visual and overwrite vi modes; when prompt +# doesn't fit on one line, it wraps around with no attempt to shorten it. +# +# If you like the general style of Pure but not particularly attached to all its quirks, type +# `p10k configure` and pick "Lean" style. This will give you slick minimalist prompt while taking +# advantage of Powerlevel10k features that aren't present in Pure. + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh + + # Unset all configuration options. + unset -m 'POWERLEVEL9K_*|DEFAULT_USER' + + # Zsh >= 5.1 is required. + autoload -Uz is-at-least && is-at-least 5.1 || return + + # Prompt colors. + local grey=242 + local red=1 + local yellow=3 + local blue=4 + local magenta=5 + local cyan=6 + local white=7 + + # Left prompt segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + #context # user@host + # dir # current directory + # =========================[ Line #2 ]========================= + # newline # \n + # virtualenv # python virtual environment + prompt_char # prompt symbol + ) + + # Right prompt segments. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + # command_execution_time # previous command duration + # virtualenv # python virtual environment + # context # user@host + # time # current time + # =========================[ Line #2 ]========================= + # newline # \n + command_execution_time # previous command duration + vcs # git status + ) + + # Basic style options that define the overall prompt look. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol + typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION= # no segment icons + + # Add an empty line before each prompt except the first. This doesn't emulate the bug + # in Pure that makes prompt drift down whenever you use the Alt-C binding from fzf or similar. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + + # Magenta prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=$magenta + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=$red + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode is the same as in command mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❮' + # Prompt symbol in overwrite vi mode is the same as in command mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=false + + # Grey Python Virtual Environment. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=$grey + # Don't show Python version. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + + # Blue current directory. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue + + # Context format when root: user@host. The first part white, the rest grey. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE="%F{$white}%n%f%F{$grey}@%m%f" + # Context format when not root: user@host. The whole thing grey. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE="%F{$grey}%n@%m%f" + # Don't show context unless root or in SSH. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION= + + # Show previous command duration only if it's >= 5s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5 + # Don't show fractional seconds. Thus, 7s rather than 7.3s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Yellow previous command duration. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$yellow + + # Grey Git prompt. This makes stale prompts indistinguishable from up-to-date ones. + typeset -g POWERLEVEL9K_VCS_FOREGROUND=$grey + + # Disable async loading indicator to make directories that aren't Git repositories + # indistinguishable from large Git repositories without known state. + typeset -g POWERLEVEL9K_VCS_LOADING_TEXT= + + # Don't wait for Git status even for a millisecond, so that prompt always updates + # asynchronously when Git state changes. + typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0 + + # Cyan ahead/behind arrows. + typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan + # Don't show remote branch, current tag or stashes. + typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind) + # Don't show the branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= + # When in detached HEAD state, show @commit where branch normally goes. + typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@' + # Don't show staged, unstaged, untracked indicators. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON= + # Show '*' when there are staged, unstaged or untracked files. + typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*' + # Show '⇣' if local branch is behind remote. + typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣' + # Show '⇡' if local branch is ahead of remote. + typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡' + # Don't show the number of commits next to the ahead/behind arrows. + typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1 + # Remove space between '⇣' and '⇡' and all trailing spaces. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }' + + # Grey current time. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=$grey + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands rather than the end times of + # their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-pre b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-pre deleted file mode 100644 index ee1e8f6..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-pre +++ /dev/null @@ -1,3 +0,0 @@ -prompt_newline='%666v' -PROMPT=" $PROMPT" -PURE_PROMPT_SYMBOL='➜' diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/p10k-post.zsh b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/p10k-post.zsh new file mode 100644 index 0000000..0523210 --- /dev/null +++ b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/p10k-post.zsh @@ -0,0 +1,1445 @@ +# Generated by Powerlevel10k configuration wizard on 2020-02-16 at 21:17 PST. +# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 2588. +# Wizard options: nerdfont-complete + powerline, small icons, classic, darkest, +# slanted separators, round heads, round tails, 2 lines, dotted, left frame, sparse, +# many icons, concise, transient_prompt, instant_prompt=verbose. +# Type `p10k configure` to generate another config. +# +# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate +# your own config based on it. +# +# Tip: Looking for a nice color? Here's a one-liner to print colormap. +# +# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%8)):#7}:+$'\n'}; done + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh + setopt no_unset extended_glob + + # Unset all configuration options. This allows you to apply configiguration changes without + # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. + unset -m 'POWERLEVEL9K_*' + + autoload -Uz is-at-least && is-at-least 5.1 || return + + zmodload zsh/langinfo + if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then + local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8} + fi + + # The list of segments shown on the left. Fill it with the most important segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + # os_icon # os identifier + dir # current directory + vcs # git status + # =========================[ Line #2 ]========================= + newline # \n + prompt_char # prompt symbol + ) + + # The list of segments shown on the right. Fill it with less important segments. + # Right prompt on the last prompt line (where you are typing your commands) gets + # automatically hidden when the input line reaches it. Right prompt above the + # last prompt line gets hidden if it would overlap with left prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + command_execution_time # duration of the last command + status # exit code of the last command + background_jobs # presence of background jobs + # direnv # direnv status (https://direnv.net/) + context # user@hostname + # vi_mode # vi mode (you don't need this if you've enabled prompt_char) + # =========================[ Line #2 ]========================= + newline # \n + command_execution_time + status + time + dir + ) + + # To enable default icons for all segments, don't define POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION + # or set it to '${P9K_VISUAL_IDENTIFIER}'. + # + # To remove trailing space from all default icons, set POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION + # to '${P9K_VISUAL_IDENTIFIER% }'. + # + # To enable default icons for one segment (e.g., dir), set + # POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'. + # + # To assign a specific icon to one segment (e.g., dir), set + # POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='⭐'. + # + # To assign a specific icon to a segment in a given state (e.g., dir in state NOT_WRITABLE), + # set POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'. + # + # Note: You can use $'\u2B50' instead of '⭐'. It's especially convenient when specifying + # icons that your text editor cannot render. Don't forget to put $ and use single quotes when + # defining icons via Unicode codepoints. + # + # Note: Many default icons cannot be displayed with system fonts. You'll need to install a + # capable font to use them. See POWERLEVEL9K_MODE below. + typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER% }' + + # This option makes a difference only when default icons are enabled for all or some prompt + # segments (see POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION above). LOCK_ICON can be printed as + # $'\uE0A2', $'\uE138' or $'\uF023' depending on POWERLEVEL9K_MODE. The correct value of this + # parameter depends on the provider of the font your terminal is using. + # + # Font Provider | POWERLEVEL9K_MODE + # ---------------------------------+------------------- + # Powerline | powerline + # Font Awesome | awesome-fontconfig + # Adobe Source Code Pro | awesome-fontconfig + # Source Code Pro | awesome-fontconfig + # Awesome-Terminal Fonts (regular) | awesome-fontconfig + # Awesome-Terminal Fonts (patched) | awesome-patched + # Nerd Fonts | nerdfont-complete + # Other | compatible + # + # If this looks overwhelming, either stick with a preinstalled system font and set + # POWERLEVEL9K_MODE=compatible, or install the recommended Powerlevel10k font from + # https://github.com/romkatv/powerlevel10k/#recommended-meslo-nerd-font-patched-for-powerlevel10k + # and set POWERLEVEL9K_MODE=nerdfont-complete. + typeset -g POWERLEVEL9K_MODE=nerdfont-complete + + # When set to true, icons appear before content on both sides of the prompt. When set + # to false, icons go after content. If empty or not set, icons go before content in the left + # prompt and after content in the right prompt. + # + # You can also override it for a specific segment: + # + # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false + # + # Or for a specific segment in specific state: + # + # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false + typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= + + # Add an empty line before each prompt. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true + + # Connect left prompt lines with these symbols. You'll probably want to use the same color + # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. +# typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%238F╭─' +# typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%238F├─' +# typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%238F╰─' + # Connect right prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= + + # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or + # '─'. The last two make it easier to see the alignment between left and right prompt and to + # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + # for more compact prompt if using using this option. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='' + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= + if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then + # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE + # ornaments defined above. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=238 + # Start filler from the edge of the screen if there are no left segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' + # End filler on the edge of the screen if there are no right segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' + fi + ZLE_RPROMPT_INDENT=0 + + # Default background color. + typeset -g POWERLEVEL9K_BACKGROUND= +POWERLEVEL9K_LOCK_ICON='%197F' + # Separator between same-color segments on the left. + typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%242F⎸' + # Separator between same-color segments on the right. + typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='' + # Separator between different-color segments on the left. + typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0BC' + # Separator between different-color segments on the right. + typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0BA' + # The right end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + # The left end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + # Left prompt terminator for lines without any segments. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + #################################[ os_icon: os identifier ]################################## + # OS identifier color. + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255 + # Make the icon bold. + typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT// }' + + ################################[ prompt_char: prompt symbol ]################################ + # Transparent background. + typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= + # Green prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='➜' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='Ⅴ' + # Prompt symbol in overwrite vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true + # No line terminator if prompt_char is the last segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= + # No line introducer if prompt_char is the first segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + # No surrounding whitespace. + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_LEFT_WHITESPACE= # no surrounding whitespace + + ##################################[ dir: current directory ]################################## + # Default current directory color. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=012 + # If directory is too long, shorten some of its segments to the shortest possible unique + # prefix. The shortened directory can be tab-completed to the original. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique + # Replace removed segment suffixes with this symbol. + typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= + # Color of the shortened directory segments. + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 + # Color of the anchor directory segments. Anchor segments are never shortened. The first + # segment is always an anchor. + typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 + # Display anchor directory segments in bold. + typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true + # Don't shorten directories that contain any of these files. They are anchors. + local anchor_files=( + .bzr + .citc + .git + .hg + .node-version + .python-version + .go-version + .ruby-version + .lua-version + .java-version + .perl-version + .php-version + .tool-version + .shorten_folder_marker + .svn + .terraform + CVS + Cargo.toml + composer.json + go.mod + package.json + ) + typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" + # If set to true, remove everything before the last (deepest) subdirectory that contains files + # matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is + # /foo/bar/git_repo/baz, prompt will display git_repo/baz. This assumes that /foo/bar/git_repo + # contains a marker (.git) and other directories don't. + typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false + # Don't shorten this many last directory segments. They are anchors. + typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 + # Shorten directory if it's longer than this even if there is space for it. The value can + # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, + # directory will be shortened only when prompt doesn't fit or when other parameters demand it + # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). + # If set to `0`, directory will always be shortened to its minimum length. + typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this + # many columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least + # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 + # If set to true, embed a hyperlink into the directory. Useful for quickly + # opening a directory in the file manager simply by clicking the link. + # Can also be handy when the directory is shortened, as it allows you to see + # the full directory that was used in previous commands. + typeset -g POWERLEVEL9K_DIR_HYPERLINK=false + + # Enable special styling for non-writable directories. + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=true + # Show this icon when the current directory is not writable. POWERLEVEL9K_DIR_SHOW_WRITABLE + # above must be set to true for this parameter to have effect. + # typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Custom prefix. + # typeset -g POWERLEVEL9K_DIR_PREFIX='%244Fin ' + + # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons for different directories. + # It must be an array with 3 * N elements. Each triplet consists of: + # + # 1. A pattern against which the current directory is matched. Matching is done with + # extended_glob option enabled. + # 2. Directory class for the purpose of styling. + # 3. Icon. + # + # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. If there + # are no matches, the directory will have no icon. + # + # Example: + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=( + # '~/work(|/*)' WORK '(╯°□°)╯︵ ┻━┻' + # '~(|/*)' HOME '⌂' + # '*' DEFAULT '') + # + # With these settings, the current directory in the prompt may look like this: + # + # (╯°□°)╯︵ ┻━┻ ~/work/projects/important/urgent + # + # Or like this: + # + # ⌂ ~/best/powerlevel10k + # + # You can also set different colors for directories of different classes. Remember to override + # FOREGROUND, SHORTENED_FOREGROUND and ANCHOR_FOREGROUND for every directory class that you wish + # to have its own color. + # + # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=() + + #####################################[ vcs: git status ]###################################### + # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' + POWERLEVEL9K_VCS_BRANCH_ICON=${(g::)POWERLEVEL9K_VCS_BRANCH_ICON} + + # Untracked files icon. It's really a question mark, your font isn't broken. + # Change the value of this parameter to show a different icon. + typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' + POWERLEVEL9K_VCS_UNTRACKED_ICON=${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON} + + typeset -g POWERLEVEL9K_VCS_GIT_{GITHUB,GITLAB}_ICON="" + typeset -g POWERLEVEL9K_VCS_GIT_ICON="" + typeset -g POWERLEVEL9K_TIME_ICON="" + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_ICON="✦" + typeset -g POWERLEVEL9K_EXECUTION_TIME_ICON="" + #POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="" + typeset -g POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR="" + #POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR="" + #POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR="" + #POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="" + #POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX="" + #POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR="" + + # Formatter for Git status. + # + # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # + # You can edit the function to customize how Git status looks. + # + # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: + # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. + function my_git_formatter() { + emulate -L zsh + + if [[ -n $P9K_CONTENT ]]; then + # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from + # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. + typeset -g my_git_format=$P9K_CONTENT + return + fi + + if (( $1 )); then + # Styling for up-to-date Git status. + local meta='%244F' # grey foreground + local clean='%76F' # green foreground + local modified='%178F' # yellow foreground + local untracked='%39F' # blue foreground + local conflicted='%196F' # red foreground + else + # Styling for incomplete and stale Git status. + local meta='%244F' # grey foreground + local clean='%244F' # grey foreground + local modified='%244F' # grey foreground + local untracked='%244F' # grey foreground + local conflicted='%244F' # grey foreground + fi + + local res + local where # branch or tag + if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then + res+="${clean}${POWERLEVEL9K_VCS_BRANCH_ICON}" + where=${(V)VCS_STATUS_LOCAL_BRANCH} + elif [[ -n $VCS_STATUS_TAG ]]; then + res+="${meta}#" + where=${(V)VCS_STATUS_TAG} + fi + + # If local branch name or tag is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + (( $#where > 32 )) && where[13,-13]="…" + res+="${clean}${where//\%/%%}" # escape % + + # Display the current Git commit if there is no branch or tag. + # Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line. + [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" + + # Show tracking branch name if it differs from local branch. + if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then + res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % + fi + + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + # ⇠42 if behind the push remote. + (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" + (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " + # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. + (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" + # *42 if have stashes. + (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" + # 'merge' if the repo is in an unusual state. + [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" + # ~42 if have merge conflicts. + (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" + # +42 if have staged changes. + (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" + # !42 if have unstaged changes. + (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" + # ?42 if have untracked files. It's really a question mark, your font isn't broken. + # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. + # Remove the next line if you don't want to see untracked files at all. + (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" + # "─" if the number of unstaged files is unknown. This can happen due to + # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower + # than the number of files in the Git index, or due to bash.showDirtyState being set to false + # in the repository config. The number of staged and untracked files may also be unknown + # in this case. + (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" + + typeset -g my_git_format=$res + } + functions -M my_git_formatter 2>/dev/null + + # Don't count the number of unstaged, untracked and conflicted files in Git repositories with + # more than this many files in the index. Negative value means infinity. + # + # If you are working in Git repositories with tens of millions of files and seeing performance + # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output + # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's + # config: `git config bash.showDirtyState false`. + typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~|~/some/dir'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + + # Disable the default Git status formatting. + typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true + # Install our own Git status formatter. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' + typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' + # Enable counters for staged, unstaged, etc. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 + + # Icon color. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 + typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 + # Custom icon. + # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_VCS_PREFIX='%244Fon ' + + # Show status of repositories of these types. You can add svn and/or hg if you are + # using them. If you do, your prompt may become slow even when your current directory + # isn't in an svn or hg reposotiry. + typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) + + # These settings are used for respositories other than Git or when gitstatusd fails and + # Powerlevel10k has to fall back to using vcs_info. + typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 + + ##########################[ status: exit code of the last command ]########################### + # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and + # style them independently from the regular OK and ERROR state. + typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true + + # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as + # it will signify success by turning green. + typeset -g POWERLEVEL9K_STATUS_OK=false + typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when some part of a pipe command fails but the overall exit status is zero. It may look + # like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_OK_PIPE=false + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as + # it will signify error by turning red. + typeset -g POWERLEVEL9K_STATUS_ERROR=true + typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when the last command was terminated by a signal. + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 + # Use terse signal names: "INT" instead of "SIGINT(2)". + typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when some part of a pipe command fails and the overall exit status is also non-zero. + # It may look like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' + + ###################[ command_execution_time: duration of the last command ]################### + # Show duration of the last command if takes longer than this many seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 + # Show this many fractional digits. Zero means round to seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Execution time color. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=248 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Custom icon. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%244Ftook ' + + #######################[ background_jobs: presence of background jobs ]####################### + # Don't show the number of background jobs. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=true + # Background jobs color. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=37 + # Custom icon. + # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ direnv: direnv status (https://direnv.net/) ]######################## + # Direnv color. + typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### + # Default asdf color. Only used to display tools for which there is no color override (see below). + typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 + + # There are four parameters that can be used to hide asdf tools. Each parameter describes + # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at + # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to + # hide a tool, it gets shown. + # + # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and + # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: + # + # asdf local python 3.8.1 + # asdf global python 3.8.1 + # + # After running both commands the current python version is 3.8.1 and its source is "local" as + # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, + # it'll hide python version in this case because 3.8.1 is the same as the global version. + # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't + # contain "local". + + # Hide tool versions that don't come from one of these sources. + # + # Available sources: + # + # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" + # - local `asdf current` says "set by /some/not/home/directory/file" + # - global `asdf current` says "set by /home/username/file" + # + # Note: If this parameter is set to (shell local global), it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. + typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) + + # If set to false, hide tool versions that are the same as global. + # + # Note: The name of this parameter doesn't reflect its meaning at all. + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. + typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false + + # If set to false, hide tool versions that are equal to "system". + # + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. + typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true + + # If set to non-empty value, hide tools unless there is a file matching the specified file pattern + # in the current directory, or its parent diretory, or its grandparent directory, and so on. + # + # Note: If this parameter is set to empty value, it won't hide tools. + # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. + # + # Example: Hide nodejs version when there is no package.json and no *.js files in the current + # directory, in `..`, in `../..` and so on. + # + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' + typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= + + # Ruby version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 + # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Python version from asdf. + typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Go version from asdf. + typeset -g POWERLEVEL9K_ASDF_GO_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_GO_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_GO_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Node.js version from asdf. + typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Rust version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' + + # .NET Core version from asdf. + typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 + # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Flutter version from asdf. + typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Lua version from asdf. + typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Java version from asdf. + typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Perl version from asdf. + typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 + # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Erlang version from asdf. + typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 + # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Elixir version from asdf. + typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Postgres version from asdf. + typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' + + # PHP version from asdf. + typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 + # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' + + ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### + # NordVPN connection indicator color. + typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 + # Hide NordVPN connection indicator when not connected. + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= + # Custom icon. + # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## + # Ranger shell color. + typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### + # Nnn shell color. + typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### + # Vim shell indicator color. + typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 + # Custom icon. + # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### + # Midnight Commander shell color. + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## + # Nix shell color. + typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 + + # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. + # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ disk_usgae: disk usage ]################################## + # Colors for different levels of disk usage. + typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 + # Thresholds for different levels of disk usage (percentage points). + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 + # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. + typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false + # Custom icon. + # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### + # Text and color for normal (a.k.a. command) vi mode. + typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL + typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=106 + # Text and color for visual vi mode. + typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL + typeset -g POWERLEVEL9K_VI_MODE_VISUAL_FOREGROUND=68 + # Text and color for overtype (a.k.a. overwrite and replace) vi mode. + typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE + typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_FOREGROUND=172 + # Text and color for insert vi mode. + typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= + typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66 + + # Custom icon. + # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ ram: free RAM ]####################################### + # RAM color. + typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 + # Custom icon. + # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################################[ swap: used swap ]###################################### + # Swap color. + typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 + # Custom icon. + # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ load: CPU load ]###################################### + # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. + typeset -g POWERLEVEL9K_LOAD_WHICH=5 + # Load color when load is under 50%. + typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 + # Load color when load is between 50% and 70%. + typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 + # Load color when load is over 70%. + typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 + # Custom icon. + # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ + # Todo color. + typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 + # Hide todo when the total number of tasks is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true + # Hide todo when the number of tasks after filtering is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false + + # Todo format. The following parameters are available within the expansion. + # + # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. + # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. + # + # These variables correspond to the last line of the output of `todo.sh -p ls`: + # + # TODO: 24 of 42 tasks shown + # + # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. + # + # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ + # Timewarrior color. + typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 + # If the tracked task is longer than 24 characters, truncate and append "…". + # Tip: To always display tasks without truncation, delete the following parameter. + # Tip: To hide task names and display just the icon when time tracking is enabled, set the + # value of the following parameter to "". + typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' + + # Custom icon. + # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ context: user@hostname ]################################## + # Context color when running with privileges. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 + # Context color in SSH without privileges. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 + # Default context color (no privileges, no SSH). + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 + + # Context format when running with privileges: bold user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' + # Context format when in SSH without privileges: user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' + # Default context format (no privileges, no SSH): user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' + + # Don't show context unless running with privileges or in SSH. + # Tip: Remove the next line to always show context. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%244Fwith ' + + ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### + # Python virtual environment color. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 + # Don't show Python version next to the virtual environment name. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ anaconda: conda environment (https://conda.io/) ]###################### + # Anaconda environment color. + typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 + # Don't show Python version next to the anaconda environment name. + typeset -g POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_ANACONDA_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ + # Pyenv color. + typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 + # Hide python version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) + # If set to false, hide python version if it's the same as global: + # $(pyenv version-name) == $(pyenv global). + typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ + # Goenv color. + typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 + # Hide go version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) + # If set to false, hide go version if it's the same as global: + # $(goenv version-name) == $(goenv global). + typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## + # Nodenv color. + typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 + # Don't show node version if it's the same as global: $(nodenv version-name) == $(nodenv global). + typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### + # Nvm color. + typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ + # Nodeenv color. + typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 + # Don't show Node version next to the environment name. + typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false + # Separate environment name from Node version only with a space. + typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############################[ node_version: node.js version ]############################### + # Node version color. + typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 + # Show node version only when in a directory tree containing package.json. + typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ go_version: go version (https://golang.org) ]######################## + # Go version color. + typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 + # Show go version only when in a go project subdirectory. + typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## + # Rust version color. + typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 + # Show rust version only when in a rust project subdirectory. + typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ + # .NET version color. + typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 + # Show .NET version only when in a .NET project subdirectory. + typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ php_version: php version (https://www.php.net/) ]###################### + # PHP version color. + typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 + # Show PHP version only when in a PHP project subdirectory. + typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### + # Laravel version color. + typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 + # Custom icon. + # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## + # Rbenv color. + typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 + # Hide ruby version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) + # If set to false, hide ruby version if it's the same as global: + # $(rbenv version-name) == $(rbenv global). + typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## + # Rvm color. + typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 + # Don't show @gemset at the end. + typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false + # Don't show ruby- at the front. + typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ + # Fvm color. + typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### + # Lua color. + typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 + # Hide lua version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) + # If set to false, hide lua version if it's the same as global: + # $(luaenv version-name) == $(luaenv global). + typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ + # Java color. + typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 + # Hide java version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) + # If set to false, hide java version if it's the same as global: + # $(jenv version-name) == $(jenv global). + typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ + # Perl color. + typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 + # Hide perl version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) + # If set to false, hide perl version if it's the same as global: + # $(plenv version-name) == $(plenv global). + typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ + # PHP color. + typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 + # Hide php version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) + # If set to false, hide php version if it's the same as global: + # $(phpenv version-name) == $(phpenv global). + typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false + # Custom icon. + # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ terraform: terraform workspace (https://www.terraform.io) ]################# + # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current terraform workspace gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current terraform workspace is "project_test", its class is TEST because "project_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_FOREGROUND=38 + # typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# + # Show kubecontext only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show kubecontext. + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc' + + # Kubernetes context classes for the purpose of using different colors, icons and expansions with + # different contexts. + # + # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current kubernetes context gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current kubernetes context is "deathray-testing/default", its class is TEST + # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 + # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext + # segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # Within the expansion the following parameters are always available: + # + # - P9K_CONTENT The content that would've been displayed if there was no content + # expansion defined. + # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE + # in the output of `kubectl config get-contexts`. If there is no + # namespace, the parameter is set to "default". + # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the + # output of `kubectl config get-contexts`. + # + # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), + # the following extra parameters are available: + # + # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. + # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. + # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. + # + # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, + # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=gke + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + # + # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=eks + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= + # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' + # Append the current context's namespace if it's not "default". + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' + + # Custom prefix. + # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%244Fat ' + + #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# + # Show aws only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show aws. + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi' + + # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current AWS profile gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current AWS profile is "company_test", its class is TEST + # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 + # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# + # AWS Elastic Beanstalk environment color. + typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## + # Show azure only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show azure. + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi' + # Azure account name color. + typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 + # Custom icon. + # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### + # Show gcloud only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show gcloud. + typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' + # Google cloud color. + typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 + + # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION if the default + # is too verbose or not informative enough. + # + # P9K_GCLOUD_ACCOUNT: the output of `gcloud config get-value account` + # P9K_GCLOUD_PROJECT: the output of `gcloud config get-value project` + # ${VARIABLE//\%/%%}: ${VARIABLE} with all occurences of '%' replaced with '%%'. + # + typeset -g POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT//\%/%%}' + + # Custom icon. + # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# + # Show google_app_cred only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show google_app_cred. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi' + + # Google application credentials classes for the purpose of using different colors, icons and + # expansions with different credentials. + # + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first + # element in each pair defines a pattern against which the current kubernetes context gets + # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion + # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION + # parameters, you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. + # The first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD + # '*:*test*:*' TEST + # '*' DEFAULT) + # + # If your current Google application credentials is "service_account deathray-testing x@y.com", + # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD # These values are examples that are unlikely + # '*:*test*:*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by + # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # You can use the following parameters in the expansion. Each of them corresponds to one of the + # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. + # + # Parameter | JSON key file field + # ---------------------------------+--------------- + # P9K_GOOGLE_APP_CRED_TYPE | type + # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id + # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurences of '%' replaced by '%%'. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' + + ###############################[ public_ip: public IP address ]############################### + # Public IP color. + typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 + # Custom icon. + # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ########################[ vpn_ip: virtual private network indicator ]######################### + # VPN IP color. + typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 + # When on VPN, show just an icon without the IP address. + # Tip: To display the private IP address when on VPN, remove the next line. + typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= + # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN + # to see the name of the interface. + typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(wg|(.*tun))[0-9]*' + # Custom icon. + # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### + # IP color. + typeset -g POWERLEVEL9K_IP_FOREGROUND=38 + # The following parameters are accessible within the expansion: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_IP_IP | IP address + # P9K_IP_INTERFACE | network interface + # P9K_IP_RX_BYTES | total number of bytes received + # P9K_IP_TX_BYTES | total number of bytes sent + # P9K_IP_RX_RATE | receive rate (since last prompt) + # P9K_IP_TX_RATE | send rate (since last prompt) + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='%70F⇣$P9K_IP_RX_RATE %215F⇡$P9K_IP_TX_RATE %38F$P9K_IP_IP' + # Show information for the first network interface whose name matches this regular expression. + # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. + typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' + # Custom icon. + # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #########################[ proxy: system-wide http/https/ftp proxy ]########################## + # Proxy color. + typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ battery: internal battery ]################################# + # Show battery in red when it's below this level and not connected to power supply. + typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 + typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 + # Show battery in green when it's charging or fully charged. + typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 + # Show battery in yellow when it's discharging. + typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 + # Battery pictograms going from low to high level of charge. + typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' + # Don't show the remaining time to charge/discharge. + typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false + + #####################################[ wifi: wifi speed ]##################################### + # WiFi color. + typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). + # + # # Wifi colors and icons for different signal strength levels (low to high). + # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values + # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values + # + # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' + # + # The following parameters are accessible within the expansions: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_WIFI_SSID | service set identifier, a.k.a. network name + # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none" + # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second + # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 + # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 + # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) + # + # All parameters except P9K_WIFI_BARS are extracted from the output of the following command: + # + # /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I + + ####################################[ time: current time ]#################################### + # Current time color. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%l:%M}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands as opposed to the default + # behavior where they contain the end times of their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=true + # Custom icon. + # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_TIME_PREFIX='%244Fat ' + + # Example of a user-defined prompt segment. Function prompt_example will be called on every + # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or + # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. + # + # Type `p10k help segment` for documentation and a more sophisticated example. + function prompt_example() { + p10k segment -f 208 -i '⭐' -t 'hello, %n' + } + + function prompt_customIcon() { + currenttime=$(date +%H:%M) + + if [[ "$currenttime" > "16:19" ]] || [[ "$currenttime" < "04:21" ]]; then + # Weed + p10k segment -f 070 -i 'ﲤ' + else + # Duck + p10k segment -f 227 -i '' + fi + # # TS logo + # p10k segment -f 027 -i 'ﯤ' + # # Fire + # p10k segment -f 160 -i '' + # # Ice Cream + # p10k segment -f 219 -i '' + } + + + # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job + # is to generate the prompt segment for display in instant prompt. See + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # + # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function + # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k + # will replay these calls without actually calling instant_prompt_*. It is imperative that + # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this + # rule is not observed, the content of instant prompt will be incorrect. + # + # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If + # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. + function instant_prompt_example() { + # Since prompt_example always makes the same `p10k segment` calls, we can call it from + # instant_prompt_example. This will give us the same `example` prompt segment in the instant + # and regular prompts. + prompt_example + } + + # User-defined prompt segments can be customized the same way as built-in segments. + # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 + # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off + + function p10k-on-pre-prompt() { + # # Show empty line if it's the first prompt in the TTY. + # [[ $P9K_TTY == old ]] && p10k display 'empty_line'=show + # Show the first prompt line. + p10k display '1|*/left_frame'=show '2/right/(time|dir|status|command_execution_time)'=hide + } + + function p10k-on-post-prompt() { + # Hide the empty line and the first prompt line. + p10k display '1|*/left_frame'=hide '2/right/(time|dir|status|command_execution_time)'=show + } + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post deleted file mode 100644 index 3ddf47c..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async-post +++ /dev/null @@ -1,63 +0,0 @@ -SPACESHIP_PROMPT_ORDER=( -# time # Time stamps section - user # Username section - dir # Current directory section - host # Hostname section -# git # Git section (git_branch + git_status) - git_branch - git_status -# hg # Mercurial section (hg_branch + hg_status) - package # Package version -# ruby # Ruby section -# elixir # Elixir section -# xcode # Xcode section -# swift # Swift section -# golang # Go section -# php # PHP section -# rust # Rust section -# haskell # Haskell Stack section -# julia # Julia section - docker # Docker section -# aws # Amazon Web Services section -# venv # virtualenv section -# conda # conda virtualenv section -# pyenv # Pyenv section -# dotnet # .NET section -# ember # Ember.js section -# kubecontext # Kubectl context section -# terraform # Terraform workspace section - exec_time # Execution time - line_sep # Line break -# battery # Battery level and status - vi_mode # Vi-mode indicator - char # Prompt character -) -SPACESHIP_RPROMPT_ORDER=(exit_code jobs) - -#SPACESHIP_DIR_COLOR=117 -SPACESHIP_DIR_COLOR=blue -SPACESHIP_NODE_SHOW=false -SPACESHIP_EXIT_CODE_SHOW=true - -SPACESHIP_GIT_STATUS_SHOW=true -SPACESHIP_GIT_STATUS_PREFIX="[" -SPACESHIP_GIT_STATUS_SUFFIX="] " -SPACESHIP_GIT_STATUS_UNTRACKED="?" -SPACESHIP_GIT_STATUS_ADDED="+" -SPACESHIP_GIT_STATUS_MODIFIED="!" -SPACESHIP_GIT_STATUS_RENAMED="»" -SPACESHIP_GIT_STATUS_DELETED="✘" -SPACESHIP_GIT_STATUS_STASHED="$" -SPACESHIP_GIT_STATUS_UNMERGE="=" -SPACESHIP_GIT_STATUS_AHEAD="⇡" -SPACESHIP_GIT_STATUS_BEHIND="⇣" -SPACESHIP_GIT_STATUS_DIVERGED="⇕" -SPACESHIP_GIT_STATUS_STASHED_COLOR="cyan" -SPACESHIP_GIT_STATUS_UNMERGED_COLOR="magenta" -SPACESHIP_GIT_STATUS_DELETED_COLOR="red" -SPACESHIP_GIT_STATUS_MODIFIED_COLOR="yellow" -SPACESHIP_GIT_STATUS_UNTRACKED_COLOR="blue" -SPACESHIP_GIT_STATUS_ADDED_COLOR="green" -SPACESHIP_GIT_STATUS_AHEAD_COLOR="yellow" -SPACESHIP_GIT_STATUS_BEHIND_COLOR="yellow" -SPACESHIP_GIT_STATUS_DIVERGED_COLOR="yellow" diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async2-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async2-post deleted file mode 100644 index 18ac076..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-async2-post +++ /dev/null @@ -1,55 +0,0 @@ -SPACESHIP_PROMPT_ORDER=( - ssh # SSH connection indicator - user # Username section - dir # Current directory section - host # Hostname section - vcs::async # Version control system section - - package::async # Package version - # node::async # Node.js section - # ruby::async # Ruby section - # elm::async # Elm section - # elixir::async # Elixir section - # xcode::async # Xcode section - # swift::async # Swift section - # golang::async # Go section - # php::async # PHP section - # rust::async # Rust section - # haskell::async # Haskell Stack section - # julia::async # Julia section - # vagrant::async # Vagrant section - # docker::async # Docker section - # aws::async # Amazon Web Services section - # venv # virtualenv section - # conda::async # conda virtualenv section - # pyenv::async # Pyenv section - # dotnet::async # .NET section - # ember::async # Ember.js section - # kubecontext::async # Kubectl context section - # terraform::async # Terraform workspace section - - exec_time # Execution time - line_sep # Line break - char # Prompt character, with vi-mode indicator integrated -) - -SPACESHIP_RPROMPT_ORDER=( - exit_code # Exit code section - - jobs # Background jobs indicator - # battery # Battery level and status - # time # Time stampts section -) - -SPACESHIP_PROMPT_ADD_NEWLINE=false -SPACESHIP_EXIT_CODE_SHOW=true -SPACESHIP_VI_MODE_SHOW=false -SPACESHIP_SECTION_PLACEHOLDER= - -SPACESHIP_CHAR_SYMBOL='➜ ' -SPACESHIP_USER_SUFFIX="in " -SPACESHIP_DIR_COLOR=blue -SPACESHIP_DIR_PREFIX= -SPACESHIP_DIR_TRUNC_PREFIX="…/" -SPACESHIP_VCS_UNSTAGED="!" -SPACESHIP_VCS_STAGED="+" diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post b/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post deleted file mode 100644 index 0dd931d..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/spaceship-post +++ /dev/null @@ -1,38 +0,0 @@ -SPACESHIP_PROMPT_ORDER=( - time # Time stamps section - user # Username section - dir # Current directory section - host # Hostname section - git # Git section (git_branch + git_status) -# hg # Mercurial section (hg_branch + hg_status) - package # Package version -# ruby # Ruby section -# elixir # Elixir section -# xcode # Xcode section -# swift # Swift section -# golang # Go section -# php # PHP section -# rust # Rust section -# haskell # Haskell Stack section -# julia # Julia section - docker # Docker section -# aws # Amazon Web Services section -# venv # virtualenv section -# conda # conda virtualenv section -# pyenv # Pyenv section -# dotnet # .NET section -# ember # Ember.js section -# kubecontext # Kubectl context section -# terraform # Terraform workspace section - exec_time # Execution time - line_sep # Line break -# battery # Battery level and status - vi_mode # Vi-mode indicator - char # Prompt character -) -SPACESHIP_RPROMPT_ORDER=(exit_code jobs) - -#SPACESHIP_DIR_COLOR=117 -SPACESHIP_DIR_COLOR=blue -SPACESHIP_NODE_SHOW=false -SPACESHIP_EXIT_CODE_SHOW=true diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index a82c984..e2da149 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -1,5 +1,29 @@ # https://github.com/NICHOLAS85/dotfiles/blob/xps_13_9365_refresh/.zshrc +# Used to programatically disable plugins when opening the terminal view in dolphin +if [[ $MYPROMPT = dolphin ]]; then + 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}") + } +fi + +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# 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" +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 @@ -15,8 +39,8 @@ 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 +#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" @@ -29,50 +53,45 @@ fi # 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}"; } -zct() { .zinit-ice load"[[ \${MYPROMPT} = ${1} ]]" unload"[[ \${MYPROMPT} != ${1} ]]" \ - atinit'![ -f "${thmf}/${MYPROMPT}-pre" ] && source "${thmf}/${MYPROMPT}-pre"' \ - atload'![ -f "${thmf}/${MYPROMPT}-post" ] && source "${thmf}/${MYPROMPT}-post"'; \ - ZINIT_ICE+=("${(kv)ZINIT_ICES[@]}"); ___turbo=1;} +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=(); +} ################## # Initial Prompt # +# Annexes # # Config source # ################## -zt for \ - pick'async.zsh' light-mode \ +zt light-mode for \ + pick'async.zsh' \ mafredri/zsh-async \ - if'[[ ${MYPROMPT=spaceship-async2} = "spaceship-async2" ]]' pick'spacezsh.zsh' \ - compile'{presets/^(*.zwc),lib/**/^(*.zwc),sections/^(*.zwc)}' \ - atload'!source "../_local---config-files/themes/${MYPROMPT}-post"' silent \ - laggardkernel/spacezsh-prompt \ - blockf light-mode \ - _local/config-files + romkatv/powerlevel10k \ -########### -# Annexes # -########### +zt for if'zct dolphin' \ + zdharma/null \ + if'zct p10k' \ + zdharma/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 -############################ -# Conditional themes block # -############################ - -zt pick'spacezsh.zsh' if'zct spaceship-async2' for \ - compile'{presets/^(*.zwc),lib/**/^(*.zwc),sections/^(*.zwc)}' \ - laggardkernel/spacezsh-prompt - -zt pick"pure.zsh" patch"$pchf/%PLUGIN%.patch" nocompile'!' reset reset-prompt for \ - if'zct dolphin' \ - sindresorhus/pure +zt light-mode blockf for \ + _local/config-files -# Plugins +########### +# Plugins # +########### -zt for OMZ::lib/history.zsh +zt atinit'HISTFILE="${HOME}/.histfile"' for \ + OMZL::history.zsh ###################### # Trigger-load block # @@ -98,18 +117,18 @@ zt light-mode for \ ################## zt 0a light-mode for \ - OMZ::lib/completion.zsh \ - as'completion' mv'*.zsh -> _git' \ - felipec/git-completion \ + OMZL::completion.zsh \ + if'false' ver'dev' \ + marlonrichert/zsh-autocomplete \ has'systemctl' \ - OMZ::plugins/systemd/systemd.plugin.zsh \ - OMZ::plugins/sudo/sudo.plugin.zsh \ - blockf atpull'zinit creinstall -q .' \ + 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' patch"$pchf/%PLUGIN%.patch" nocompile'!' atload'ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(autopair-insert __fz_zsh_completion)' \ + pick'fz.sh' atload'ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(autopair-insert __fz_zsh_completion)' \ changyuheng/fz ################## @@ -121,12 +140,13 @@ zt 0b light-mode for \ trapd00r/LS_COLORS \ compile'{hsmw-*,test/*}' \ zdharma/history-search-multi-word \ - OMZ::plugins/command-not-found/command-not-found.plugin.zsh \ + 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' pick'dircycle.zsh' \ - michaelxmcbride/zsh-dircycle\ - autoload'manydots-magic' atload'manydots-magic' \ + 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 \ @@ -135,8 +155,8 @@ zt 0b light-mode for \ atload'bindkey "$terminfo[kcuu1]" history-substring-search-up; bindkey "$terminfo[kcud1]" history-substring-search-down' \ zsh-users/zsh-history-substring-search \ - if'[[ ${isdolphin} != true ]]' patch"$pchf/%PLUGIN%.patch" nocompile'!' \ - desyncr/auto-ls + as'completion' mv'*.zsh -> _git' \ + felipec/git-completion \ ################## # Wait'0c' block # @@ -148,17 +168,15 @@ zt 0c light-mode for \ sbin from'gh-r' submods'NICHOLAS85/zsh-fast-alias-tips -> plugin' pick'plugin/*.zsh' \ sei40kr/fast-alias-tips-bin -zt 0c light-mode pick'/dev/null' for \ +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 -zt 0c light-mode as'null' for \ +zt 0c light-mode null for \ sbin"bin/git-dsf;bin/diff-so-fancy" \ zdharma/zsh-diff-so-fancy \ - sbin \ - https://github.com/romkatv/dotfiles-public/blob/master/bin/ssh.zsh \ sbin \ paulirish/git-open \ sbin'm*/micro' from"gh-r" ver'nightly' bpick'*linux64*' reset \ @@ -166,18 +184,7 @@ zt 0c light-mode as'null' for \ sbin'*/rm-trash' atload'alias rm="rm-trash ${rm_opts}"' reset \ patch"$pchf/%PLUGIN%.patch" \ nateshmbhat/rm-trash \ - sbin'dotbare;dotbare -> dots' \ + sbin \ kazhala/dotbare \ id-as'Cleanup' nocd atinit'unset -f zct zt; SPACESHIP_PROMPT_ADD_NEWLINE=true; _zsh_autosuggest_bind_widgets' \ zdharma/null - -$isdolphin || { -dotscheck && echo -(){ - 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}") -} -} From e19070ea95477730b8128cbe06c6e2ed281d1efb Mon Sep 17 00:00:00 2001 From: numtostr Date: Mon, 5 Oct 2020 11:20:02 +0530 Subject: [PATCH 50/51] numtostr: added numToStr/zshrc.zsh --- numToStr/zshrc.zsh | 148 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 numToStr/zshrc.zsh diff --git a/numToStr/zshrc.zsh b/numToStr/zshrc.zsh new file mode 100644 index 0000000..f3f36ce --- /dev/null +++ b/numToStr/zshrc.zsh @@ -0,0 +1,148 @@ +#!/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" +fi + +source "$HOME/.zinit/bin/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit +### End of Zinit'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 \ + + +########################## +# OMZ Libs and Plugins # +########################## + +# IMPORTANT: +# Ohmyzsh plugins and libs are loaded first as some these sets some defaults which are required later on. +# Otherwise something will look messed up +# ie. some settings help zsh-autosuggestions to clear after tab completion + +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 \ + +##################### +# PLUGINS # +##################### +# @source: https://github.com/crivotz/dot_files/blob/master/linux/zplugin/zshrc + +# 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 + +##################### +# 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 \ + + +##################### +# Misc Stuff # +##################### + +zinit is-snippet for \ + if"[[ -f $HOME/.localrc ]]" $HOME/.localrc From 49dcaf3b39f8fed1a9697372bd1db2da74afaacf Mon Sep 17 00:00:00 2001 From: NICHOLAS85 <15698885+NICHOLAS85@users.noreply.github.com> Date: Tue, 26 Jan 2021 05:41:57 -0500 Subject: [PATCH 51/51] Update config files --- .../_local---config-files/functions/kate | 1 - .../_local---config-files/patches/fz.patch | 30 - .../patches/zsh-dircycle.patch | 13 - .../.zinit/snippets/config/._zinit/blockf | 1 + .../.zinit/snippets/config/._zinit/depth | 1 + .../.zinit/snippets/config/._zinit/id-as | 1 + .../.zinit/snippets/config/._zinit/light-mode | 1 + .../.zinit/snippets/config/._zinit/lucid | 1 + .../.zinit/snippets/config/._zinit/mode | 1 + NICHOLAS85/.zinit/snippets/config/._zinit/svn | 1 + .../.zinit/snippets/config/._zinit/teleid | 1 + NICHOLAS85/.zinit/snippets/config/._zinit/url | 1 + .../.zinit/snippets/config/._zinit/wait | 1 + .../.zinit/snippets/config/.svn/entries | 1 + NICHOLAS85/.zinit/snippets/config/.svn/format | 1 + ...fc422b7588717cb8e1969c3779f2cc6e6.svn-base | 24 + ...91c78090552d22fc73c018aedfca9fbb.svn-base} | 0 ...5a92056707ff53ab6c0bb8807c2fa121b.svn-base | 14 + ...6c78d8fd43b553902653b27ebfa0b0776.svn-base | 29 + ...85be8b45736460986c014e42cea01a6c6.svn-base | 14 + ...43902c9e96c56757031497ac8dbd77e28.svn-base | 22 + ...5986bf3173ab9815134b3868500cd0f77.svn-base | 29 + ...0581c3ca7f71482c9d65a80c6267ee6f.svn-base} | 0 ...9f9964acbdc7f02c1737041d7b89cc463.svn-base | 20 + ...cf5da70e2e644f1fe68acbd81e26ef76a.svn-base | 6 + ...2de84b93948cd4d2e62b57d269eaad2f1.svn-base | 205 +++ ...65f2c1b4db8e72745a659a381aa82781e.svn-base | 9 + ...3bc4335ce0b5273c8379589b9e34c80e8.svn-base | 11 + ...c2d9e7e5728f874834ee7eb0a9ea1de17.svn-base | 41 + ...72c1464440650397af4cbdb3b4c776b3.svn-base} | 0 ...f79134eab50820d2e509dafba6ce92fb.svn-base} | 0 ...ac77885fb426fe895631db17a1b8f8c7f.svn-base | 30 + ...0873f4a56f97284d6c4402254f9caa2e5.svn-base | 207 +++ ...07123217c60427530e5d03f787e054de.svn-base} | 0 ...d4f313ca52b075fd3bce3f88e880d695.svn-base} | 0 ...d8baba5a3177cc06aafbbe80c101fe48b.svn-base | 11 + ...7022143494bcd2ce157082e718b9ae27.svn-base} | 0 ...5129d5573e7f37ab7f23abacda68c7be3.svn-base | 48 + ...c1e0f3e1c90a3e3eac4afe5c8ce28b801.svn-base | 1 + ...a05915503584ce5f9cb2adc20cada50e1.svn-base | 11 + ...f2c372e9bcc1a5d76d366096d0084949.svn-base} | 0 ...0a883a675a7ccc78eaef79e6831d56d4.svn-base} | 0 ...ebb8349a9e6b247ae4a97746ea5c377e.svn-base} | 0 ...096727665d7090f9ab87284726b08212.svn-base} | 0 ...e43991079a894778e865b3a1831daa33.svn-base} | 0 ...68c7bf3283d667fb7074bd799234b02ce.svn-base | 24 + ...c55fb6b89bd0714fcb620444bf2cb63b5.svn-base | 1 + ...ff512ccf37ce90b6b56c21fd5e3c3a26d.svn-base | 30 + ...53ecf46c72006feb87837e2d9b0143034.svn-base | 59 + ...0579d3023d24d89b78a71a1b00b95f5b7.svn-base | 209 +++ ...7fef1f0b8bc71c67f4b52c715e9c34574.svn-base | 210 +++ ...e50dba602c7b3d73b517e18e712fb129a.svn-base | 210 +++ ...a2a766ed8e09da49ec2aa29d29e4edd1.svn-base} | 0 ...186e46e553ccceb11d36bcd3e3c64f05.svn-base} | 0 ...dcab0b9631d393efbd8f978db12be7ea.svn-base} | 7 +- ...befd65967d6e5d356a20ee469efab8dd.svn-base} | 0 ...6080120c2d34c622e3cf57c928577d73.svn-base} | 0 ...eb47d33b26bfb2da484e58455c31f4522.svn-base | 34 + ...0ee170a4e2465c61781ee9bcce80445c.svn-base} | 91 +- ...d1e07095165decc9055d7fb5cda55424.svn-base} | 0 ...1cef1c0110bad99d713dcb9aba2f16d2.svn-base} | 0 ...adbae29c246dc8919a57aa28ffe77bad8.svn-base | 25 + ...f0275e9470ed64cb29bbc1bc43182084f.svn-base | 8 + ...fc48bf4cd35e7a61e22a0750ad1e38e6.svn-base} | 0 ...c94dbaee57bc17065b04df947fee19eec.svn-base | 23 + ...7a1e2a9121828f3751f79eaa703084f1e.svn-base | 61 + ...59123f219de90b451160c9b9e1d7781e.svn-base} | 0 ...6815582784e1e5dd4a5d04611f2370324.svn-base | 33 + NICHOLAS85/.zinit/snippets/config/.svn/wc.db | Bin 0 -> 151552 bytes .../.zinit/snippets/config/.svn/wc.db-journal | 0 NICHOLAS85/.zinit/snippets/config/LICENSE | 22 + NICHOLAS85/.zinit/snippets/config/README.md | 1 + .../snippets/config/completions/_colorls | 37 + .../snippets/config/completions/_dynamicwall | 17 + .../.zinit/snippets/config/completions/_fzf | 61 + .../snippets/config/completions/_gebaard | 13 + .../.zinit/snippets/config/completions/_groff | 53 + .../.zinit/snippets/config/completions/_micro | 23 + .../.zinit/snippets/config/completions/_nl | 24 + .../.zinit/snippets/config/completions/_pmm | 48 + .../snippets/config/completions/_tlp-stat | 18 + .../snippets/config/completions/err_ggrep | 2 + .../snippets/config/config-files.plugin.zsh | 226 +++ .../config/functions/@append_dir-history-var | 3 + .../config/functions/@chwpd_dir-history-var | 7 + .../snippets/config/functions/apt-history | 1 + .../snippets/config/functions/autoenv-files | 6 + .../.zinit/snippets/config/functions/chpwd_ls | 4 + .../snippets/config/functions/dotscheck | 14 + .../snippets/config/functions/history-stat | 1 + .../.zinit/snippets/config/functions/kate | 1 + .../config}/functions/mcsvr | 2 +- .../config/functions/prompt_my_per_dir_status | 6 + .../.zinit/snippets/config/functions/rm | 1 + .../.zinit/snippets/config/functions/sudo | 58 + .../snippets/config/functions/whichedit | 7 + .../config}/functions/zicompinit_fast | 6 +- .../snippets/config/patches/LS_COLORS.patch | 33 + .../snippets/config/patches/delta.patch | 8 + .../snippets/config/patches/dotbare.patch | 24 + .../.zinit/snippets/config/patches/fz.patch | 25 + .../config/patches/git-completion.patch | 11 + .../patches/history-search-multi-word.patch | 34 + .../patches/per-directory-history.patch | 30 + .../snippets/config/patches/rm-trash.patch | 50 + .../snippets/config/patches/winapps.patch | 94 + .../config/patches/zsh-autopair.patch | 12 + .../config/patches/zsh-dircycle.patch | 30 + .../snippets/config/patches/zsh-edit.patch | 14 + .../snippets/config/themes/dolphin-post.zsh | 193 ++ .../snippets/config/themes/p10k-post.zsh | 1575 +++++++++++++++++ NICHOLAS85/.zshrc | 240 +-- NICHOLAS85/bootstrap.sh | 3 +- 113 files changed, 4663 insertions(+), 188 deletions(-) delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch delete mode 100644 NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/blockf create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/depth create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/id-as create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/light-mode create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/lucid create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/mode create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/svn create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/teleid create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/url create mode 100644 NICHOLAS85/.zinit/snippets/config/._zinit/wait create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/entries create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/format create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/01/01a5b15fc422b7588717cb8e1969c3779f2cc6e6.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/functions/autoenv-files => snippets/config/.svn/pristine/02/02c13ed091c78090552d22fc73c018aedfca9fbb.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/05/054e77e5a92056707ff53ab6c0bb8807c2fa121b.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/18/188d4306c78d8fd43b553902653b27ebfa0b0776.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/1b/1b67e0285be8b45736460986c014e42cea01a6c6.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/1e/1e8d99d43902c9e96c56757031497ac8dbd77e28.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/1f/1f5cdd25986bf3173ab9815134b3868500cd0f77.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/functions/history-stat => snippets/config/.svn/pristine/20/207c4e870581c3ca7f71482c9d65a80c6267ee6f.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/25/25c0b3a9f9964acbdc7f02c1737041d7b89cc463.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/29/2973d6ccf5da70e2e644f1fe68acbd81e26ef76a.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/40/406477e2de84b93948cd4d2e62b57d269eaad2f1.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/41/41eb62865f2c1b4db8e72745a659a381aa82781e.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/42/42289db3bc4335ce0b5273c8379589b9e34c80e8.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/46/460deb8c2d9e7e5728f874834ee7eb0a9ea1de17.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/completions/_gebaard => snippets/config/.svn/pristine/4e/4e8d63f972c1464440650397af4cbdb3b4c776b3.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/themes/dolphin-post.zsh => snippets/config/.svn/pristine/52/52ea6cd5f79134eab50820d2e509dafba6ce92fb.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/55/5562521ac77885fb426fe895631db17a1b8f8c7f.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/5b/5b120210873f4a56f97284d6c4402254f9caa2e5.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/functions/chpwd_ls => snippets/config/.svn/pristine/60/6040293f07123217c60427530e5d03f787e054de.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/functions/sudo => snippets/config/.svn/pristine/6c/6c809a36d4f313ca52b075fd3bce3f88e880d695.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/75/752c18cd8baba5a3177cc06aafbbe80c101fe48b.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/README.md => snippets/config/.svn/pristine/77/7723bbaf7022143494bcd2ce157082e718b9ae27.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/79/799e41a5129d5573e7f37ab7f23abacda68c7be3.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/7c/7c402d0c1e0f3e1c90a3e3eac4afe5c8ce28b801.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/81/81a16e8a05915503584ce5f9cb2adc20cada50e1.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/completions/_tlp-stat => snippets/config/.svn/pristine/93/936d1459f2c372e9bcc1a5d76d366096d0084949.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/completions/_dynamicwall => snippets/config/.svn/pristine/93/93ab88a10a883a675a7ccc78eaef79e6831d56d4.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/LICENSE => snippets/config/.svn/pristine/94/94668cb2ebb8349a9e6b247ae4a97746ea5c377e.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/completions/err_ggrep => snippets/config/.svn/pristine/97/97f14ef7096727665d7090f9ab87284726b08212.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/completions/_colorls => snippets/config/.svn/pristine/9b/9b28eb8ce43991079a894778e865b3a1831daa33.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/a3/a34fedf68c7bf3283d667fb7074bd799234b02ce.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/a3/a353540c55fb6b89bd0714fcb620444bf2cb63b5.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/a5/a594b9aff512ccf37ce90b6b56c21fd5e3c3a26d.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/b9/b93232253ecf46c72006feb87837e2d9b0143034.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/ba/ba7d1460579d3023d24d89b78a71a1b00b95f5b7.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/bb/bbb93237fef1f0b8bc71c67f4b52c715e9c34574.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/be/beb5824e50dba602c7b3d73b517e18e712fb129a.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/patches/LS_COLORS.patch => snippets/config/.svn/pristine/c3/c3aad847a2a766ed8e09da49ec2aa29d29e4edd1.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/patches/rm-trash.patch => snippets/config/.svn/pristine/cb/cb570dd0186e46e553ccceb11d36bcd3e3c64f05.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/themes/p10k-post.zsh => snippets/config/.svn/pristine/d3/d375e7f3dcab0b9631d393efbd8f978db12be7ea.svn-base} (99%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/functions/whichedit => snippets/config/.svn/pristine/d8/d8e8fc99befd65967d6e5d356a20ee469efab8dd.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/functions/apt-history => snippets/config/.svn/pristine/e0/e0d1117c6080120c2d34c622e3cf57c928577d73.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/e0/e0ed6b7eb47d33b26bfb2da484e58455c31f4522.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/config-files.plugin.zsh => snippets/config/.svn/pristine/e5/e5588c8e0ee170a4e2465c61781ee9bcce80445c.svn-base} (58%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/functions/dotscheck => snippets/config/.svn/pristine/e5/e590eb7ad1e07095165decc9055d7fb5cda55424.svn-base} (100%) rename NICHOLAS85/.zinit/{plugins/_local---config-files/completions/_clight => snippets/config/.svn/pristine/e8/e8b18f011cef1c0110bad99d713dcb9aba2f16d2.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/ea/eafc8e9adbae29c246dc8919a57aa28ffe77bad8.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/eb/eb20af1f0275e9470ed64cb29bbc1bc43182084f.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/completions/_groff => snippets/config/.svn/pristine/eb/eb4823aefc48bf4cd35e7a61e22a0750ad1e38e6.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/ec/ecae1eac94dbaee57bc17065b04df947fee19eec.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/f1/f1a66877a1e2a9121828f3751f79eaa703084f1e.svn-base rename NICHOLAS85/.zinit/{plugins/_local---config-files/completions/_nl => snippets/config/.svn/pristine/fc/fc6c981c59123f219de90b451160c9b9e1d7781e.svn-base} (100%) create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/pristine/fc/fcfa8c96815582784e1e5dd4a5d04611f2370324.svn-base create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/wc.db create mode 100644 NICHOLAS85/.zinit/snippets/config/.svn/wc.db-journal create mode 100644 NICHOLAS85/.zinit/snippets/config/LICENSE create mode 100644 NICHOLAS85/.zinit/snippets/config/README.md create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/_colorls create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/_dynamicwall create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/_fzf create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/_gebaard create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/_groff create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/_micro create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/_nl create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/_pmm create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/_tlp-stat create mode 100644 NICHOLAS85/.zinit/snippets/config/completions/err_ggrep create mode 100644 NICHOLAS85/.zinit/snippets/config/config-files.plugin.zsh create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/@append_dir-history-var create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/@chwpd_dir-history-var create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/apt-history create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/autoenv-files create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/chpwd_ls create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/dotscheck create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/history-stat create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/kate rename NICHOLAS85/.zinit/{plugins/_local---config-files => snippets/config}/functions/mcsvr (66%) create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/prompt_my_per_dir_status create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/rm create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/sudo create mode 100644 NICHOLAS85/.zinit/snippets/config/functions/whichedit rename NICHOLAS85/.zinit/{plugins/_local---config-files => snippets/config}/functions/zicompinit_fast (90%) create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/LS_COLORS.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/delta.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/dotbare.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/fz.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/git-completion.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/history-search-multi-word.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/per-directory-history.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/rm-trash.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/winapps.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/zsh-autopair.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/zsh-dircycle.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/patches/zsh-edit.patch create mode 100644 NICHOLAS85/.zinit/snippets/config/themes/dolphin-post.zsh create mode 100644 NICHOLAS85/.zinit/snippets/config/themes/p10k-post.zsh diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate b/NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate deleted file mode 100644 index 68973f5..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/kate +++ /dev/null @@ -1 +0,0 @@ -command kate "${@}" &! diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch deleted file mode 100644 index 501de7b..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/fz.patch +++ /dev/null @@ -1,30 +0,0 @@ -Remove code which caused z to hang when completing ---- changyuheng---fz/fz.sh 2020-02-25 15:05:44.397883607 -0500 -+++ changyuheng---fz/fz.sh-patch 2020-02-25 15:05:32.741982804 -0500 -@@ -27,7 +27,7 @@ - local dir seg starts_with_dir - if [[ "$1" == */ ]]; then - dir="$1" -- find -L "$(cd "$dir" 2>/dev/null && pwd)" -mindepth 1 -maxdepth 1 -type d \ -+ find -L "$(pwd)" -mindepth 1 -maxdepth 1 -type d \ - 2>/dev/null | while read -r line; do - base="${line##*/}" - if [[ "$base" == .* ]]; then -@@ -42,7 +42,7 @@ - seg=$(echo "$seg" | tr '[:upper:]' '[:lower:]') - fi - starts_with_dir=$( \ -- find -L "$(cd "$dir" 2>/dev/null && pwd)" -mindepth 1 -maxdepth 1 \ -+ find -L "$(pwd)" -mindepth 1 -maxdepth 1 \ - -type d 2>/dev/null | while read -r line; do \ - base="${line##*/}" - if [[ "$seg" != .* && "$base" == .* ]]; then -@@ -68,7 +68,7 @@ - if [ -n "$starts_with_dir" ]; then - echo "$starts_with_dir" - else -- find -L "$(cd "$dir" 2>/dev/null && pwd)" -mindepth 1 -maxdepth 1 \ -+ find -L "$(pwd)" -mindepth 1 -maxdepth 1 \ - -type d 2>/dev/null | while read -r line; do \ - base="${line##*/}" - if [[ "$seg" != .* && "$base" == .* ]]; then diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch b/NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch deleted file mode 100644 index 4cafdfb..0000000 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/zsh-dircycle.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- michaelxmcbride---zsh-dircycle/dircycle.zsh 2020-05-30 02:35:14.123391113 -0400 -+++ michaelxmcbride---zsh-dircycle/dircycle.zsh-patch 2020-05-30 02:39:33.544349578 -0400 -@@ -18,7 +18,9 @@ - prompt_pure_async_tasks - prompt_pure_preprompt_render - else -- zle reset-prompt -+ _p9k_precmd -+ zle .reset-prompt -+ zle -R - fi - } - diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/blockf b/NICHOLAS85/.zinit/snippets/config/._zinit/blockf new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/blockf @@ -0,0 +1 @@ + diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/depth b/NICHOLAS85/.zinit/snippets/config/._zinit/depth new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/depth @@ -0,0 +1 @@ +3 diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/id-as b/NICHOLAS85/.zinit/snippets/config/._zinit/id-as new file mode 100644 index 0000000..04204c7 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/id-as @@ -0,0 +1 @@ +config diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/light-mode b/NICHOLAS85/.zinit/snippets/config/._zinit/light-mode new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/light-mode @@ -0,0 +1 @@ + diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/lucid b/NICHOLAS85/.zinit/snippets/config/._zinit/lucid new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/lucid @@ -0,0 +1 @@ + diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/mode b/NICHOLAS85/.zinit/snippets/config/._zinit/mode new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/mode @@ -0,0 +1 @@ +1 diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/svn b/NICHOLAS85/.zinit/snippets/config/._zinit/svn new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/svn @@ -0,0 +1 @@ + diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/teleid b/NICHOLAS85/.zinit/snippets/config/._zinit/teleid new file mode 100644 index 0000000..c399867 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/teleid @@ -0,0 +1 @@ +https://github.com/NICHOLAS85/dotfiles/trunk/.zinit/snippets/config diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/url b/NICHOLAS85/.zinit/snippets/config/._zinit/url new file mode 100644 index 0000000..c399867 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/url @@ -0,0 +1 @@ +https://github.com/NICHOLAS85/dotfiles/trunk/.zinit/snippets/config diff --git a/NICHOLAS85/.zinit/snippets/config/._zinit/wait b/NICHOLAS85/.zinit/snippets/config/._zinit/wait new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/._zinit/wait @@ -0,0 +1 @@ + diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/entries b/NICHOLAS85/.zinit/snippets/config/.svn/entries new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/entries @@ -0,0 +1 @@ +12 diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/format b/NICHOLAS85/.zinit/snippets/config/.svn/format new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/format @@ -0,0 +1 @@ +12 diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/01/01a5b15fc422b7588717cb8e1969c3779f2cc6e6.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/01/01a5b15fc422b7588717cb8e1969c3779f2cc6e6.svn-base new file mode 100644 index 0000000..e49ae69 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/01/01a5b15fc422b7588717cb8e1969c3779f2cc6e6.svn-base @@ -0,0 +1,24 @@ +Allow dotbare to be symlinked +--- kazhala---dotbare/dotbare 2020-11-08 03:51:47.379765820 -0500 ++++ kazhala---dotbare/dotbare-patch 2020-11-08 03:51:12.764122189 -0500 +@@ -12,7 +12,7 @@ + # option flags: + # check sub commands for available option flags + +-mydir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ++mydir="$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")" + source "${mydir}"/helper/set_variable.sh + + function usage() { +--- kazhala---dotbare/pkg/completion/zsh/_dotbare 2020-11-23 17:46:34.913377981 -0500 ++++ kazhala---dotbare/pkg/completion/zsh/_dotbare.patch 2020-11-23 17:46:32.169435684 -0500 +@@ -127,6 +127,9 @@ + '(- : *)'{-h,--help}'[show help information]' \ + && ret=0 + ;; ++ *) ++ _normal ++ ;; + esac + ;; + esac diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/autoenv-files b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/02/02c13ed091c78090552d22fc73c018aedfca9fbb.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/autoenv-files rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/02/02c13ed091c78090552d22fc73c018aedfca9fbb.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/05/054e77e5a92056707ff53ab6c0bb8807c2fa121b.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/05/054e77e5a92056707ff53ab6c0bb8807c2fa121b.svn-base new file mode 100644 index 0000000..8cf5411 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/05/054e77e5a92056707ff53ab6c0bb8807c2fa121b.svn-base @@ -0,0 +1,14 @@ +Fix autoloading with Zinit, remove cdpath hook +--- marlonrichert---zsh-edit/zsh-edit.plugin.zsh 2020-11-24 14:57:14.225191357 -0500 ++++ marlonrichert---zsh-edit/zsh-edit.plugin.zsh-patch 2020-11-24 15:01:38.468808641 -0500 +@@ -6,9 +6,7 @@ + + local fdir=${${(%):-%x}:A:h}/functions + typeset -gU FPATH fpath=( $fdir $fpath ) +- autoload -Uz add-zsh-hook $fdir/*~*.zwc +- +- add-zsh-hook chpwd _cdpath ++ autoload -Uz add-zsh-hook $fdir/*~*.zwc(.:t) + + local widget + diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/18/188d4306c78d8fd43b553902653b27ebfa0b0776.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/18/188d4306c78d8fd43b553902653b27ebfa0b0776.svn-base new file mode 100644 index 0000000..94ae157 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/18/188d4306c78d8fd43b553902653b27ebfa0b0776.svn-base @@ -0,0 +1,29 @@ +--- michaelxmcbride---zsh-dircycle/dircycle.zsh 2020-10-14 03:42:40.565527743 -0400 ++++ michaelxmcbride---zsh-dircycle/dircycle.zsh-patch 2020-10-14 03:42:32.315653673 -0400 +@@ -5,20 +5,22 @@ + + [[ ${#dirstack} -eq 0 ]] && return + +- while ! builtin pushd -q $1 &>/dev/null; do ++ while ! builtin pushd $1 &>/dev/null; do + # A missing directory was found; pop it out of the directory stack. +- builtin popd -q $1 ++ builtin popd $1 + + # Stop trying if there are no more directories in the directory stack. + [[ ${#dirstack} -eq 0 ]] && break + done +- ++ + # Trigger a prompt update if using Pure (https://github.com/sindresorhus/pure). + if typeset -f prompt_pure_setup > /dev/null; then + prompt_pure_async_tasks + prompt_pure_preprompt_render + else +- zle reset-prompt ++ _p9k_precmd ++ zle .reset-prompt ++ zle -R + fi + } + diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/1b/1b67e0285be8b45736460986c014e42cea01a6c6.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/1b/1b67e0285be8b45736460986c014e42cea01a6c6.svn-base new file mode 100644 index 0000000..af147f0 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/1b/1b67e0285be8b45736460986c014e42cea01a6c6.svn-base @@ -0,0 +1,14 @@ +Fix autoloading with Zinit, remove cdpath hook +--- marlonrichert---zsh-edit/zsh-edit.plugin.zsh 2020-11-23 16:58:49.823346698 -0500 ++++ marlonrichert---zsh-edit/zsh-edit.plugin.zsh-patch 2020-11-23 16:59:08.433260361 -0500 +@@ -7,9 +7,7 @@ + + local fdir=${${(%):-%x}:A:h}/functions + typeset -gU FPATH fpath=( $fdir $fpath ) +- autoload -Uz add-zsh-hook $fdir/* +- +- add-zsh-hook chpwd cdpath ++ autoload -Uz add-zsh-hook $fdir/*(.:t) + + local widget + diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/1e/1e8d99d43902c9e96c56757031497ac8dbd77e28.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/1e/1e8d99d43902c9e96c56757031497ac8dbd77e28.svn-base new file mode 100644 index 0000000..3f5de65 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/1e/1e8d99d43902c9e96c56757031497ac8dbd77e28.svn-base @@ -0,0 +1,22 @@ +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.md-1) ]]; then + compinit -C -d "$zcompf" +else + compinit -d "$zcompf" + touch "$zcompf_a" +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/snippets/config/.svn/pristine/1f/1f5cdd25986bf3173ab9815134b3868500cd0f77.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/1f/1f5cdd25986bf3173ab9815134b3868500cd0f77.svn-base new file mode 100644 index 0000000..c4b5108 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/1f/1f5cdd25986bf3173ab9815134b3868500cd0f77.svn-base @@ -0,0 +1,29 @@ +--- kadaan---per-directory-history/per-directory-history.zsh 2020-08-24 05:35:33.232756679 -0400 ++++ kadaan---per-directory-history/per-directory-history-patch 2020-08-24 05:37:48.008288237 -0400 +@@ -46,7 +46,7 @@ + if ! $_per_directory_history_is_global + then + fc -P +- mkdir -p ${_per_directory_history_path:h} ++ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h} + fc -p $_per_directory_history_path + fi + } +@@ -73,7 +73,7 @@ + local fn + if $_per_directory_history_is_global + then +- mkdir -p ${_per_directory_history_path:h} ++ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h} + fn=$_per_directory_history_path + else + fn=$_per_directory_history_main_histfile +@@ -96,7 +96,7 @@ + function _per-directory-history-set-directory-history() { + fc -P + +- mkdir -p ${_per_directory_history_path:h} ++ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h} + fc -p $_per_directory_history_path + _per_directory_history_is_global=false + } diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/history-stat b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/20/207c4e870581c3ca7f71482c9d65a80c6267ee6f.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/history-stat rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/20/207c4e870581c3ca7f71482c9d65a80c6267ee6f.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/25/25c0b3a9f9964acbdc7f02c1737041d7b89cc463.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/25/25c0b3a9f9964acbdc7f02c1737041d7b89cc463.svn-base new file mode 100644 index 0000000..a299f8e --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/25/25c0b3a9f9964acbdc7f02c1737041d7b89cc463.svn-base @@ -0,0 +1,20 @@ +--- "zinit-zsh---z-a-bin-gem-node/\342\206\222za-bgn-atdelete-handler" 2020-11-08 17:51:29.893155968 -0500 ++++ "zinit-zsh---z-a-bin-gem-node/\342\206\222za-bgn-atdelete-handler-patch" 2020-11-08 17:51:25.881202480 -0500 +@@ -14,14 +14,14 @@ + # sbin'' ice – creation of shims (the name borrowed from rbenv) + # + +-if (( ${+ICE[sbin]} )) { ++if (( ${+ICE2[sbin]} )) { + local -a sbins srcdst +- sbins=( ${(s.;.)ICE[sbin]} ) ++ sbins=( ${(s.;.)ICE2[sbin]} ) + + local sbin + integer set_gem_home set_node_path + +- ( ++ ( + builtin cd -q "$dir" + for sbin ( $sbins "" ) { + if [[ -z $sbin && ${#sbins} -eq 0 ]]; then diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/29/2973d6ccf5da70e2e644f1fe68acbd81e26ef76a.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/29/2973d6ccf5da70e2e644f1fe68acbd81e26ef76a.svn-base new file mode 100644 index 0000000..977fc0a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/29/2973d6ccf5da70e2e644f1fe68acbd81e26ef76a.svn-base @@ -0,0 +1,6 @@ +if $_per_directory_history_is_global; then + p10k segment -i '' +else + p10k segment -i '📍' +fi + diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/40/406477e2de84b93948cd4d2e62b57d269eaad2f1.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/40/406477e2de84b93948cd4d2e62b57d269eaad2f1.svn-base new file mode 100644 index 0000000..071acd0 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/40/406477e2de84b93948cd4d2e62b57d269eaad2f1.svn-base @@ -0,0 +1,205 @@ +#Let Atom highlight this: -*- shell-script -*- + +# According to the Zsh Plugin Standard: +# http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html + +0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" +0="${${(M)0:#/*}:-$PWD/$0}" + +# Then ${0:h} to get plugin's directory + +# Autoload personal functions +fpath=("${0:h}/functions" "${fpath[@]}") +autoload -Uz $fpath[1]/*(.:t) + +_zsh_autosuggest_strategy_dir_history(){ # Avoid Zinit picking this up as a completion + emulate -L zsh + if $_per_directory_history_is_global && [[ -r "$_per_directory_history_path" ]]; then + setopt EXTENDED_GLOB + fc -a -p "$_per_directory_history_path" + local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" + local pattern="$prefix*" + if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then + pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)" + fi + local dir_history=() + typeset -g suggestion="${history[(r)$pattern]}" + else + typeset -g suggestion= + fi +} + +! $isdolphin && add-zsh-hook chpwd chpwd_ls + +######################### +# Variables # +######################### + +pchf="${0:h}/patches" +thmf="${0:h}/themes" +GENCOMPL_FPATH="${0:h}/completions" +GENCOMP_DIR="${0:h}/completions" +MANPATH="${ZPFX}/man:${MANPATH}" +ZSHZ_DATA="${ZPFX}/z" +HISTFILE="${HOME}/.histfile" +PER_DIRECTORY_HISTORY_BASE="${ZPFX}/per-directory-history" +AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" +export CUSTOMIZEPKG_CONFIG="${HOME}/.config/customizepkg" +export WGETRC="${XDG_CONFIG_HOME}/wgetrc" +export LESSKEY="${XDG_CONFIG_HOME}/less/lesskey" +export LESSHISTFILE="${XDG_CACHE_HOME}/less/history" +export TMPPREFIX="${TMPDIR%/}/zsh" + +# Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) +UPDATELOCAL_GITDIR="${HOME}/github/built" + +ZSH_AUTOSUGGEST_USE_ASYNC=true +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 +ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c100,)" # Do not consider 100 character entries +ZSH_AUTOSUGGEST_COMPLETION_IGNORE="[[:space:]]*" # Ignore leading whitespace +ZSH_AUTOSUGGEST_MANUAL_REBIND=set +ZSH_AUTOSUGGEST_STRATEGY=(dir_history history completion) +FAST_ALIAS_TIPS_PREFIX="» $(tput setaf 6)" +FAST_ALIAS_TIPS_SUFFIX="$(tput sgr0) «" +HISTORY_SUBSTRING_SEARCH_FUZZY=set + +export OPENCV_LOG_LEVEL=ERROR # Hide nonimportant errors for howdy +export rm_opts=(-I -v) +export EDITOR=micro +export SYSTEMD_EDITOR=${EDITOR} +export GIT_DISCOVERY_ACROSS_FILESYSTEM=true # etckeeper on bedrock +FZF_DEFAULT_OPTS=" +--border +--height 80% +--extended +--ansi +--reverse +--cycle +--bind ctrl-s:toggle-sort +--bind 'alt-e:execute($EDITOR {} >/dev/tty /dev/null | head -200' +--preview-window right:65%:wrap +" +FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" + +FZ_HISTORY_CD_CMD=zshz +ZSHZ_CMD=" " # Do not set the alias, fz will cover that +ZSHZ_UNCOMMON=1 +forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin + +# Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) +dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' \.config/gtk-3\.0/settings\.ini ) + +# Export variables when connected via SSH +if [[ -n $SSH_CONNECTION ]]; then + export DISPLAY=:0 + alias ls="lsd --group-dirs=first --icon=never" +else + alias ls='lsd --group-dirs=first' +fi + +# Set variables if on ac mode +if [[ $(cat /run/tlp/last_pwr) = 0 ]]; then + alias micro="micro -fastdirty false" +fi + +######################### +# Aliases # +######################### + +# Access zsh config files +alias zshconf="(){ setopt extendedglob local_options; kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc }" +alias zshconfatom="(){ setopt extendedglob local_options; atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc &! }" + +alias t='tail -f' +alias g='git' +alias open='xdg-open' +alias atom='atom --disable-gpu' +alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories +# Aesthetic function for Dolphin, clear -x if cd while in Dolphin +$isdolphin && alias cd='clear -x; cd' + +# dot file management +alias dots='DOTBARE_DIR="$HOME/.dots" DOTBARE_TREE="$HOME" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" dotbare' +export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" +export DOTBARE_DIFF_PAGER=diff-so-fancy + +(( ${+commands[brl]} )) && { +(){ local stratum strata=( /bedrock/run/enabled_strata/* local) +for stratum in ${strata:t}; do +hash -d "${stratum}"="/bedrock/strata/${stratum}" +[[ "${stratum}" = "local" ]] && continue +alias "${stratum}"="strat ${stratum}" +alias "r${stratum}"="strat -r ${stratum}" +[[ -d "/bedrock/strata/${stratum}/etc/.git" ]] && \ +alias "${stratum:0:1}edots"="command sudo strat -r ${stratum} git --git-dir=/etc/.git --work-tree=/etc" +done } +alias bedots='command sudo DOTBARE_FZF_DEFAULT_OPTS="$DOTBARE_FZF_DEFAULT_OPTS" DOTBARE_DIR="/bedrock/.git" DOTBARE_TREE="/bedrock" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/bdotbare" dotbare' +} + +######################### +# Other # +######################### + +bindkey -e # EMACS bindings +setopt append_history # Allow multiple terminal sessions to all append to one zsh command history +setopt hist_ignore_all_dups # delete old recorded entry if new entry is a duplicate. +setopt no_beep # do not beep on error +setopt auto_cd # If you type foo, and it is not a command, and it is a directory in your cdpath, go there +setopt multios # perform implicit tees or cats when multiple redirections are attempted +setopt prompt_subst # enable parameter expansion, command substitution, and arithmetic expansion in the prompt +setopt interactive_comments # Allow comments even in interactive shells (especially for Muness) +setopt pushd_ignore_dups # don't push multiple copies of the same directory onto the directory stack +setopt auto_pushd # make cd push the old directory onto the directory stack +setopt pushdminus # swapped the meaning of cd +1 and cd -1; we want them to mean the opposite of what they mean +setopt pushd_silent # Silence pushd +#setopt glob_dots # Use for hidden files in cd comp +setopt extended_glob + +# Fuzzy matching of completions for when you mistype them: +zstyle ':completion:*' completer _complete _match _list _ignored _correct _approximate +zstyle ':completion:*:match:*' original only +zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' + +# Pretty completions +#zstyle ':completion:*:matches' group 'yes' +#zstyle ':completion:*:options' description 'yes' +#zstyle ':completion:*:options' auto-description '%d' +#zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +#zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:descriptions' format '[%d]' +#zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +#zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +#zstyle ':completion:*' group-name '' +zstyle ':completion:*' verbose yes +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' +zstyle ':completion:*' use-cache true +zstyle ':completion:*' special-dirs true + +# fzf-tab +zstyle ':fzf-tab:*' fzf-bindings 'space:accept' # Space as accept +zstyle ':fzf-tab:*' print-query ctrl-c # Use input as result when ctrl-c +zstyle ':fzf-tab:*' accept-line enter +zstyle ':fzf-tab:*' prefix '' # No dot prefix +zstyle ':fzf-tab:*' single-group color header # Show header for single groups +zstyle ':fzf-tab:complete:(cd|ls|lsd):*' fzf-preview 'ls -1 --color=always -- $realpath' +zstyle ':fzf-tab:complete:((micro|cp|rm):argument-rest|kate:*)' fzf-preview 'bat --color=always -- $realpath 2>/dev/null || ls --color=always -- $realpath' +zstyle ':fzf-tab:complete:micro:argument-rest' fzf-flags --preview-window=right:65% +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-preview "git --git-dir=$UPDATELOCAL_GITDIR/\${word}/.git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset ||%n%b' ..FETCH_HEAD 2>/dev/null" +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-flags --preview-window=down:5:wrap +zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview \ + '[[ $group == "[process ID]" ]] && ps --pid=$word -o cmd --no-headers -w -w' +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap + + +bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word +bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word +bindkey -s '^[[5~' '' # Do nothing on pageup and pagedown. Better than printing '~'. +bindkey -s '^[[6~' '' +bindkey '^[[3;5~' kill-word # ctrl+del delete next word +# bindkey '^h' _complete_help +bindkey '^I' expand-or-complete-prefix # Fix autopair completion within brackets diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/41/41eb62865f2c1b4db8e72745a659a381aa82781e.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/41/41eb62865f2c1b4db8e72745a659a381aa82781e.svn-base new file mode 100644 index 0000000..a1ccb55 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/41/41eb62865f2c1b4db8e72745a659a381aa82781e.svn-base @@ -0,0 +1,9 @@ +local svrdir="${HOME}/bin/minecraft/servers" dir + +[ -x $svrdir/$1/serverstartlinux.sh ] && dir="$svrdir/$1" || { + dir=( $( echo $svrdir/* | tr ' ' '\n' | + FZF_DEFAULT_OPTS="$FORGIT_FZF_DEFAULT_OPTS -0 --nth 2..,.. + $FORGIT_ADD_FZF_OPTS" fzf ) ) +} + +[ ! -z $dir ] && sudo systemd-inhibit --who="mcsvr ${1:-${dir:t}}" --why="Running Minecraft Server" "$dir/serverstartlinux.sh" diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/42/42289db3bc4335ce0b5273c8379589b9e34c80e8.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/42/42289db3bc4335ce0b5273c8379589b9e34c80e8.svn-base new file mode 100644 index 0000000..db9a479 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/42/42289db3bc4335ce0b5273c8379589b9e34c80e8.svn-base @@ -0,0 +1,11 @@ +--- marlonrichert---zsh-edit/zsh-edit.plugin.zsh 2020-10-10 15:46:18.672623754 -0400 ++++ marlonrichert---zsh-edit/zsh-edit.plugin.zsh-patch 2020-10-10 15:48:35.715917216 -0400 +@@ -7,7 +7,7 @@ + + local fdir=${${(%):-%x}:A:h}/functions + typeset -gU FPATH fpath=( $fdir $fpath ) +- autoload -Uz add-zsh-hook $fdir/* ++ autoload -Uz add-zsh-hook $fdir/*(.:t) + + local widget + diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/46/460deb8c2d9e7e5728f874834ee7eb0a9ea1de17.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/46/460deb8c2d9e7e5728f874834ee7eb0a9ea1de17.svn-base new file mode 100644 index 0000000..9a07a0a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/46/460deb8c2d9e7e5728f874834ee7eb0a9ea1de17.svn-base @@ -0,0 +1,41 @@ +#compdef clight + +# zsh completions for 'clight' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + '(-f --frames)'{-f,--frames=}'[Frames taken for each capture, Between 1 and 20]' + '(-d --device)'{-d,--device=}'[Path to webcam device. If empty, first matching device is usedmi]' + '(-b --backlight)'{-b,--backlight=}'[Path to backlight syspath. If empty, first matching device is used]' + '--no-backlight-smooth[Disable smooth backlight transitions]' + '--no-gamma-smooth[Disable smooth gamma transitions]' + '--no-dimmer-smooth-enter[Disable smooth dimmer transitions while entering dimmed state]' + '--no-dimmer-smooth-enter[Disable smooth dimmer transitions while leaving dimmed state]' + '(--day-temp)'--day-temp='[Daily gamma temperature, between 1000 and 10000]' + '(--night-temp)'--night-temp='[Nightly gamma temperature, between 1000 and 10000]' + '(--lat)'--lat='[Your desired latitude]' + '(--lon)'--lon='[Your desired longitude]' + '(--sunrise)'--sunrise='[Force sunrise time for gamma correction]' + '(--sunset)'--sunset='[Force sunset time for gamma correction]' + '--no-gamma[Disable gamma correction tool]' + '--no-dimmer[Disable dimmer tool]' + '--no-dpms[Disable dpms tool]' + '--no-backlight[Disable backlight module]' + '--no-screen[Disable screen module]' + '--no-kbd[Disable keyboard backlight calibration]' + '(--dimmer-pct)'--dimmer-pct='[Backlight level used while screen is dimmed, in percentage]' + '--verbose[Enable verbose mode]' + '--no-auto-calib[Disable screen backlight automatic calibration]' + '(--shutter-thres)'--shutter-thres='[Threshold to consider a capture as clogged]' + '(-v --version)'{-v,--version}'[Show version info]' + '(-c --conf-file)'{-c,--conf-file=}'[Specify a conf file to be parsed]' + '--gamma-long-transition[Enable a very long smooth transition for gamma]' + '--ambient-gamma[Enable screen temperature matching ambient brightness instead of time]' + '(-w --wizard)'{-w,--wizard}'[Enable wizard mode]' + '(-? --help)'{-?,--help}'[Show help message]' + '--usage[Display brief usage message]' + '*:: :->argument' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_gebaard b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/4e/4e8d63f972c1464440650397af4cbdb3b4c776b3.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_gebaard rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/4e/4e8d63f972c1464440650397af4cbdb3b4c776b3.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post.zsh b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/52/52ea6cd5f79134eab50820d2e509dafba6ce92fb.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/themes/dolphin-post.zsh rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/52/52ea6cd5f79134eab50820d2e509dafba6ce92fb.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/55/5562521ac77885fb426fe895631db17a1b8f8c7f.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/55/5562521ac77885fb426fe895631db17a1b8f8c7f.svn-base new file mode 100644 index 0000000..00a9a79 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/55/5562521ac77885fb426fe895631db17a1b8f8c7f.svn-base @@ -0,0 +1,30 @@ +p10k support, Affect dirstack and chwpd +--- michaelxmcbride---zsh-dircycle/dircycle.zsh 2020-10-14 03:42:40.565527743 -0400 ++++ michaelxmcbride---zsh-dircycle/dircycle.zsh-patch 2020-10-14 03:42:32.315653673 -0400 +@@ -5,20 +5,22 @@ + + [[ ${#dirstack} -eq 0 ]] && return + +- while ! builtin pushd -q $1 &>/dev/null; do ++ while ! builtin pushd $1 &>/dev/null; do + # A missing directory was found; pop it out of the directory stack. +- builtin popd -q $1 ++ builtin popd $1 + + # Stop trying if there are no more directories in the directory stack. + [[ ${#dirstack} -eq 0 ]] && break + done +- ++ + # Trigger a prompt update if using Pure (https://github.com/sindresorhus/pure). + if typeset -f prompt_pure_setup > /dev/null; then + prompt_pure_async_tasks + prompt_pure_preprompt_render + else +- zle reset-prompt ++ _p9k_precmd ++ zle .reset-prompt ++ zle -R + fi + } + diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/5b/5b120210873f4a56f97284d6c4402254f9caa2e5.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/5b/5b120210873f4a56f97284d6c4402254f9caa2e5.svn-base new file mode 100644 index 0000000..c3dbb9f --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/5b/5b120210873f4a56f97284d6c4402254f9caa2e5.svn-base @@ -0,0 +1,207 @@ +#Let Atom highlight this: -*- shell-script -*- + +# According to the Zsh Plugin Standard: +# http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html + +0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" +0="${${(M)0:#/*}:-$PWD/$0}" + +# Then ${0:h} to get plugin's directory + +# Autoload personal functions +fpath=("${0:h}/functions" "${fpath[@]}") +autoload -Uz $fpath[1]/*(.:t) + +_zsh_autosuggest_strategy_dir_history(){ # Avoid Zinit picking this up as a completion + emulate -L zsh + if $_per_directory_history_is_global && [[ -r "$_per_directory_history_path" ]]; then + setopt EXTENDED_GLOB + fc -a -p "$_per_directory_history_path" + local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" + local pattern="$prefix*" + if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then + pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)" + fi + local dir_history=() + typeset -g suggestion="${history[(r)$pattern]}" + else + typeset -g suggestion= + fi +} + +! $isdolphin && add-zsh-hook chpwd chpwd_ls + +######################### +# Variables # +######################### + +pchf="${0:h}/patches" +thmf="${0:h}/themes" +GENCOMPL_FPATH="${0:h}/completions" +GENCOMP_DIR="${0:h}/completions" +MANPATH="${ZPFX}/man:${MANPATH}" +ZSHZ_DATA="${ZPFX}/z" +HISTFILE="${HOME}/.histfile" +PER_DIRECTORY_HISTORY_BASE="${ZPFX}/per-directory-history" +AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" +export CUSTOMIZEPKG_CONFIG="${HOME}/.config/customizepkg" +export WGETRC="${XDG_CONFIG_HOME}/wgetrc" +export LESSKEY="${XDG_CONFIG_HOME}/less/lesskey" +export LESSHISTFILE="${XDG_CACHE_HOME}/less/history" +export TMPPREFIX="${TMPDIR%/}/zsh" + +# Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) +UPDATELOCAL_GITDIR="${HOME}/github/built" + +ZSH_AUTOSUGGEST_USE_ASYNC=true +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 +ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c100,)" # Do not consider 100 character entries +ZSH_AUTOSUGGEST_COMPLETION_IGNORE="[[:space:]]*" # Ignore leading whitespace +ZSH_AUTOSUGGEST_MANUAL_REBIND=set +ZSH_AUTOSUGGEST_STRATEGY=(dir_history history completion) +FAST_ALIAS_TIPS_PREFIX="» $(tput setaf 6)" +FAST_ALIAS_TIPS_SUFFIX="$(tput sgr0) «" +HISTORY_SUBSTRING_SEARCH_FUZZY=set +AUTOPAIR_CTRL_BKSPC_WIDGET=".backward-kill-word" + +export OPENCV_LOG_LEVEL=ERROR # Hide nonimportant errors for howdy +export rm_opts=(-I -v) +export EDITOR=micro +export SYSTEMD_EDITOR=${EDITOR} +export GIT_DISCOVERY_ACROSS_FILESYSTEM=true # etckeeper on bedrock +FZF_DEFAULT_OPTS=" +--border +--height 80% +--extended +--ansi +--reverse +--cycle +--bind ctrl-s:toggle-sort +--bind 'alt-e:execute($EDITOR {} >/dev/tty /dev/null | head -200' +--preview-window right:65%:wrap +" +FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" + +FZ_HISTORY_CD_CMD=zshz +ZSHZ_CMD=" " # Do not set the alias, fz will cover that +ZSHZ_UNCOMMON=1 +forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin + +# Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) +dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' \.config/gtk-3\.0/settings\.ini ) + +# Export variables when connected via SSH +if [[ -n $SSH_CONNECTION ]]; then + export DISPLAY=:0 + alias ls="lsd --group-dirs=first --icon=never" +else + alias ls='lsd --group-dirs=first' +fi + +# Set variables if on ac mode +if [[ $(cat /run/tlp/last_pwr) = 0 ]]; then + alias micro="micro -fastdirty false" +fi + +######################### +# Aliases # +######################### + +# Access zsh config files +alias zshconf="(){ setopt extendedglob local_options; kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc }" +alias zshconfatom="(){ setopt extendedglob local_options; atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc &! }" + +alias t='tail -f' +alias g='git' +alias open='xdg-open' +alias atom='atom --disable-gpu' +alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories +# Aesthetic function for Dolphin, clear -x if cd while in Dolphin +$isdolphin && alias cd='clear -x; cd' + +# dot file management +alias dots='DOTBARE_DIR="$HOME/.dots" DOTBARE_TREE="$HOME" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" dotbare' +export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" +export DOTBARE_DIFF_PAGER=diff-so-fancy + +(( ${+commands[brl]} )) && { +(){ local stratum strata=( /bedrock/run/enabled_strata/* local) +for stratum in ${strata:t}; do +hash -d "${stratum}"="/bedrock/strata/${stratum}" +[[ "${stratum}" = "local" ]] && continue +alias "${stratum}"="strat ${stratum}" +alias "r${stratum}"="strat -r ${stratum}" +[[ -d "/bedrock/strata/${stratum}/etc/.git" ]] && \ +alias "${stratum:0:1}edots"="command sudo strat -r ${stratum} git --git-dir=/etc/.git --work-tree=/etc" +done } +alias bedots='command sudo DOTBARE_FZF_DEFAULT_OPTS="$DOTBARE_FZF_DEFAULT_OPTS" DOTBARE_DIR="/bedrock/.git" DOTBARE_TREE="/bedrock" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/bdotbare" dotbare' +} + +######################### +# Other # +######################### + +bindkey -e # EMACS bindings +setopt append_history # Allow multiple terminal sessions to all append to one zsh command history +setopt hist_ignore_all_dups # delete old recorded entry if new entry is a duplicate. +setopt no_beep # do not beep on error +setopt auto_cd # If you type foo, and it is not a command, and it is a directory in your cdpath, go there +setopt multios # perform implicit tees or cats when multiple redirections are attempted +setopt prompt_subst # enable parameter expansion, command substitution, and arithmetic expansion in the prompt +setopt interactive_comments # Allow comments even in interactive shells (especially for Muness) +setopt pushd_ignore_dups # don't push multiple copies of the same directory onto the directory stack +setopt auto_pushd # make cd push the old directory onto the directory stack +setopt pushdminus # swapped the meaning of cd +1 and cd -1; we want them to mean the opposite of what they mean +setopt pushd_silent # Silence pushd +#setopt glob_dots # Use for hidden files in cd comp +setopt extended_glob + +# Fuzzy matching of completions for when you mistype them: +zstyle ':completion:*' completer _complete _match _list _ignored _correct _approximate +zstyle ':completion:*:match:*' original only +zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' + +# Pretty completions +#zstyle ':completion:*:matches' group 'yes' +#zstyle ':completion:*:options' description 'yes' +#zstyle ':completion:*:options' auto-description '%d' +#zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +#zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:descriptions' format '[%d]' +#zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +#zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +#zstyle ':completion:*' group-name '' +zstyle ':completion:*' verbose yes +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' +zstyle ':completion:*' use-cache true +zstyle ':completion:*' special-dirs true + +# fzf-tab +zstyle ':fzf-tab:*' fzf-bindings 'space:accept' # Space as accept +zstyle ':fzf-tab:*' print-query ctrl-c # Use input as result when ctrl-c +zstyle ':fzf-tab:*' accept-line enter +zstyle ':fzf-tab:*' prefix '' # No dot prefix +zstyle ':fzf-tab:*' single-group color header # Show header for single groups +zstyle ':fzf-tab:complete:(cd|ls|lsd):*' fzf-preview 'ls -1 --color=always -- $realpath' +zstyle ':fzf-tab:complete:((micro|cp|rm):argument-rest|kate:*)' fzf-preview 'bat --color=always -- $realpath 2>/dev/null || ls --color=always -- $realpath' +zstyle ':fzf-tab:complete:micro:argument-rest' fzf-flags --preview-window=right:65% +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-preview "git --git-dir=$UPDATELOCAL_GITDIR/\${word}/.git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset ||%n%b' ..FETCH_HEAD 2>/dev/null" +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-flags --preview-window=down:5:wrap +zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview \ + '[[ $group == "[process ID]" ]] && ps --pid=$word -o cmd --no-headers -w -w' +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap + + +bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word +bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word +bindkey -s '^[[5~' '' # Do nothing on pageup and pagedown. Better than printing '~'. +bindkey -s '^[[6~' '' +bindkey '^[[3;5~' kill-word # ctrl+del delete next word +# bindkey '^h' _complete_help +bindkey '^I' expand-or-complete-prefix # Fix autopair completion within brackets +bindkey '^H' backward-kill-word diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/chpwd_ls b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/60/6040293f07123217c60427530e5d03f787e054de.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/chpwd_ls rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/60/6040293f07123217c60427530e5d03f787e054de.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/6c/6c809a36d4f313ca52b075fd3bce3f88e880d695.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/sudo rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/6c/6c809a36d4f313ca52b075fd3bce3f88e880d695.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/75/752c18cd8baba5a3177cc06aafbbe80c101fe48b.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/75/752c18cd8baba5a3177cc06aafbbe80c101fe48b.svn-base new file mode 100644 index 0000000..75d19b3 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/75/752c18cd8baba5a3177cc06aafbbe80c101fe48b.svn-base @@ -0,0 +1,11 @@ +--- hlissner---zsh-autopair/autopair.zsh 2020-11-06 16:54:27.410262798 -0500 ++++ hlissner---zsh-autopair/autopair.zsh-patch 2020-11-06 16:54:41.395204729 -0500 +@@ -211,8 +211,6 @@ + done + + bindkey "^?" autopair-delete +- bindkey "^h" autopair-delete + bindkey -M isearch "^?" backward-delete-char +- bindkey -M isearch "^h" backward-delete-char + } + [[ -n $AUTOPAIR_INHIBIT_INIT ]] || autopair-init diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/README.md b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/77/7723bbaf7022143494bcd2ce157082e718b9ae27.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/README.md rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/77/7723bbaf7022143494bcd2ce157082e718b9ae27.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/79/799e41a5129d5573e7f37ab7f23abacda68c7be3.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/79/799e41a5129d5573e7f37ab7f23abacda68c7be3.svn-base new file mode 100644 index 0000000..2239c4a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/79/799e41a5129d5573e7f37ab7f23abacda68c7be3.svn-base @@ -0,0 +1,48 @@ +#compdef pmm +# zsh tab completion for pmm +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# + +# zsh-ism: this file is effectively a function. +# shellcheck disable=SC2168 +local -a args +args=( + # Flags + '--assume-no:assume no at prompts' + '(-y --yes --assume-yes)'{-y,--yes,--assume-yes}'[assume yes at prompts]' + '(-q --quiet)'{-q,--quiet}'[lesson output verbosity]' + '(--strat --stratum)'{--strat,--stratum}'[restrict to ]' + '(--pm --package-manager)'{--pm,--package-manager}'[restrict to ]' + '--every:operate on every available instance of items' + '--newest:select newest corresponding versions of items' + '--oldest:select oldest corresponding versions of items' + '--approx-version:only consider items with a version prefixed by ' + '--exact-version:only consider items that are exactly ' + '--newer-or-equal:only consider items that are newer than or equal to ' + '--newer-than:only consider items that are newer than ' + '--older-or-equal:only consider items that are older than or equal to ' + '--older-than:only consider items that are older than ' + "--diff-world:print differences between /bedrock/etc/world and system's explicitly installed packages" + '--update-world-installed:populate /bedrock/etc/world with missing explicitly installed packages' + '--update-world-removed:remove /bedrock/etc/world items that do not correspond to explicitly installed packages' + "--update-world:sync /bedrock/etc/world to system's explicitly installed package list" + '--apply-world-installed:explicitly install /bedrock/etc/world items' + '--apply-world-removed:remove packages not in /bedrock/etc/world and resulting orphan packages' + "--apply-world:sync system's explicitly installed package list to /bedrock/etc/world and remove orphans" + '--check-pmm-configuration:sanity check pmm configuration' + '--list-pmm-ui-files:list expected front-end files with current user interface' + '(-h --help)'{-h,--help}'[print help message]' + # Stratum + #'(-)1:operations:_pmm_list_operations' + # Command to run from stratum + #'2:command:_strat_local_cmds' + # Parameters for command being run from specified stratum + #'*::parameters:_strat_local_params' +) + +# zsh-ism: we want it to expand here +# shellcheck disable=SC2128,SC2086 +_arguments ${args} diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/7c/7c402d0c1e0f3e1c90a3e3eac4afe5c8ce28b801.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/7c/7c402d0c1e0f3e1c90a3e3eac4afe5c8ce28b801.svn-base new file mode 100644 index 0000000..2a167d5 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/7c/7c402d0c1e0f3e1c90a3e3eac4afe5c8ce28b801.svn-base @@ -0,0 +1 @@ +[[ $EUID -ne 0 ]] && rm-trash -I -v "${@}" || command rm -I -v "${@}" diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/81/81a16e8a05915503584ce5f9cb2adc20cada50e1.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/81/81a16e8a05915503584ce5f9cb2adc20cada50e1.svn-base new file mode 100644 index 0000000..7e7384a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/81/81a16e8a05915503584ce5f9cb2adc20cada50e1.svn-base @@ -0,0 +1,11 @@ +For some reason git would stop completing after one complete, this just redos it every time +--- felipec---git-completion/_git 2020-10-25 20:20:07.064072866 -0400 ++++ felipec---git-completion/_git-patch 2020-10-25 20:18:34.801896765 -0400 +@@ -239,6 +239,7 @@ + _requested common-commands && __git_zsh_cmd_common + _requested alias-commands && __git_zsh_cmd_alias + _requested all-commands && __git_zsh_cmd_all ++ compdef _git git + let _ret || break + done + ;; diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_tlp-stat b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/93/936d1459f2c372e9bcc1a5d76d366096d0084949.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_tlp-stat rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/93/936d1459f2c372e9bcc1a5d76d366096d0084949.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_dynamicwall b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/93/93ab88a10a883a675a7ccc78eaef79e6831d56d4.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_dynamicwall rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/93/93ab88a10a883a675a7ccc78eaef79e6831d56d4.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/LICENSE b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/94/94668cb2ebb8349a9e6b247ae4a97746ea5c377e.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/LICENSE rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/94/94668cb2ebb8349a9e6b247ae4a97746ea5c377e.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/err_ggrep b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/97/97f14ef7096727665d7090f9ab87284726b08212.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/err_ggrep rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/97/97f14ef7096727665d7090f9ab87284726b08212.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_colorls b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/9b/9b28eb8ce43991079a894778e865b3a1831daa33.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_colorls rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/9b/9b28eb8ce43991079a894778e865b3a1831daa33.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/a3/a34fedf68c7bf3283d667fb7074bd799234b02ce.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/a3/a34fedf68c7bf3283d667fb7074bd799234b02ce.svn-base new file mode 100644 index 0000000..632a90c --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/a3/a34fedf68c7bf3283d667fb7074bd799234b02ce.svn-base @@ -0,0 +1,24 @@ +--- changyuheng---fz/fz.sh 2020-07-21 01:00:05.985292796 -0400 ++++ changyuheng---fz/fz.sh-patch 2020-08-24 04:21:02.276684891 -0400 +@@ -271,15 +271,15 @@ + + _fz() { + local rc +- if [[ "$($FZ_HISTORY_LIST_GENERATOR "$@" | head | wc -l)" -gt 0 ]]; then +- "$FZ_HISTORY_CD_CMD" "$@" ++ local err ++ local zmatch="$($FZ_HISTORY_LIST_GENERATOR "${@%/}" | head -n1)" ++ if [[ ${#zmatch} -gt 0 ]]; then ++ "$FZ_HISTORY_CD_CMD" "${@%/}" + elif [[ "$FZ_SUBDIR_TRAVERSAL" -ne 0 ]]; then +- err=$(cd "${@: -1}" 2>&1) +- rc=$? +- if ! cd "${@: -1}" 2>/dev/null; then ++ zmatch="$($FZ_HISTORY_LIST_GENERATOR "${@[0,-2]}" | head -n1)" ++ (){ cd "$zmatch/"*"${@: -1}"*"/" 2> $1; rc=$? err=$(<$1);} =(:) "${@}" + echo ${err#* } >&2 + return $rc +- fi + fi + } + diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/a3/a353540c55fb6b89bd0714fcb620444bf2cb63b5.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/a3/a353540c55fb6b89bd0714fcb620444bf2cb63b5.svn-base new file mode 100644 index 0000000..ddbe25c --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/a3/a353540c55fb6b89bd0714fcb620444bf2cb63b5.svn-base @@ -0,0 +1 @@ +command kate "${@}" 2>/dev/null &! diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/a5/a594b9aff512ccf37ce90b6b56c21fd5e3c3a26d.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/a5/a594b9aff512ccf37ce90b6b56c21fd5e3c3a26d.svn-base new file mode 100644 index 0000000..474c7e1 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/a5/a594b9aff512ccf37ce90b6b56c21fd5e3c3a26d.svn-base @@ -0,0 +1,30 @@ +Optimize +--- kadaan---per-directory-history/per-directory-history.zsh 2020-08-24 05:35:33.232756679 -0400 ++++ kadaan---per-directory-history/per-directory-history-patch 2020-08-24 05:37:48.008288237 -0400 +@@ -46,7 +46,7 @@ + if ! $_per_directory_history_is_global + then + fc -P +- mkdir -p ${_per_directory_history_path:h} ++ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h} + fc -p $_per_directory_history_path + fi + } +@@ -73,7 +73,7 @@ + local fn + if $_per_directory_history_is_global + then +- mkdir -p ${_per_directory_history_path:h} ++ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h} + fn=$_per_directory_history_path + else + fn=$_per_directory_history_main_histfile +@@ -96,7 +96,7 @@ + function _per-directory-history-set-directory-history() { + fc -P + +- mkdir -p ${_per_directory_history_path:h} ++ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h} + fc -p $_per_directory_history_path + _per_directory_history_is_global=false + } diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/b9/b93232253ecf46c72006feb87837e2d9b0143034.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/b9/b93232253ecf46c72006feb87837e2d9b0143034.svn-base new file mode 100644 index 0000000..d0534c1 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/b9/b93232253ecf46c72006feb87837e2d9b0143034.svn-base @@ -0,0 +1,59 @@ +Add ability to bind a key to accept line and run it at once +--- Aloxaf---fzf-tab/fzf-tab.zsh 2020-11-04 15:23:44.565964815 -0500 ++++ Aloxaf---fzf-tab/fzf-tab.zsh-patch 2020-11-04 15:23:11.025414960 -0500 +@@ -95,7 +95,7 @@ + -ftb-complete() { + local -a _ftb_compcap + local -Ua _ftb_groups +- local choice choices _ftb_curcontext continuous_trigger print_query bs=$'\2' nul=$'\0' ++ local choice choices _ftb_curcontext continuous_trigger print_query accept_line bs=$'\2' nul=$'\0' + + # must run with user options; don't move `emulate -L zsh` above this line + (( $+builtins[fzf-tab-compcap-generate] )) && fzf-tab-compcap-generate -i +@@ -116,6 +116,7 @@ + -ftb-generate-header # sets `_ftb_headers` + -ftb-zstyle -s continuous-trigger continuous_trigger || continuous_trigger=/ + -ftb-zstyle -s print-query print_query || print_query=alt-enter ++ -ftb-zstyle -s accept-line accept_line || accept_line=enter + + # NOTE: Using pipe here causes an error "failed to read /dev/tty" + # when _ftb_complist is long +@@ -145,6 +146,10 @@ + if [[ $choices[1] && $choices[1] == $continuous_trigger ]]; then + typeset -gi _ftb_continue=1 + fi ++ ++ if [[ $choices[1] && $choices[1] == $accept_line ]]; then ++ typeset -gi _ftb_accept=1 ++ fi + choices[1]=() + + for choice in "$choices[@]"; do +@@ -170,6 +175,7 @@ + local -i _ftb_continue=1 + while (( _ftb_continue )); do + _ftb_continue=0 ++ local _ftb_accept=0 + local IN_FZF_TAB=1 + { + zle .fzf-tab-orig-$_ftb_orig_widget +@@ -181,7 +187,7 @@ + zle .reset-prompt + zle -R + else +- zle redisplay ++ (( _ftb_accept )) && zle accept-line || zle redisplay + fi + done + } +--- Aloxaf---fzf-tab/lib/-ftb-fzf 2020-11-04 15:23:44.565964815 -0500 ++++ Aloxaf---fzf-tab/lib/-ftb-fzf-patch 2020-11-04 15:23:38.826034508 -0500 +@@ -49,7 +49,7 @@ + --color=hl:$(( header_lines == 0 ? 188 : 255 )) \ + --cycle \ + --delimiter='\x00' \ +- --expect=$continuous_trigger,$print_query \ ++ --expect=$continuous_trigger,$print_query,$accept_line \ + --header-lines=$header_lines \ + --height=${FZF_TMUX_HEIGHT:=$(( lines > LINES / 3 * 2 ? LINES / 3 * 2 : lines ))} \ + --layout=reverse \ diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/ba/ba7d1460579d3023d24d89b78a71a1b00b95f5b7.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/ba/ba7d1460579d3023d24d89b78a71a1b00b95f5b7.svn-base new file mode 100644 index 0000000..26545d3 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/ba/ba7d1460579d3023d24d89b78a71a1b00b95f5b7.svn-base @@ -0,0 +1,209 @@ +#Let Atom highlight this: -*- shell-script -*- + +# According to the Zsh Plugin Standard: +# http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html + +0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" +0="${${(M)0:#/*}:-$PWD/$0}" + +# Then ${0:h} to get plugin's directory + +# Autoload personal functions +fpath=("${0:h}/functions" "${fpath[@]}") +autoload -Uz $fpath[1]/*(.:t) + +_zsh_autosuggest_strategy_dir_history(){ # Avoid Zinit picking this up as a completion + emulate -L zsh + if $_per_directory_history_is_global && [[ -r "$_per_directory_history_path" ]]; then + setopt EXTENDED_GLOB + fc -a -p "$_per_directory_history_path" + local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" + local pattern="$prefix*" + if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then + pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)" + fi + local dir_history=() + typeset -g suggestion="${history[(r)$pattern]}" + else + typeset -g suggestion= + fi +} + +! $isdolphin && add-zsh-hook chpwd chpwd_ls + +######################### +# Variables # +######################### + +pchf="${0:h}/patches" +thmf="${0:h}/themes" +GENCOMPL_FPATH="${0:h}/completions" +GENCOMP_DIR="${0:h}/completions" +ZSHZ_DATA="${ZPFX}/z" +HISTFILE="${HOME}/.histfile" +PER_DIRECTORY_HISTORY_BASE="${ZPFX}/per-directory-history" +AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" +export CUSTOMIZEPKG_CONFIG="${HOME}/.config/customizepkg" +export WGETRC="${XDG_CONFIG_HOME}/wgetrc" +export LESSKEY="${XDG_CONFIG_HOME}/less/lesskey" +export LESSHISTFILE="${XDG_CACHE_HOME}/less/history" +export TMPPREFIX="${TMPDIR%/}/zsh" + +# Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) +UPDATELOCAL_GITDIR="${HOME}/github/built" + +ZSH_AUTOSUGGEST_USE_ASYNC=true +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 +ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c100,)" # Do not consider 100 character entries +ZSH_AUTOSUGGEST_COMPLETION_IGNORE="[[:space:]]*" # Ignore leading whitespace +ZSH_AUTOSUGGEST_MANUAL_REBIND=set +ZSH_AUTOSUGGEST_STRATEGY=(dir_history history completion) +FAST_ALIAS_TIPS_PREFIX="» $(tput setaf 6)" +FAST_ALIAS_TIPS_SUFFIX="$(tput sgr0) «" +HISTORY_SUBSTRING_SEARCH_FUZZY=set +AUTOPAIR_CTRL_BKSPC_WIDGET=".backward-kill-word" + +export GI_TEMPLATE="${ZPFX}/git-ignore-template" +export OPENCV_LOG_LEVEL=ERROR # Hide nonimportant errors for howdy +export rm_opts=(-I -v) +export EDITOR=micro +export SYSTEMD_EDITOR=${EDITOR} +export GIT_DISCOVERY_ACROSS_FILESYSTEM=true # etckeeper on bedrock + +FZF_DEFAULT_OPTS=" +--border +--height 80% +--extended +--ansi +--reverse +--cycle +--bind ctrl-s:toggle-sort +--bind 'alt-e:execute($EDITOR {} >/dev/tty /dev/null | head -200' +--preview-window right:65%:wrap +" +FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" + +FZ_HISTORY_CD_CMD=zshz +ZSHZ_CMD=" " # Do not set the alias, fz will cover that +ZSHZ_UNCOMMON=1 +forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin + +# Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) +dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' \.config/gtk-3\.0/settings\.ini ) + +# Export variables when connected via SSH +if [[ -n $SSH_CONNECTION ]]; then + export DISPLAY=:0 + alias ls="lsd --group-dirs=first --icon=never" +else + alias ls='lsd --group-dirs=first' +fi + +# Set variables if on ac mode +if [[ $(cat /run/tlp/last_pwr) = 0 ]]; then + alias micro="micro -fastdirty false" +fi + +######################### +# Aliases # +######################### + +# Access zsh config files +alias zshconf="(){ setopt extendedglob local_options; kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc }" +alias zshconfatom="(){ setopt extendedglob local_options; atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc &! }" + +alias t='tail -f' +alias g='git' +alias gi="git-ignore" +alias open='xdg-open' +alias atom='atom --disable-gpu' +alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories +# Aesthetic function for Dolphin, clear -x if cd while in Dolphin +$isdolphin && alias cd='clear -x; cd' + +# dot file management +alias dots='DOTBARE_DIR="$HOME/.dots" DOTBARE_TREE="$HOME" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" dotbare' +export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" +export DOTBARE_DIFF_PAGER=diff-so-fancy + +(( ${+commands[brl]} )) && { +(){ local stratum strata=( /bedrock/run/enabled_strata/* local) +for stratum in ${strata:t}; do +hash -d "${stratum}"="/bedrock/strata/${stratum}" +[[ "${stratum}" = "local" ]] && continue +alias "${stratum}"="strat ${stratum}" +alias "r${stratum}"="strat -r ${stratum}" +[[ -d "/bedrock/strata/${stratum}/etc/.git" ]] && \ +alias "${stratum:0:1}edots"="command sudo strat -r ${stratum} git --git-dir=/etc/.git --work-tree=/etc" +done } +alias bedots='command sudo DOTBARE_FZF_DEFAULT_OPTS="$DOTBARE_FZF_DEFAULT_OPTS" DOTBARE_DIR="/bedrock/.git" DOTBARE_TREE="/bedrock" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/bdotbare" dotbare' +} + +######################### +# Other # +######################### + +bindkey -e # EMACS bindings +setopt append_history # Allow multiple terminal sessions to all append to one zsh command history +setopt hist_ignore_all_dups # delete old recorded entry if new entry is a duplicate. +setopt no_beep # do not beep on error +setopt auto_cd # If you type foo, and it is not a command, and it is a directory in your cdpath, go there +setopt multios # perform implicit tees or cats when multiple redirections are attempted +setopt prompt_subst # enable parameter expansion, command substitution, and arithmetic expansion in the prompt +setopt interactive_comments # Allow comments even in interactive shells (especially for Muness) +setopt pushd_ignore_dups # don't push multiple copies of the same directory onto the directory stack +setopt auto_pushd # make cd push the old directory onto the directory stack +setopt pushdminus # swapped the meaning of cd +1 and cd -1; we want them to mean the opposite of what they mean +setopt pushd_silent # Silence pushd +#setopt glob_dots # Use for hidden files in cd comp +setopt extended_glob + +# Fuzzy matching of completions for when you mistype them: +zstyle ':completion:*' completer _complete _match _list _ignored _correct _approximate +zstyle ':completion:*:match:*' original only +zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' + +# Pretty completions +#zstyle ':completion:*:matches' group 'yes' +#zstyle ':completion:*:options' description 'yes' +#zstyle ':completion:*:options' auto-description '%d' +#zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +#zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:descriptions' format '[%d]' +#zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +#zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +#zstyle ':completion:*' group-name '' +zstyle ':completion:*' verbose yes +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' +zstyle ':completion:*' use-cache true +zstyle ':completion:*' special-dirs true + +# fzf-tab +zstyle ':fzf-tab:*' fzf-bindings 'space:accept' # Space as accept +zstyle ':fzf-tab:*' print-query ctrl-c # Use input as result when ctrl-c +zstyle ':fzf-tab:*' accept-line enter +zstyle ':fzf-tab:*' prefix '' # No dot prefix +zstyle ':fzf-tab:*' single-group color header # Show header for single groups +zstyle ':fzf-tab:complete:(cd|ls|lsd):*' fzf-preview 'ls -1 --color=always -- $realpath' +zstyle ':fzf-tab:complete:((micro|cp|rm):argument-rest|kate:*)' fzf-preview 'bat --color=always -- $realpath 2>/dev/null || ls --color=always -- $realpath' +zstyle ':fzf-tab:complete:micro:argument-rest' fzf-flags --preview-window=right:65% +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-preview "git --git-dir=$UPDATELOCAL_GITDIR/\${word}/.git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset ||%n%b' ..FETCH_HEAD 2>/dev/null" +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-flags --preview-window=down:5:wrap +zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview \ + '[[ $group == "[process ID]" ]] && ps --pid=$word -o cmd --no-headers -w -w' +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap + + +bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word +bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word +bindkey -s '^[[5~' '' # Do nothing on pageup and pagedown. Better than printing '~'. +bindkey -s '^[[6~' '' +bindkey '^[[3;5~' kill-word # ctrl+del delete next word +# bindkey '^h' _complete_help +bindkey '^I' expand-or-complete-prefix # Fix autopair completion within brackets +bindkey '^H' backward-kill-word diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/bb/bbb93237fef1f0b8bc71c67f4b52c715e9c34574.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/bb/bbb93237fef1f0b8bc71c67f4b52c715e9c34574.svn-base new file mode 100644 index 0000000..2ff64c2 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/bb/bbb93237fef1f0b8bc71c67f4b52c715e9c34574.svn-base @@ -0,0 +1,210 @@ +#Let Atom highlight this: -*- shell-script -*- + +# According to the Zsh Plugin Standard: +# http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html + +0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" +0="${${(M)0:#/*}:-$PWD/$0}" + +# Then ${0:h} to get plugin's directory + +# Autoload personal functions +fpath=("${0:h}/functions" "${fpath[@]}") +autoload -Uz $fpath[1]/*(.:t) + +_zsh_autosuggest_strategy_dir_history(){ # Avoid Zinit picking this up as a completion + emulate -L zsh + if $_per_directory_history_is_global && [[ -r "$_per_directory_history_path" ]]; then + setopt EXTENDED_GLOB + fc -a -p "$_per_directory_history_path" + local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" + local pattern="$prefix*" + if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then + pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)" + fi + local dir_history=() + typeset -g suggestion="${history[(r)$pattern]}" + else + typeset -g suggestion= + fi +} + +! $isdolphin && add-zsh-hook chpwd chpwd_ls + +######################### +# Variables # +######################### + +pchf="${0:h}/patches" +thmf="${0:h}/themes" +ZINIT[ZCOMPDUMP_PATH]="${ZSH_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache/zinit}}/zcompdump-${HOST/.*/}-${ZSH_VERSION}" +GENCOMPL_FPATH="${0:h}/completions" +GENCOMP_DIR="${0:h}/completions" +ZSHZ_DATA="${ZPFX}/z" +HISTFILE="${HOME}/.histfile" +PER_DIRECTORY_HISTORY_BASE="${ZPFX}/per-directory-history" +AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" +export CUSTOMIZEPKG_CONFIG="${HOME}/.config/customizepkg" +export WGETRC="${XDG_CONFIG_HOME}/wgetrc" +export LESSKEY="${XDG_CONFIG_HOME}/less/lesskey" +export LESSHISTFILE="${XDG_CACHE_HOME}/less/history" +export TMPPREFIX="${TMPDIR%/}/zsh" + +# Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) +UPDATELOCAL_GITDIR="${HOME}/github/built" + +ZSH_AUTOSUGGEST_USE_ASYNC=true +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 +ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c100,)" # Do not consider 100 character entries +ZSH_AUTOSUGGEST_COMPLETION_IGNORE="[[:space:]]*" # Ignore leading whitespace +ZSH_AUTOSUGGEST_MANUAL_REBIND=set +ZSH_AUTOSUGGEST_STRATEGY=(dir_history history completion) +FAST_ALIAS_TIPS_PREFIX="» $(tput setaf 6)" +FAST_ALIAS_TIPS_SUFFIX="$(tput sgr0) «" +HISTORY_SUBSTRING_SEARCH_FUZZY=set +AUTOPAIR_CTRL_BKSPC_WIDGET=".backward-kill-word" + +export GI_TEMPLATE="${ZPFX}/git-ignore-template" +export OPENCV_LOG_LEVEL=ERROR # Hide nonimportant errors for howdy +export rm_opts=(-I -v) +export EDITOR=micro +export SYSTEMD_EDITOR=${EDITOR} +export GIT_DISCOVERY_ACROSS_FILESYSTEM=true # etckeeper on bedrock + +FZF_DEFAULT_OPTS=" +--border +--height 80% +--extended +--ansi +--reverse +--cycle +--bind ctrl-s:toggle-sort +--bind 'alt-e:execute($EDITOR {} >/dev/tty /dev/null | head -200' +--preview-window right:65%:wrap +" +FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" + +FZ_HISTORY_CD_CMD=zshz +ZSHZ_CMD=" " # Do not set the alias, fz will cover that +ZSHZ_UNCOMMON=1 +forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin + +# Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) +dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' \.config/gtk-3\.0/settings\.ini ) + +# Export variables when connected via SSH +if [[ -n $SSH_CONNECTION ]]; then + export DISPLAY=:0 + alias ls="lsd --group-dirs=first --icon=never" +else + alias ls='lsd --group-dirs=first' +fi + +# Set variables if on ac mode +if [[ $(cat /run/tlp/last_pwr) = 0 ]]; then + alias micro="micro -fastdirty false" +fi + +######################### +# Aliases # +######################### + +# Access zsh config files +alias zshconf="(){ setopt extendedglob local_options; kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc }" +alias zshconfatom="(){ setopt extendedglob local_options; atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc &! }" + +alias t='tail -f' +alias g='git' +alias gi="git-ignore" +alias open='xdg-open' +alias atom='atom --disable-gpu' +alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories +# Aesthetic function for Dolphin, clear -x if cd while in Dolphin +$isdolphin && alias cd='clear -x; cd' + +# dot file management +alias dots='DOTBARE_DIR="$HOME/.dots" DOTBARE_TREE="$HOME" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" dotbare' +export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" +export DOTBARE_DIFF_PAGER=delta + +(( ${+commands[brl]} )) && { +(){ local stratum strata=( /bedrock/run/enabled_strata/* local) +for stratum in ${strata:t}; do +hash -d "${stratum}"="/bedrock/strata/${stratum}" +[[ "${stratum}" = "local" ]] && continue +alias "${stratum}"="strat ${stratum}" +alias "r${stratum}"="strat -r ${stratum}" +[[ -d "/bedrock/strata/${stratum}/etc/.git" ]] && \ +alias "${stratum:0:1}edots"="command sudo strat -r ${stratum} git --git-dir=/etc/.git --work-tree=/etc" +done } +alias bedots='command sudo DOTBARE_FZF_DEFAULT_OPTS="$DOTBARE_FZF_DEFAULT_OPTS" DOTBARE_DIR="/bedrock/.git" DOTBARE_TREE="/bedrock" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/bdotbare" dotbare' +} + +######################### +# Other # +######################### + +bindkey -e # EMACS bindings +setopt append_history # Allow multiple terminal sessions to all append to one zsh command history +setopt hist_ignore_all_dups # delete old recorded entry if new entry is a duplicate. +setopt no_beep # do not beep on error +setopt auto_cd # If you type foo, and it is not a command, and it is a directory in your cdpath, go there +setopt multios # perform implicit tees or cats when multiple redirections are attempted +setopt prompt_subst # enable parameter expansion, command substitution, and arithmetic expansion in the prompt +setopt interactive_comments # Allow comments even in interactive shells (especially for Muness) +setopt pushd_ignore_dups # don't push multiple copies of the same directory onto the directory stack +setopt auto_pushd # make cd push the old directory onto the directory stack +setopt pushdminus # swapped the meaning of cd +1 and cd -1; we want them to mean the opposite of what they mean +setopt pushd_silent # Silence pushd +#setopt glob_dots # Use for hidden files in cd comp +setopt extended_glob + +# Fuzzy matching of completions for when you mistype them: +zstyle ':completion:*' completer _complete _match _list _ignored _correct _approximate +zstyle ':completion:*:match:*' original only +zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' + +# Pretty completions +#zstyle ':completion:*:matches' group 'yes' +#zstyle ':completion:*:options' description 'yes' +#zstyle ':completion:*:options' auto-description '%d' +#zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +#zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:descriptions' format '[%d]' +#zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +#zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +#zstyle ':completion:*' group-name '' +zstyle ':completion:*' verbose yes +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' +zstyle ':completion:*' use-cache true +zstyle ':completion:*' special-dirs true + +# fzf-tab +zstyle ':fzf-tab:*' fzf-bindings 'space:accept' # Space as accept +zstyle ':fzf-tab:*' print-query ctrl-c # Use input as result when ctrl-c +zstyle ':fzf-tab:*' accept-line enter +zstyle ':fzf-tab:*' prefix '' # No dot prefix +zstyle ':fzf-tab:*' single-group color header # Show header for single groups +zstyle ':fzf-tab:complete:(cd|ls|lsd):*' fzf-preview 'ls -1 --color=always -- $realpath' +zstyle ':fzf-tab:complete:((micro|cp|rm):argument-rest|kate:*)' fzf-preview 'bat --color=always -- $realpath 2>/dev/null || ls --color=always -- $realpath' +zstyle ':fzf-tab:complete:micro:argument-rest' fzf-flags --preview-window=right:65% +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-preview "git --git-dir=$UPDATELOCAL_GITDIR/\${word}/.git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset ||%n%b' ..FETCH_HEAD 2>/dev/null" +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-flags --preview-window=down:5:wrap +zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview \ + '[[ $group == "[process ID]" ]] && ps --pid=$word -o cmd --no-headers -w -w' +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap + + +bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word +bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word +bindkey -s '^[[5~' '' # Do nothing on pageup and pagedown. Better than printing '~'. +bindkey -s '^[[6~' '' +bindkey '^[[3;5~' kill-word # ctrl+del delete next word +# bindkey '^h' _complete_help +bindkey '^I' expand-or-complete-prefix # Fix autopair completion within brackets +bindkey '^H' backward-kill-word diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/be/beb5824e50dba602c7b3d73b517e18e712fb129a.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/be/beb5824e50dba602c7b3d73b517e18e712fb129a.svn-base new file mode 100644 index 0000000..4deeefb --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/be/beb5824e50dba602c7b3d73b517e18e712fb129a.svn-base @@ -0,0 +1,210 @@ +#Let Atom highlight this: -*- shell-script -*- + +# According to the Zsh Plugin Standard: +# http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html + +0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" +0="${${(M)0:#/*}:-$PWD/$0}" + +# Then ${0:h} to get plugin's directory + +# Autoload personal functions +fpath=("${0:h}/functions" "${fpath[@]}") +autoload -Uz $fpath[1]/*(.:t) + +_zsh_autosuggest_strategy_dir_history(){ # Avoid Zinit picking this up as a completion + emulate -L zsh + if $_per_directory_history_is_global && [[ -r "$_per_directory_history_path" ]]; then + setopt EXTENDED_GLOB + fc -a -p "$_per_directory_history_path" + local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" + local pattern="$prefix*" + if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then + pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)" + fi + local dir_history=() + typeset -g suggestion="${history[(r)$pattern]}" + else + typeset -g suggestion= + fi +} + +! $isdolphin && add-zsh-hook chpwd chpwd_ls + +######################### +# Variables # +######################### + +pchf="${0:h}/patches" +thmf="${0:h}/themes" +ZINIT[ZCOMPDUMP_PATH]="${ZSH_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache/zinit}}/zcompdump-${HOST/.*/}-${ZSH_VERSION}" +GENCOMPL_FPATH="${0:h}/completions" +GENCOMP_DIR="${0:h}/completions" +ZSHZ_DATA="${ZPFX}/z" +HISTFILE="${HOME}/.histfile" +PER_DIRECTORY_HISTORY_BASE="${ZPFX}/per-directory-history" +AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" +export CUSTOMIZEPKG_CONFIG="${HOME}/.config/customizepkg" +export WGETRC="${XDG_CONFIG_HOME}/wgetrc" +export LESSKEY="${XDG_CONFIG_HOME}/less/lesskey" +export LESSHISTFILE="${XDG_CACHE_HOME}/less/history" +export TMPPREFIX="${TMPDIR%/}/zsh" + +# Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) +UPDATELOCAL_GITDIR="${HOME}/github/built" + +ZSH_AUTOSUGGEST_USE_ASYNC=true +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 +ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c100,)" # Do not consider 100 character entries +ZSH_AUTOSUGGEST_COMPLETION_IGNORE="[[:space:]]*" # Ignore leading whitespace +ZSH_AUTOSUGGEST_MANUAL_REBIND=set +ZSH_AUTOSUGGEST_STRATEGY=(dir_history history completion) +FAST_ALIAS_TIPS_PREFIX="» $(tput setaf 6)" +FAST_ALIAS_TIPS_SUFFIX="$(tput sgr0) «" +HISTORY_SUBSTRING_SEARCH_FUZZY=set +AUTOPAIR_CTRL_BKSPC_WIDGET=".backward-kill-word" + +export GI_TEMPLATE="${ZPFX}/git-ignore-template" +export OPENCV_LOG_LEVEL=ERROR # Hide nonimportant errors for howdy +export rm_opts=(-I -v) +export EDITOR=micro +export SYSTEMD_EDITOR=${EDITOR} +export GIT_DISCOVERY_ACROSS_FILESYSTEM=true # etckeeper on bedrock + +FZF_DEFAULT_OPTS=" +--border +--height 80% +--extended +--ansi +--reverse +--cycle +--bind ctrl-s:toggle-sort +--bind 'alt-e:execute($EDITOR {} >/dev/tty /dev/null | head -200' +--preview-window right:65%:wrap +" +FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" + +FZ_HISTORY_CD_CMD=zshz +ZSHZ_CMD=" " # Do not set the alias, fz will cover that +ZSHZ_UNCOMMON=1 +forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin + +# Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) +dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' \.config/gtk-3\.0/settings\.ini ) + +# Export variables when connected via SSH +if [[ -n $SSH_CONNECTION ]]; then + export DISPLAY=:0 + alias ls="lsd --group-dirs=first --icon=never" +else + alias ls='lsd --group-dirs=first' +fi + +# Set variables if on ac mode +if [[ $(cat /run/tlp/last_pwr) = 0 ]]; then + alias micro="micro -fastdirty false" +fi + +######################### +# Aliases # +######################### + +# Access zsh config files +alias zshconf="(){ setopt extendedglob local_options; kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc }" +alias zshconfatom="(){ setopt extendedglob local_options; atom ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc &! }" + +alias t='tail -f' +alias g='git' +alias gi="git-ignore" +alias open='xdg-open' +alias atom='atom --disable-gpu' +alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories +# Aesthetic function for Dolphin, clear -x if cd while in Dolphin +$isdolphin && alias cd='clear -x; cd' + +# dot file management +alias dots='DOTBARE_DIR="$HOME/.dots" DOTBARE_TREE="$HOME" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" dotbare' +export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" +export DOTBARE_DIFF_PAGER=diff-so-fancy + +(( ${+commands[brl]} )) && { +(){ local stratum strata=( /bedrock/run/enabled_strata/* local) +for stratum in ${strata:t}; do +hash -d "${stratum}"="/bedrock/strata/${stratum}" +[[ "${stratum}" = "local" ]] && continue +alias "${stratum}"="strat ${stratum}" +alias "r${stratum}"="strat -r ${stratum}" +[[ -d "/bedrock/strata/${stratum}/etc/.git" ]] && \ +alias "${stratum:0:1}edots"="command sudo strat -r ${stratum} git --git-dir=/etc/.git --work-tree=/etc" +done } +alias bedots='command sudo DOTBARE_FZF_DEFAULT_OPTS="$DOTBARE_FZF_DEFAULT_OPTS" DOTBARE_DIR="/bedrock/.git" DOTBARE_TREE="/bedrock" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/bdotbare" dotbare' +} + +######################### +# Other # +######################### + +bindkey -e # EMACS bindings +setopt append_history # Allow multiple terminal sessions to all append to one zsh command history +setopt hist_ignore_all_dups # delete old recorded entry if new entry is a duplicate. +setopt no_beep # do not beep on error +setopt auto_cd # If you type foo, and it is not a command, and it is a directory in your cdpath, go there +setopt multios # perform implicit tees or cats when multiple redirections are attempted +setopt prompt_subst # enable parameter expansion, command substitution, and arithmetic expansion in the prompt +setopt interactive_comments # Allow comments even in interactive shells (especially for Muness) +setopt pushd_ignore_dups # don't push multiple copies of the same directory onto the directory stack +setopt auto_pushd # make cd push the old directory onto the directory stack +setopt pushdminus # swapped the meaning of cd +1 and cd -1; we want them to mean the opposite of what they mean +setopt pushd_silent # Silence pushd +#setopt glob_dots # Use for hidden files in cd comp +setopt extended_glob + +# Fuzzy matching of completions for when you mistype them: +zstyle ':completion:*' completer _complete _match _list _ignored _correct _approximate +zstyle ':completion:*:match:*' original only +zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' + +# Pretty completions +#zstyle ':completion:*:matches' group 'yes' +#zstyle ':completion:*:options' description 'yes' +#zstyle ':completion:*:options' auto-description '%d' +#zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +#zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:descriptions' format '[%d]' +#zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +#zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +#zstyle ':completion:*' group-name '' +zstyle ':completion:*' verbose yes +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' +zstyle ':completion:*' use-cache true +zstyle ':completion:*' special-dirs true + +# fzf-tab +zstyle ':fzf-tab:*' fzf-bindings 'space:accept' # Space as accept +zstyle ':fzf-tab:*' print-query ctrl-c # Use input as result when ctrl-c +zstyle ':fzf-tab:*' accept-line enter +zstyle ':fzf-tab:*' prefix '' # No dot prefix +zstyle ':fzf-tab:*' single-group color header # Show header for single groups +zstyle ':fzf-tab:complete:(cd|ls|lsd):*' fzf-preview 'ls -1 --color=always -- $realpath' +zstyle ':fzf-tab:complete:((micro|cp|rm):argument-rest|kate:*)' fzf-preview 'bat --color=always -- $realpath 2>/dev/null || ls --color=always -- $realpath' +zstyle ':fzf-tab:complete:micro:argument-rest' fzf-flags --preview-window=right:65% +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-preview "git --git-dir=$UPDATELOCAL_GITDIR/\${word}/.git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset ||%n%b' ..FETCH_HEAD 2>/dev/null" +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-flags --preview-window=down:5:wrap +zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview \ + '[[ $group == "[process ID]" ]] && ps --pid=$word -o cmd --no-headers -w -w' +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap + + +bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word +bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word +bindkey -s '^[[5~' '' # Do nothing on pageup and pagedown. Better than printing '~'. +bindkey -s '^[[6~' '' +bindkey '^[[3;5~' kill-word # ctrl+del delete next word +# bindkey '^h' _complete_help +bindkey '^I' expand-or-complete-prefix # Fix autopair completion within brackets +bindkey '^H' backward-kill-word diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/LS_COLORS.patch b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/c3/c3aad847a2a766ed8e09da49ec2aa29d29e4edd1.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/patches/LS_COLORS.patch rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/c3/c3aad847a2a766ed8e09da49ec2aa29d29e4edd1.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/cb/cb570dd0186e46e553ccceb11d36bcd3e3c64f05.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/patches/rm-trash.patch rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/cb/cb570dd0186e46e553ccceb11d36bcd3e3c64f05.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/p10k-post.zsh b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/d3/d375e7f3dcab0b9631d393efbd8f978db12be7ea.svn-base similarity index 99% rename from NICHOLAS85/.zinit/plugins/_local---config-files/themes/p10k-post.zsh rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/d3/d375e7f3dcab0b9631d393efbd8f978db12be7ea.svn-base index 0523210..c75e755 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/themes/p10k-post.zsh +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/d3/d375e7f3dcab0b9631d393efbd8f978db12be7ea.svn-base @@ -51,6 +51,7 @@ # last prompt line gets hidden if it would overlap with left prompt. typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( # =========================[ Line #1 ]========================= + my_per_dir_status command_execution_time # duration of the last command status # exit code of the last command background_jobs # presence of background jobs @@ -151,7 +152,7 @@ # End filler on the edge of the screen if there are no right segments on the first line. typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' fi - ZLE_RPROMPT_INDENT=0 + typeset -g ZLE_RPROMPT_INDENT=0 # Default background color. typeset -g POWERLEVEL9K_BACKGROUND= @@ -211,7 +212,7 @@ POWERLEVEL9K_LOCK_ICON='%197F' # prefix. The shortened directory can be tab-completed to the original. typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique # Replace removed segment suffixes with this symbol. - typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= + typeset -g POWERLEVEL9K_SHORTEN_DELIMITER="" # Color of the shortened directory segments. typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 # Color of the anchor directory segments. Anchor segments are never shortened. The first @@ -1434,7 +1435,7 @@ POWERLEVEL9K_LOCK_ICON='%197F' # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you # really need it. - typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=false # If p10k is already loaded, reload configuration. # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/whichedit b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/d8/d8e8fc99befd65967d6e5d356a20ee469efab8dd.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/whichedit rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/d8/d8e8fc99befd65967d6e5d356a20ee469efab8dd.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/apt-history b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e0/e0d1117c6080120c2d34c622e3cf57c928577d73.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/apt-history rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/e0/e0d1117c6080120c2d34c622e3cf57c928577d73.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e0/e0ed6b7eb47d33b26bfb2da484e58455c31f4522.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e0/e0ed6b7eb47d33b26bfb2da484e58455c31f4522.svn-base new file mode 100644 index 0000000..3a4b706 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e0/e0ed6b7eb47d33b26bfb2da484e58455c31f4522.svn-base @@ -0,0 +1,34 @@ +Partially support per_directory_history, fix trap for SIGINT +--- zdharma---history-search-multi-word/history-search-multi-word 2020-11-05 23:01:31.568455761 -0500 ++++ zdharma---history-search-multi-word/history-search-multi-word-patch 2020-11-05 23:01:18.603608347 -0500 +@@ -169,7 +169,11 @@ + # Colorify + # + +- local preamble=$'\n'"Ctrl-K – context, Ctrl-J – bump. Entry #$__hsmw_hcw_index of $max_index"$'\n' ++ local history_type="" ++ if (( ${+_per_directory_history_is_global} )); then ++ history_type=", Ctrl-G – ${${_per_directory_history_is_global/false/global}/true/local}" ++ fi ++ local preamble=$'\n'"Ctrl-K – context, Ctrl-J – bump$history_type. Entry #$__hsmw_hcw_index of $max_index"$'\n' + integer offset=${#preamble}+${#BUFFER} + POSTDISPLAY="$preamble$text" + +@@ -408,7 +412,7 @@ + trap '(( __hsmw_recedit_trap_executed == 0 )) && zle && { __hsmw_recedit_trap_executed=1; zle .send-break; }' INT + + if zle .recursive-edit -K hsmw; then +- trap '' INT ++ trap - INT + + if [[ "$__hsmw_hcw_index" -gt "0" ]]; then + if (( __hsmw_ctx )); then +@@ -427,7 +431,7 @@ + unset __hsmw_conc + fi + else +- trap '' INT ++ trap - INT + (( __hsmw_conc )) && BUFFER="" + unset __hsmw_conc + fi diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e5588c8e0ee170a4e2465c61781ee9bcce80445c.svn-base similarity index 58% rename from NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e5588c8e0ee170a4e2465c61781ee9bcce80445c.svn-base index af2a925..bdc3547 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/config-files.plugin.zsh +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e5588c8e0ee170a4e2465c61781ee9bcce80445c.svn-base @@ -12,6 +12,23 @@ fpath=("${0:h}/functions" "${fpath[@]}") autoload -Uz $fpath[1]/*(.:t) +_zsh_autosuggest_strategy_dir_history(){ # Avoid Zinit picking this up as a completion + emulate -L zsh + if $_per_directory_history_is_global && [[ -r "$_per_directory_history_path" ]]; then + setopt EXTENDED_GLOB + fc -a -p "$_per_directory_history_path" + local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" + local pattern="$prefix*" + if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then + pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)" + fi + local dir_history=() + typeset -g suggestion="${history[(r)$pattern]}" + else + typeset -g suggestion= + fi +} + ! $isdolphin && add-zsh-hook chpwd chpwd_ls ######################### @@ -20,20 +37,28 @@ autoload -Uz $fpath[1]/*(.:t) pchf="${0:h}/patches" thmf="${0:h}/themes" +ZINIT[ZCOMPDUMP_PATH]="${ZSH_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache/zinit}}/zcompdump-${HOST/.*/}-${ZSH_VERSION}" GENCOMPL_FPATH="${0:h}/completions" -WD_CONFIG="${ZPFX}/warprc" +GENCOMP_DIR="${0:h}/completions" +MANPATH="${ZPFX}/man:${MANPATH}" ZSHZ_DATA="${ZPFX}/z" +PER_DIRECTORY_HISTORY_BASE="${ZPFX}/per-directory-history" AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" export CUSTOMIZEPKG_CONFIG="${HOME}/.config/customizepkg" +export WGETRC="${XDG_CONFIG_HOME}/wgetrc" +export LESSKEY="${XDG_CONFIG_HOME}/less/lesskey" +export LESSHISTFILE="${XDG_CACHE_HOME}/less/history" +export TMPPREFIX="${TMPDIR%/}/zsh" # Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) UPDATELOCAL_GITDIR="${HOME}/github/built" ZSH_AUTOSUGGEST_USE_ASYNC=true ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 -ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c100,)" +ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c100,)" # Do not consider 100 character entries +ZSH_AUTOSUGGEST_COMPLETION_IGNORE="[[:space:]]*" # Ignore leading whitespace ZSH_AUTOSUGGEST_MANUAL_REBIND=set -ZSH_AUTOSUGGEST_STRATEGY=(history completion) +ZSH_AUTOSUGGEST_STRATEGY=(dir_history history completion) FAST_ALIAS_TIPS_PREFIX="» $(tput setaf 6)" FAST_ALIAS_TIPS_SUFFIX="$(tput sgr0) «" HISTORY_SUBSTRING_SEARCH_FUZZY=set @@ -52,16 +77,13 @@ FZF_DEFAULT_OPTS=" --cycle --bind ctrl-s:toggle-sort --bind 'alt-e:execute($EDITOR {} >/dev/tty /dev/null | head -200\" ---preview-window right:60% +--preview '(bat --color=always {} || ls --color=always \$(x={}; echo \"\${x/#\~/\$HOME}\")) 2>/dev/null | head -200' +--preview-window right:65%:wrap " FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" -AUTO_LS_COMMANDS="colorls" -AUTO_LS_NEWLINE=false - FZ_HISTORY_CD_CMD=zshz -ZSHZ_CMD="" # Don't set the alias, fz will cover that +ZSHZ_CMD=" " # Do not set the alias, fz will cover that ZSHZ_UNCOMMON=1 forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin @@ -92,8 +114,7 @@ alias zshconfatom="(){ setopt extendedglob local_options; atom ${HOME}/.zshrc ${ alias t='tail -f' alias g='git' alias open='xdg-open' -alias atom='atom-beta --disable-gpu' -alias apm='apm-beta' +alias atom='atom --disable-gpu' alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories # Aesthetic function for Dolphin, clear -x if cd while in Dolphin $isdolphin && alias cd='clear -x; cd' @@ -101,11 +122,13 @@ $isdolphin && alias cd='clear -x; cd' # dot file management alias dots='DOTBARE_DIR="$HOME/.dots" DOTBARE_TREE="$HOME" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" dotbare' export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" +export DOTBARE_DIFF_PAGER=diff-so-fancy (( ${+commands[brl]} )) && { -(){ local stratum strata=( /bedrock/run/enabled_strata/* ) +(){ local stratum strata=( /bedrock/run/enabled_strata/* local) for stratum in ${strata:t}; do hash -d "${stratum}"="/bedrock/strata/${stratum}" +[[ "${stratum}" = "local" ]] && continue alias "${stratum}"="strat ${stratum}" alias "r${stratum}"="strat -r ${stratum}" [[ -d "/bedrock/strata/${stratum}/etc/.git" ]] && \ @@ -121,14 +144,17 @@ alias bedots='command sudo DOTBARE_FZF_DEFAULT_OPTS="$DOTBARE_FZF_DEFAULT_OPTS" bindkey -e # EMACS bindings setopt append_history # Allow multiple terminal sessions to all append to one zsh command history setopt hist_ignore_all_dups # delete old recorded entry if new entry is a duplicate. -setopt no_beep # don't beep on error -setopt auto_cd # If you type foo, and it isn't a command, and it is a directory in your cdpath, go there +setopt no_beep # do not beep on error +setopt auto_cd # If you type foo, and it is not a command, and it is a directory in your cdpath, go there setopt multios # perform implicit tees or cats when multiple redirections are attempted setopt prompt_subst # enable parameter expansion, command substitution, and arithmetic expansion in the prompt setopt interactive_comments # Allow comments even in interactive shells (especially for Muness) setopt pushd_ignore_dups # don't push multiple copies of the same directory onto the directory stack setopt auto_pushd # make cd push the old directory onto the directory stack setopt pushdminus # swapped the meaning of cd +1 and cd -1; we want them to mean the opposite of what they mean +setopt pushd_silent # Silence pushd +#setopt glob_dots # Use for hidden files in cd comp +setopt extended_glob # Fuzzy matching of completions for when you mistype them: zstyle ':completion:*' completer _complete _match _approximate @@ -136,24 +162,43 @@ zstyle ':completion:*:match:*' original only zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' # Pretty completions -zstyle ':completion:*:matches' group 'yes' -zstyle ':completion:*:options' description 'yes' -zstyle ':completion:*:options' auto-description '%d' -zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' -zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' -zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +#zstyle ':completion:*:matches' group 'yes' +#zstyle ':completion:*:options' description 'yes' +#zstyle ':completion:*:options' auto-description '%d' +#zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +#zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:descriptions' format '[%d]' +#zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' zstyle ':completion:*:default' list-prompt '%S%M matches%s' -zstyle ':completion:*' format ' %F{yellow}-- %d --%f' -zstyle ':completion:*' group-name '' +#zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +#zstyle ':completion:*' group-name '' zstyle ':completion:*' verbose yes zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' zstyle ':completion:*' use-cache true -zstyle ':completion:*' rehash true +zstyle ':completion:*' special-dirs true + +# fzf-tab +zstyle ':fzf-tab:*' fzf-bindings 'space:accept' # Space as accept +zstyle ':fzf-tab:*' print-query ctrl-c # Use input as result when ctrl-c +zstyle ':fzf-tab:*' accept-line enter +zstyle ':fzf-tab:*' prefix '' # No dot prefix +zstyle ':fzf-tab:*' single-group color header # Show header for single groups +zstyle ':fzf-tab:complete:(cd|ls|lsd):*' fzf-preview 'ls -1 --color=always -- $realpath' +zstyle ':fzf-tab:complete:((micro|cp|rm):argument-rest|kate:*)' fzf-preview 'bat --color=always -- $realpath 2>/dev/null || ls --color=always -- $realpath' +zstyle ':fzf-tab:complete:micro:argument-rest' fzf-flags --preview-window=right:65% +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-preview "git --git-dir=$UPDATELOCAL_GITDIR/\${word}/.git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset ||%n%b' ..FETCH_HEAD 2>/dev/null" +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-flags --preview-window=down:5:wrap +zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview \ + '[[ $group == "[process ID]" ]] && ps --pid=$word -o cmd --no-headers -w -w' +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap + bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word bindkey -s '^[[5~' '' # Do nothing on pageup and pagedown. Better than printing '~'. bindkey -s '^[[6~' '' bindkey '^[[3;5~' kill-word # ctrl+del delete next word +# bindkey '^h' _complete_help diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e590eb7ad1e07095165decc9055d7fb5cda55424.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/dotscheck rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e590eb7ad1e07095165decc9055d7fb5cda55424.svn-base diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_clight b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e8/e8b18f011cef1c0110bad99d713dcb9aba2f16d2.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_clight rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/e8/e8b18f011cef1c0110bad99d713dcb9aba2f16d2.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/ea/eafc8e9adbae29c246dc8919a57aa28ffe77bad8.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/ea/eafc8e9adbae29c246dc8919a57aa28ffe77bad8.svn-base new file mode 100644 index 0000000..a861bcf --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/ea/eafc8e9adbae29c246dc8919a57aa28ffe77bad8.svn-base @@ -0,0 +1,25 @@ +Fuzzy match subdirs using last arg +--- changyuheng---fz/fz.sh 2020-07-21 01:00:05.985292796 -0400 ++++ changyuheng---fz/fz.sh-patch 2020-08-24 04:21:02.276684891 -0400 +@@ -271,15 +271,15 @@ + + _fz() { + local rc +- if [[ "$($FZ_HISTORY_LIST_GENERATOR "$@" | head | wc -l)" -gt 0 ]]; then +- "$FZ_HISTORY_CD_CMD" "$@" ++ local err ++ local zmatch="$($FZ_HISTORY_LIST_GENERATOR "${@%/}" | head -n1)" ++ if [[ ${#zmatch} -gt 0 ]]; then ++ "$FZ_HISTORY_CD_CMD" "${@%/}" + elif [[ "$FZ_SUBDIR_TRAVERSAL" -ne 0 ]]; then +- err=$(cd "${@: -1}" 2>&1) +- rc=$? +- if ! cd "${@: -1}" 2>/dev/null; then ++ zmatch="$($FZ_HISTORY_LIST_GENERATOR "${@[0,-2]}" | head -n1)" ++ (){ cd "$zmatch/"*"${@: -1}"*"/" 2> $1; rc=$? err=$(<$1);} =(:) "${@}" + echo ${err#* } >&2 + return $rc +- fi + fi + } + diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/eb/eb20af1f0275e9470ed64cb29bbc1bc43182084f.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/eb/eb20af1f0275e9470ed64cb29bbc1bc43182084f.svn-base new file mode 100644 index 0000000..5956dda --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/eb/eb20af1f0275e9470ed64cb29bbc1bc43182084f.svn-base @@ -0,0 +1,8 @@ +--- empty 1969-12-31 19:00:00.000000000 -0500 ++++ dandavison---delta/git-dsf 2020-11-24 02:51:43.973724962 -0500 +@@ -0,0 +1,5 @@ ++#!/bin/sh ++ ++[ -z "$GIT_PREFIX" ] || \ ++ cd "$GIT_PREFIX" && \ ++ git diff --color "$@" | delta --diff-so-fancy diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_groff b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/eb/eb4823aefc48bf4cd35e7a61e22a0750ad1e38e6.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_groff rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/eb/eb4823aefc48bf4cd35e7a61e22a0750ad1e38e6.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/ec/ecae1eac94dbaee57bc17065b04df947fee19eec.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/ec/ecae1eac94dbaee57bc17065b04df947fee19eec.svn-base new file mode 100644 index 0000000..3533353 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/ec/ecae1eac94dbaee57bc17065b04df947fee19eec.svn-base @@ -0,0 +1,23 @@ +#compdef micro + +# zsh completions for 'micro' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + '-clean[cleans the configuration directory]' + '-config-dir[specify a custom location for the configuration directory]' + '-options[show all option help]' + '-debug[enable debug mode (enables logging to ./log.txt)]' + '-version[show the version number and information]' + '-plugin[\[PLUGIN\]...]' + '-plugin[\[PLUGIN\]...]' + '-plugin[\[PLUGIN\]...]' + '-plugin[\[PLUGIN\]...]' + '-plugin[list installed plugins]' + '-plugin[list available plugins]' + '-option[set `option` to `value` for this session]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/f1/f1a66877a1e2a9121828f3751f79eaa703084f1e.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/f1/f1a66877a1e2a9121828f3751f79eaa703084f1e.svn-base new file mode 100644 index 0000000..31f0ab6 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/f1/f1a66877a1e2a9121828f3751f79eaa703084f1e.svn-base @@ -0,0 +1,61 @@ +#compdef fzf + +_arguments \ + '*:file:_files' \ + {-x,--extended}'[Extended-search mode. Since 0. 10. 9, this is enabled by default.]' \ + {-e,--exact}'[Enable exact-match.]' \ + '-i[Case-insensitive match (default: smart-case match).]' \ + '--literal[Do not normalize latin script letters for matching.]' \ + '--algo[Fuzzy matching algorithm (default: v2) .]' \ + {-n,--nth}'[Comma-separated list of field index expressions for limiting search scope.]' \ + '--with-nth[Transform the presentation of each line using field index expressions.]' \ + {-d,--delimiter}'[Field delimiter regex for --nth and --with-nth (default: AWK-style).]' \ + '--phony[Do not perform search.]' \ + '--no-sort[Do not sort the result.]' \ + '--tac[Reverse the order of the input . RS e. g.]' \ + '--tiebreak[Comma-separated list of sort criteria to apply when the scores are tied. br .]' \ + {-m,--multi}'[Enable multi-select with tab/shift-tab.]' \ + '--no-multi[Disable multi-select.]' \ + '--no-mouse[Disable mouse.]' \ + '--bind[Comma-separated list of custom key bindings.]' \ + '--cycle[Enable cyclic scroll.]' \ + '--keep-right[Keep the right end of the line visible when it'"'"'s too long.]' \ + '--no-hscroll[Disable horizontal scroll.]' \ + '--hscroll-off[Number of screen columns to keep to the right of the highlighted substring (d…]' \ + '--filepath-word[Make word-wise movements and actions respect path separators.]' \ + '--jump-labels[Label characters for jump and jump-accept . SS Layout.]' \ + '--height[Display fzf window below the cursor with the given height instead of using th…]' \ + '--min-height[Minimum height when --height is given in percent (default: 10).]' \ + '--layout[Choose the layout (default: default) .]' \ + '--reverse[A synonym for --layout=reverse.]' \ + '--border[Draw border around the finder .]' \ + '--no-unicode[Use ASCII characters instead of Unicode box drawing characters to draw border.]' \ + '--margin[Comma-separated expression for margins around the finder. br . br .]' \ + '--info[Determines the display style of finder info.]' \ + '--no-info[A synonym for --info=hidden.]' \ + '--prompt[Input prompt (default: '"'"'> '"'"').]' \ + '--pointer[Pointer to the current line (default: '"'"'>'"'"').]' \ + '--marker[Multi-select marker (default: '"'"'>'"'"').]' \ + '--header[The given string will be printed as the sticky header.]' \ + '--header-lines[The first N lines of the input are treated as the sticky header.]' \ + '--ansi[Enable processing of ANSI color codes.]' \ + '--tabstop[Number of spaces for a tab character (default: 8).]' \ + '--color[Color configuration.]' \ + '--no-bold[Do not use bold text.]' \ + '--black[Use black background . SS History.]' \ + '--history[Load search history from the specified file and update the file on completion.]' \ + '--history-size[Maximum number of entries in the history file (default: 1000).]' \ + '--preview[Execute the given command for the current line and display the result on the …]' \ + '--preview-window[RS POSITION: (default: right) up down left right .]' \ + {-q,--query}'[Start the finder with the given query.]' \ + {-1,--select-1}'[Automatically select the only match.]' \ + {-0,--exit-0}'[Exit immediately when there'"'"'s no match.]' \ + {-f,--filter}'[Filter mode. Do not start interactive finder.]' \ + '--print-query[Print query as the first line.]' \ + '--expect[Comma-separated list of keys that can be used to complete fzf in addition to …]' \ + '--read0[Read input delimited by ASCII NUL characters instead of newline characters.]' \ + '--print0[Print output delimited by ASCII NUL characters instead of newline characters.]' \ + '--no-clear[Do not clear finder interface on exit.]' \ + '--sync[Synchronous search for multi-staged filtering.]' \ + '--version[Display version information and exit.]' \ + '-2[.]' diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/completions/_nl b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/fc/fc6c981c59123f219de90b451160c9b9e1d7781e.svn-base similarity index 100% rename from NICHOLAS85/.zinit/plugins/_local---config-files/completions/_nl rename to NICHOLAS85/.zinit/snippets/config/.svn/pristine/fc/fc6c981c59123f219de90b451160c9b9e1d7781e.svn-base diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/fc/fcfa8c96815582784e1e5dd4a5d04611f2370324.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/fc/fcfa8c96815582784e1e5dd4a5d04611f2370324.svn-base new file mode 100644 index 0000000..11cedaa --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/fc/fcfa8c96815582784e1e5dd4a5d04611f2370324.svn-base @@ -0,0 +1,33 @@ +--- zdharma---history-search-multi-word/history-search-multi-word 2020-11-05 23:01:31.568455761 -0500 ++++ zdharma---history-search-multi-word/history-search-multi-word-patch 2020-11-05 23:01:18.603608347 -0500 +@@ -169,7 +169,11 @@ + # Colorify + # + +- local preamble=$'\n'"Ctrl-K – context, Ctrl-J – bump. Entry #$__hsmw_hcw_index of $max_index"$'\n' ++ local history_type="" ++ if (( ${+_per_directory_history_is_global} )); then ++ history_type=", Ctrl-G – ${${_per_directory_history_is_global/false/global}/true/local}" ++ fi ++ local preamble=$'\n'"Ctrl-K – context, Ctrl-J – bump$history_type. Entry #$__hsmw_hcw_index of $max_index"$'\n' + integer offset=${#preamble}+${#BUFFER} + POSTDISPLAY="$preamble$text" + +@@ -408,7 +412,7 @@ + trap '(( __hsmw_recedit_trap_executed == 0 )) && zle && { __hsmw_recedit_trap_executed=1; zle .send-break; }' INT + + if zle .recursive-edit -K hsmw; then +- trap '' INT ++ trap - INT + + if [[ "$__hsmw_hcw_index" -gt "0" ]]; then + if (( __hsmw_ctx )); then +@@ -427,7 +431,7 @@ + unset __hsmw_conc + fi + else +- trap '' INT ++ trap - INT + (( __hsmw_conc )) && BUFFER="" + unset __hsmw_conc + fi diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/wc.db b/NICHOLAS85/.zinit/snippets/config/.svn/wc.db new file mode 100644 index 0000000000000000000000000000000000000000..7e48852faa648154efa545afc083621fdc4c0b65 GIT binary patch literal 151552 zcmeI53w#{Mec$f@91aKI?)0KSkdkl|ND(Izz`keKG9^JIB*EfC;={5m_;Z<=oh8o1 z%Xddol-=5d(tHxfA3IOitsBQq>Nss z8mEb!w!gW(yWInp;DMA~Q=a2v?{;TqXTI~F$N&GI**){j@oGbqg0a9>emo-s7r!d6?+Fh{LDe}$KoL*` z6ahs*5l{pa0YyL&Py`eKML-ew`Vbf|=89KoR&RA#gH1kb3UiQlqh6f7R^l`D$b7BAelBE3+pTjy`$n_}m%Sp7qxnL3LTw zeM2{?%dBbB_q1ut(}HP6s5Q-nO&IYRVL>pAa;1x(P2sQlC<2OrBA^H;0*Zhlpa>`e zihv@Z2q*%Iz%50f-2YszHyeTU|MyG%|1XMvsB8eYR3)p-DgugtBA^H;0*Zhlpa>`e zihv@Z2z<*EDD?O5OFw(+^i!2*&dr~jC%L}<@!YdVPoFw&fjKoL*`6ahs*5l{pa0YyL&Py`eKML-d_

9KoL*`ZXE*s>HbtIT>t;IRPk%KPR3PE6#+#+5l{pa0YyL&Py`eKML-cy1QY>9 zpmzfO{i&SN|9j`9LMj4^fFhs>C<2OrBA^H;0*Zhlpa>`ew;}`eihv@Z2q*%IfFhs>C<2PW^$1KpDEkVK3Mo?L%%)v&xc+;`o0k_`=iD8=082MJevuNul_YJ(3CzdyG+^dlpK`GM?ko{U~7E@h7ljuff|r|=tv{@iD-mnU^y z5l{pafmbR4qraNoUtgm7e#V$*8YT%upa&Xr87De-NMJGBz*k#%+_Y?B*-;eB(R{&N zZup)c!X}0rxWsZzOW-Hds3)lI3!PX|6wS5-L0IY;n(Yvc1c7Z*=5UQM*VPC&0;(H2 zGovVi85)&&G6*tZ5l#4x#hKwT#&yOmQ+Ex`wE`oG!UVHj!xFaUGwNu_KQnz|GFvA? zcLmXnfa!*ZJ9Ub$GlvMxaBU`BhH{z?O6R%Am~IKn;DTy8bvP31M6qqhunnDZLR{Al zm}NMDa6Q{Gb)V^k>I^(M31*`x)b=dqQ50G?I1fz1g{Lux*$y}Kz_*3TO=>v)OcX`P z@-pzWh;N$Aa9F?$pIR=8=UTSSO+7%R7}K#RG~llAC<-qOj~kZbbJx>7Y7mhXCuxRmH1tZB@%1DlblC<+Q-v_dIUJdA1AJw+ZF-vF*pME`Q9w1O5#rn*Md2u==KGrN zI>K@U!gJ0A(@`Xcao>bkI#!_B`=Tg%U~}I$Y%~!TpzhI#Jy*9;E@rxpYikUJS&ps;=zTQPuqL7?F6!73F4b%gku(z$&xMT&WCr!Q zp>gU{TNC&~QB*vE_=qwnGg~pr$+#Q0Dsn zcofBfIC#`_d<(T=a%vl>Y&-BFLBb4NB~3rwMNPot=DLAgZ( zVRM%wQ_R)$u_%h+5kNu@X8RN!G8&3yp^FxdD_gaz3&Rlsap>Jq6iXM(FxPfU?idDIV_*~RVXz_u!&)&G1ue@(-w)}~iAF7f zzTf7KF2M?qp;5aaXY)c7#UlYmxBw-0P#+EokFQ$bL9k@ENig7`m(q=VEDFR+w`@5k zn8awNi{Zm34!R2rnvSnwJoYSaG>U>&BrF8NsO#GpU1iTnC?ja|7(IZv+4zJx5=9BP z!_lR1G=0Mi4BhkPSZUe1?r2ZPOg`GiiV>}u`pfX3`J2OU%q3?QH5hlg|!w4f7^GZE4*Ej{{m^Ar~K2*HR$F^xgz*VO;Bds6woFMf9TsnHLP z?k}DjE)CU+ZyWj4&=a})Mt*eUZ-?$F{EMN#$}J3kApe^~KQw%4_}4~X%s-P|&;4qy zk)6*!Fmiw4{}vxCOcnm&=%;f(T>Mv~UmZCy^vfeJWZ#?n>(NvB4;9Yj-;(`g_Ad&b z8U7pGN_`XoML-cy1Qda9Vge8LKbPLW;@hSDP~S9-Kx2Voi#d^NTNL&K%+YOFK^zzb zqM$Hj2qVDs6&ku@VmbuX$<#2z!IZ!em?cF)2@D;WGntquKugu-%pQ|8J;2K^pK zC@6z*!EiNs8a5&*?U+*|eN4FIWZX54C@2!p9ZCf31j2?=h*=BF2{0Ad+zuSvCl(ax z;5M!n2&k!s3rhl~1Ww>uS~F8x6x4#Ep+muiF~c!6%@UYeN&^RhehD)AY!npA9Mx@V zm^vev{z5~?oK32=-0?Km^k$-jCDn%php99nQpfUPm0+&!pk&^mC@889h8KilP~m`q zb11P;5rtsFGhOe&D5wc*11wT7Xh35Y7UK8}HU}7Ckl%p%+D|r!aGt6^eSc3}1&)3^TWbQBVeRn+g38GULJif&w;` zN+}D%r>=M)3W~|J5m*`~mOu`Z2uv23W@1_@t&5h!4n#pYj0PTTZ!kPyb`KK|>>aKH zRT?U?2~B=~6con209HKc=7x(}m=|E?awemo8sjjP=musDkhbB zX!e*OqipQ{D5zuWQd5xa2|A3_zaRjpd&`1~0GrajD5z~f6GM@h3tge9%(^0gS_ex4 zELe_Sih`nb;C`?<*fva49O=Rc<2%s&phQ6#n}~u2uyEQgh2o9+flUSGSePX|8@2|f zfx~@KP**@pHDOUfU1G)#)ehPqEH{V&!ynV`jeXudFELMMjN0%Er( z3JRfsX#ouZreG1EaruHsm6jS7s?Vb1QBV^lhh>+-fEU0_fzAlRM@^{4Fo1EQ?T&)# zFdIRkhS>^+9@vR24+beT8>nBxgvn?u3d(($eq@gWYqkwZfZi>9hzfK|m?|vo?kK1O zqnTyH0t6GK0pkZF5OFl`!1Z8P(4AdTP@SM|q`?HXGLQJeMCoBNkQJo~(7G!M${_S+ z;3FBG!%TwA5(jlHO9lfKG4G58MLUGTM9`3>k=XJA6b_b1*N3&m;`$v?P?re~bFc{s zg=ABx_GsErrXl1YpgXrmL1C}ak%oX436rP>`?POprir!#6CX^=w?#pPuEXF1Ycr%7 zmSmKf>M+p2fP$R(nq7>7q79kS@M%~cI!q|vux%3!x}@vD*6EprD5wo98QQc1sddp< z4O2rqmpL$Db43HsM?o>bK|S_>%0ZV1BZP@A#%2bGjmoq%G8zSiS`D01VV4a7+2Jr4 zQG^N5dVQUaL_uM)@L`h+U`BEs^aHTC!ScofB28Dw-Eb5X1%-tIMTId5;sGNoB`%}@ zWugvDc)2L3<->BM!H|u*L|5o?+jL@TX9W@EBe!3;~)eE&jU0gTYu(8%1GAh7(7?nvDJ(7E#zCISL5_ zVkQa-n=OS^8#T+&RTvmQ;DmuG8fLEmrh9833TnWkfx@DFqo3n}0hw+(f6!-|(!|>z z1!Z=Cq11Gx4M(;c2#KsN4)ZunoJ91==l_Ru7Z?{j^wHAPDPRbLMUn*YUm!({$gm#d zF$2pCzdlv?yZqPkL!-O#ReclzML-cy1QY>9KoL*`6oDHc@X|w>+jHh*JLY%n$2Y#V zvc4=D)wR|7Y=tjZ&o4D%r>3SZuKTnhN>fwyi|mr9)e*3?)M%{NUo|^>zS>y2$Yv0J z_T<9RCr=%pJLB53{#qlbE{l4pmzQ0a8nuh77iMQ(tgcoYv-Q>L`nqV;XZhM{P(6>s zmdusRlBHQCd53c8n<`UIn5ix<9KoL*`6ahuxrU>jF$eHN`i(IC8 zA;F3@uxB7g(wz%&V^9CYKyI#cX{$M;@BV?@LarS(*;o+j|Ho3rW5sIm?Zw|Ne)y(} zry?r?ihv@Z2q*%IfFhs>C<2OrBA^H;06v#lA!lLh;SXnzY{KTv4C9vpOTAv)JG9e1QY>9KoL*`6ahs* z5l{pa0YyL&Py}AF1f>68>Hn|T>Qx0(1QY>9KoL*`6ahs*5l{pa0YyL&Pz0I;+W!CI zZ{~kJ`cv3b*pvU>@Q(te2q*%IfFhs>C<2OrBA^H;0*Zhl@O2{4w|3(R_n9{ySH*m# z5SZz`AX5KN7ymYezv`n1C<2OrBA^H;0*Zhlpa>`eihv@Z2q*%tGy<9QKrWyDzjFP5 zy7<);{;H26pa>`eihv@Z2q*%IfFhs>C<2OrBA^Jo@(2vT0FcX|Tm!{Fk)=CO{A%$l z#lHxDyz+{xN~8!V0*Zhlpa>`eihv@Z2q*%IfFhs>e9I8H{}B{*-vRtr8pD4Rx#8m9 zrHtWEq((kg{FCDE7Js$)Q^g-FUMg1bKEOl8I|^Sbe7W!|g%20rRd{QG7v>9x3wPxI zI{&5oujW6He`o$mzLI|=ujlU^{@vkEjNCc=mC>(_erfb$qwg9Oqfd^!XQVdr%*gEM z!O`K7zaRO%kzf3lp{xq32q*%IfFhs>C<2OrBJlMiuqT5TYPa93H5+@OR^OB3xHOb> z>4|$Xc&B!BCH|7FzK8eXVk}zx;*otBym7k|G2zu)F5dGs7scKhf*i=?7Gg;xzLl%b z!8^qkV#y?ivIjG{{80KSAh3thjU}-n>a***c42ybt=^cC_r5oid#H2CUt3;Zs;+jf z9v;o)#@knCz{HE)5s`&oZOk-ZAGWZyRDQL_ukd9N26(JHc5P+4QKR*x@Z!O8CU+)E zdR^3}5nJ%aTJ6g8QnfCRVaU1ZOz!z8Wb4{=UCt(~h6196fdX)af(f)qQ!q zTdfo6H4~ZKBSY!n;wo=c*H-JZFIHs^s;kvTC7|`jeW3_O*Do(s`I6*%?_HT(IUciq z(Oy{jdV@AD*7xkn4(n-e}kQoyAOUB9`Ptm=a%G4XWqE=rilf7tdE$r8J)mQ;O=iJ}YXq%K7s( zv0mJIt=j zD6RRqggZk9hwjVdjtr%{V)$29DeiNbE-z;j669;kYqjP2U|2g{G5K=!{8Hoi?RX1e zSDGh6xTojmj-8mFS@HWr(LKI!bpGU-`95^XgQ?UoHvSvA2U5eV_{YUB6hB!Q%>VW1 z%<#W1zQ1^-coH^%fx_<5!WyK9-fqewk8t~ zbfkd+4$IwY?XtMg^HQ?XK;zIMSQy&ApCL|n0slIm#K2N49-)49_5 zGTW_dqZ%jBeRM8&zRc2?)_ohQu}kenS@TH#T6#C`K8aLgT4(HQOb6dST%?bqz>|>0 zSR%2nvrXL`y~QMICw4yeb+!UM9gTGo)MBS&UuP?!&VHRhq5h7loJ7wQiyr$rTWRa^ z*U7ci>(OQ>yA}Jcl;S%6b#B_$_fesfXgINCVqa$~E#3bP)ZZrMzg5SP_TOr|G4(%- zVY2D}FT5vJ{44nXKUe&8@mGrfsrc`UA1!{k_+!N%F21MuQt>Uti^bLA`Qo<~pDUg& zK82M5M~Y7I?Zv6$p5mQ_|5Nzyh5uUkqr$Hj{$t@Mi~EYB#Z2LE3hyucd2zPznc^3V zUoL)c;g<^krtl%$M12$iML-cy1QY>9KoL*`6ahs*5l{paflUOmnOrKJ?t2nTTv9{n zCt5!r4u2kL{dB{hr1jGYf68Ssi1SoeeCYa<^S`ghrlp?78bGyik&Gkt%O`Nh6R(_cvaMrz02e5A2^QzfgP zihv@Z2q*%Iz_%=cjp1T;Y}c;zOP8@Sby*xgb@VCu@3x~b-JhK=ot=B^_RiskCtN?EDk+r%NYKoh_X_cl>zi^!(%Vr{_-|oj-%GPoFxoaQ4*c=Sovm zzkIk8u_l(`+gmD?&d$FM(OOaE_2o5wq0(5pAXcw+aqaS|sD&3h5#Wqi5vz?&XMHR( z?PO4fefspmi8*BEsd;3mU4+A}!nE>KM!0hEf2YblNy1gDkR3ZTncg^9UG>Ea3zfN} zXV1+YuRJ{m1ZP`6PM$h8Uui6P5FakB(;5m_ zX=P9rWal4nrOWLk%HRI#(d^jdWcoWFX;yaZrm?U2uBwk+Xi7jcZymawI*eEUvqw*# zLe;jbzAFm}wcB0Hs4n3;gGnv#a8A!dWcY zzEE8~A6=0tgUK7Q20S{+m+0zwv5fWL(Yc0r0c)MtVz+A4gs60K0ZF4#=uM~Fc}7;T zRJyr_xqfja3?9b?={$3G;pBX2svV};VwOeF*min)2KZ)jke)NpkyaQ;gfFTh-C-isD^GC|N7( zHBql)b$v(X<@tK`#i)zvGy-|0CIY^8QT9ojdq{aTp8L(WM*lNAJUDjr-fIDF7oeiI zzl~Ie&<%~JuV!0p(NUupntSZb({pE^4BKHYxd-YBDG|3@ZCLG;)n!jzeqk^>HjW!S z)dU=d3IES_!EMJz8RMe^GTP~R=gyrywQv%#PN0jFFuLy4qS5Ln!QxPMaO{!sYq1FL zSJA`c(6P+m*!aHm8(J7-{}T;DgRPvlg{#>+p~O)Lj0$UOjqX=urB(Cb3p4sf#yV6sufp`Z>_WaMQ&ptjHIK5wm=CPdYoc zZ(sWATbpS{cZ|OEb)^)YZwfnVq%DlwR)~bqT@UScA*)LkEOlKBt)Kc2bT_tOZX zK8nDN5qPRJICkJb`uVN~iPcehyTQrt_jNU(_?4*!TRvR%UpOo`^OUdFC$eMaMEa$D zt-c0xkonUm=df1o*!<%d#xcQbow&D^_s{!JF`EuxEuKRBB*o?+_L4~ z$fqlj@=LG1H#;^lk^YW1Hz9U%+xfD$3t#8-H*m_hX%xOeJw=Z8vZLPA(MgJ!LvHT> zLmWVAgqF)K=GgQLkKFm-<&{ zj#i0ZYzxWhg(sx$xNU^e+~a6RrE^aolX~c>$4i|l8=6ZqX6e}{=TDYS&ObZTxwLSm zDF&yGAB)aCHvh!JNnmNEv|hs$zq%?)XXejFv$Z49*Fz;8p^^6K`RJZUy6*GP4w9Qr zPA;Cshf4D&k6nFsZ+5ReHiWrs94A(J3*d~OOQhHxt_APd{PB4SuM1fG&ZQQxrUt)L zP`#IIPg2RMt97V%*DqOjxK_y)u!r#U*-a%&5``NoSx+K>I^*NnUHkS8UEOu5DlSXK z=S=0Xxij<8w^miXc47Wm2xj|wY3>XJ=nN|7=-JYPrN>X7I?2Rr2%&XC{Wo5a#3M(nCofk19RcN^KF|$Z0 zWBX!g6P2wk2B3WrHk_q3*jA%r;qeKp^<|9Xex=LQAt5Z|$pX?SR%ujMy7Bn*QiW3# zEHc>1J@^$^(J(up%Uw6Gt^zMCNPb1airM(CJ8g-HKeAJvzH@MFZtu04z_Ujy(t0f| z1_%4Z~Wrh8lFc?fd> z2$sbqu?z-nHND*~O3*3h&K*Bnn${)yYom$X1*W?4Ke#snP3)`$H6_Po^SZo4tHPQ_9L z6ahs*5l{pa0YyL&Py`eKML-cy1QdZ=gTS!Nrqcg!jmlEFR0I?OML-cy1QY>9KoL*` z6ahs*5l{qfkbu(vZxEb{rU)nkihv@Z2q*%IfFhs>C<2OrBA^J|LImXc|6HMx!ju0$ zRNN>&S=>|j^TNjq@4zYbQ3MnLML-cy1QY>9KoL*`6ahs*5l{qrC2%M=Fkw!19$mCh z>3nTJdrQ}}lKf|ubYo~>Vt%3%qV)){==qkND;2#ROP|RO?46rvJttsGjMn*B_^H8x zT@Ovjt?yd`hr8lCDId-ZOdcx79;3PGp|P%pTsQyIQ37{hU~*wH7J5tav1=7Q7J0IN zVC>+*=0iUgD$PTs`9PIekdl6|Z(yuE-4!T&%1JDgRx(QZOnPAKNSNA|9E6F-?v3#I z{?DccQ!}Z-yE7ww?@PZvHB)%A{4;8g+@1ShL%)#yzN~!SRO_=*9vaV04^8II_l>7g zyKYNWQ+nuAXI`wXRvWYR)$01XXw+xJw@u=(vW_P# z;VE17*$U#Ne_(a3wnCTXgDa-W`|C?o-yi7Iaa=;EE)44FhVB|}U=mvoh$ko|nyI-~ zpo{cNsm#w*f9gyBIJH{kOKW&ghHDr866fCd^q1c8r&IMytFOAuUsa_L=>akHY-$$ojGzi&LZ7bwof zQJ|lHZ7S7zf$X**T49nfcouqc&J4kr3kVcF5Hl=7g+)C=EJskAn}j5G_t++`u5lgtfV+I~E zxNbR?WoeGBnI55m#hK4cW^qCsmN>aj@9AMC;=a6-`&Lop`*BY6i1_-!^4SMcBk4O* zLyLt^81^Dr_8z{CxO#2UYNqy zJRMdvO$wOd8%Ds1$u-@j!Vft00>+Y>XZopL$T=?`xvtW{o_6PWjsV}A;`ktKwJv0`!+OI^lh=p+-&81Z7sMle?c>5qNFj5m?liz+;SNvbiQc| zLLK-I45|@ZljDTx3MZ+N4t^mNweR`u?FP}C?%uW{kW)K!WZ&q|1}Vy3VKS*#h-XsN zYL)Zn@ih3@$!!OsSh(3vA0Cz3NAU$<;8Fkm$`gvU77DeyVI z={UgYYw(PDmX|~>{poKwx=vZj8|8d&uEh0~l^ddlcuByB=Lrjlbi?y)o0x*Ykw_T{ z&|5HySt6{{go(raE@xbVK?hqQNh!5KkvtW~$tuEgXs@3HrQUQ0k z2MxrA!_^E7-SdT~G0WC{Gsgb^;sqCS`7xGs|7f0OT%+SY&PG@J-e(Lm@oeS8es7WHmO-g;t=&3<5&lkQc zG|#7&C%8c=rep?YXTtXr8)*Megd+BbzqCyQb#K~uat#pWjneM%Tp7j_9`EO1Jn`ek zlM8rf(@w1>GENdKYTBl4Y23C0<}lY|K8$r%z?oxc@K-QQ`k7-gJE=FD3|Vb!2qrhZ za;sC)Sy_hi`o!*N1UyN7Ei&Z)J$V4guUY^ytO>dc*-4wl@x%di29nK`r^RZ40=0Q(*4!5z? z4hs`?3mzrz`V5n0VYo?U=>Kq7SD!nuom}7aWVuu7&Ep?mg9*4Rsi2m0+;$oFW_EAyM3o5<&Ay!ByPR=8jnOzAyqa%i9dG-)Qo*~3EAl0C z(&Kn>$DW{TrIRFShDS`_;V{YjSXwO%0q1z22Usdh;TVU;Z#b~kIW&o6&;v>DWgK>{ zRj%^J{&8tDnMkskbOdg8h1W0DIzM}Cq0LB1;4EEWXvW%L49q%%9l#YZXIeHz$3{)) zCe$^qWid%#?tvV683%!8DWLyfNsXjVrwX6Ud~j%J16&{tA7sKO*<@nt7bdTBuvr0Dz z1R)Ib&h)!dnU8+zt;bG(JlY?y&6s0U3tp#DrQWx0Ue3h)K9L*iV^m!?$7>jM%PA z;M0S!>z?Du#k>QmKuBi2RGwbedIHr_YO(Y5Ah`oeO(%3h8%j-5O)qT*FobFYr9a zlKnF$f%H%llV}z!v``y3w;VJ54)ia7dh(9fzpW?H_pZBk$#Z(Ei{zq|vwHe)T>RDd zYZKV;4okItJV|YDEQu8u*!;ES^(Bbh`dYm)191*dZ`<6j5i_a5+lHVH_ibz#(oIWH zX2Tt)`G&Bi_8u@?6rK?zE_pbR4F|Tbh;4e>o7dW}QJV5eXLoL4`^KNxTCdgf=3brp z+_h`!mc6o}Ps_!ax~^Tg0r~2RmLyz0Hu6a?oX;uKnCDvgSgu=Bm`mJleF$yX$S4RTPf z+1}f|W*gQxtl4gBHMN!LMvc~&c0L*Jj@fP$aqBNZhft=sYDmux3vD9h*nJ(zlLs`w+t`NIDwd{^O6{@3$s`P)Z- zX7t?1-;Df|kyj6Yaro-+WbTu>rQFESM~0rx{#EwfS$FVv2H!GxU*_W(mKhlMv4JQ1 z|G57h{WE=^?t4?;o#~%VKb!hnBzkk7#RmuRc!At=;UfTg?t*`4|B7#y_FGti0q-v{ z80@B6fTiH@Yr-Zk1QVX=dW+?F>b+`FecuzNZeo_grESrInk6jU#%GwTU})f2%SQdh zDVh3EEANaFEYfl`n|Qvd8K!SoKD;@^r3C(JreW4&2R0-7f4`k~Y6fuZxOnaX>>6;C zSm6z)cf1D+VkA+o(Ec)r;ZU=nyxVi zo)%Q4Fg0CA4t4He_b^-BFEigxzE{2FKsHRBYgpN2A+tJ`>gcE+E;QGHPZDk%6aMhU z$u2a8;d*kT5VuUzMo?xOSOgAdxo4w#5zB(?2{-*hn7V-_j=BLw9kl|lIx`GUciq6{ z9xSUiaTf27r;bZ-CuwlQyO;>$D?_(}GCQ`(3?f)SH8=o>)BpZ3b&YY{RX1p$!+Pr* zI)lpzo6O-e^ia2KabKKFuRYelg)nu;*5x`TM{cChG`WtO!D*vG#;|S<;+ikSl;K!g$uTgw!)En(DNNs z6;@7KHeb9iPNwH2B%cpc4{U+zrtmVLd7`8y2?EFUY?vFF1{qkqH=cU0ODu-o8>a3G z>|!xdUbKEV7%{3~g**fSH-WX2X^Z#7$xsu-P)l+NV_+IC1i``P7ori!0aiX5r~nv; zM1MX^9etxK)3u@A8(8GWu&ao12L>ec59mD>_r~+ytM9)5Ct9fsX2Klna)>&50MEcf zNGv8O9)mzkEY4Zn6HmQY4{HC1!_-acdoD7o;lU;xk5BNhX(jM&c*x;UgpFcxJf3>5 zZpPF{!qm}O!Hq<)`N}dxparfkh}^P34GWFeqKmuZsrTxe8~pxO-XSX<9tMGKJ3!}% zZVFv5HL+_1Jqah;^J7Ro-R{M(8>}bK*5hH~I$8mCr(iaMMLbvzWqD|d82_-HQJ7d6 z_59uO#Cvu21YzRb$50TUFSpPgp|8QV7vZD-!g?#Xg)D7xSDZ`F4w1`Y>JEB3%ZAXx zmTACc#|Q=y^s#~KVLzPiJbza_>%A_IXmv6=L9>*OLCnlN;tLbPf~{e)jcNk&`23ym z#CzR@_h^`NhGEDId}LMU@RWf%anLcyO2sNFVlLhh=hE|LwNJEC$C!-=XAn#+bePsH zFF?g&2zGt==q#>3e|tRZz3%L44XG{@oCPQV$E3lhSXqL(1{OkN2!Xul&f;zHtoOY8 z>8UX5a3$)c5`cWoUM$G0x2Iv4m%HeU(EVd<*Qh1nC$hPNab6eAmGe;LEsO{IUl*p1k<*mM zD8uqxioGQ8Ct-^M7m!BSLp}5Pd_3#D?qRqRCT?T#6YlJwdv`GpFiZ`z4hhD@L<`f6 z#nCu*uh(V%pAJ*Uv&rE0@*s>3roosFnwW~&%;2z9n3hHsN8+jXx+XsN_Aqrkj0-X@ zx6{aR379xmDN!UFp#FTFE)K_2?{yt{|5sYrb<4*ZumH=QTn7^wES|w48Xgeog$B08 zTs-w&mtFV$ax3qcSPKH#K(C4p3v)C|Ty!$1QR-j;&*D&5>OF2F8vH_-y5(aBss_ z!FcMuJ~XZHmn||Hyhl(10_51WkvD7`FYznOeJpse?$be#I$R)sNR9XN_owe96 zQ}1*HF4NrrdIQ=r=7V^eAe_Tky+tr{=6DJdqflrdd4uyp3w!wb^N2Sb>1H&3&CLVsnY@G-lZa?^n;M()(f!BtqBbzXA z5rL&B!iKVl1^HNSi`6JLx1~vTQH!UpGdMe81%hQ6NKr}$H35eV^j%B9x+*A^@jBc| zf3lT2atmXZ3tuT5Ooof~Em+Iz1g@nuX)Vsi$=J4o>V|s~b`2NX(_l*pU@@@e>Mhv# z;MJ6lEfVy%%q|ud$Uq&3(TF;xrdcqJT5^pxfiDNLq%Y3IQ>Qi@SFpAPcuWJT2zGe+ z=m7|s!(lP^ZTQpSb#nZH!(rax>Y%z!4O54wM>^a+tk;p=cMdP1YkG^*@zh}e^c@D_ zgZa@!S>dB%1~wtWktA&$c>XXf=eA*FPKT-Ei6n5f0SzPyUIEwwv7#UDF92)$z!nd8 zrQYLO^nNW&-S&AP{bayq5*PBw!O_mq((CDOBLRmKRTMtJ~I4$!=D>^bTqvJlXviPi!v2V?1N&%~tqw_54yJcBwGbtkn`qJGJHa!+M9%`z2XkrwiAa%FXxTp$_pXyluO>OTW9i+G;y^dO-Yn4hi)(RX+OU?wq;phMic;xYjP6 zjp>Di1;MD**n(iW^j|*CVCPMy$StAy?p-Pyg=qCT zcJIr0f;XQU-g>(3&LwY~WRh_9sz>h-r+3|L=)LZX-lja|4fg1s-1Cy_u1#EbM_fD4 yQWvzwm!?-PE;p*vm)C0k&e>iksU*I=S`v21SJ$pL3gdNT+jrsZQTRHAD*rz>HC;Ub literal 0 HcmV?d00001 diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/wc.db-journal b/NICHOLAS85/.zinit/snippets/config/.svn/wc.db-journal new file mode 100644 index 0000000..e69de29 diff --git a/NICHOLAS85/.zinit/snippets/config/LICENSE b/NICHOLAS85/.zinit/snippets/config/LICENSE new file mode 100644 index 0000000..396d783 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/LICENSE @@ -0,0 +1,22 @@ +This software is licensed under MIT. + +MIT License +----------- + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/NICHOLAS85/.zinit/snippets/config/README.md b/NICHOLAS85/.zinit/snippets/config/README.md new file mode 100644 index 0000000..b2a5f6a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/README.md @@ -0,0 +1 @@ +# config-files diff --git a/NICHOLAS85/.zinit/snippets/config/completions/_colorls b/NICHOLAS85/.zinit/snippets/config/completions/_colorls new file mode 100644 index 0000000..aa8b6b6 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/_colorls @@ -0,0 +1,37 @@ +#compdef colorls + +# zsh completions for 'colorls' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-a,--all}'[do not ignore entries starting with .]' + {-A,--almost-all}'[do not list . and ..]' + {-d,--dirs}'[show only directories]' + {-f,--files}'[show only files]' + {--gs,--git-status}'[show git status for each file]' + '--report[show brief report]' + '--format[use format: accross (-x), horizontal (-x), long (-l), single-column (-1)]' + '-1[list one file per line]' + {-l,--long}'[use a long listing format]' + '-x[list entries by lines instead of by columns]' + '--tree[shows tree view of the directory]' + {--sd,--sort-dirs,--group-directories-first}'[sort directories first]' + {--sf,--sort-files}'[sort files first]' + '-t[sort by modification time, newest first]' + '-U[do not sort; list entries in directory order]' + '-S[sort by file size, largest first]' + '-X[sort by file extension]' + '--sort[sort by WORD instead of name: none, size (-S), time (-t), extension (-X)]' + {-r,--reverse}'[reverse order while sorting]' + {-h,--human-readable}'[]' + '--color[colorize the output: auto, always (default if omitted), never]' + '--light[use light color scheme]' + '--dark[use dark color scheme]' + '--hyperlink[]' + '--help[prints this help]' + '--version[show version]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/snippets/config/completions/_dynamicwall b/NICHOLAS85/.zinit/snippets/config/completions/_dynamicwall new file mode 100644 index 0000000..05520c8 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/_dynamicwall @@ -0,0 +1,17 @@ +#compdef dynamicwall + +# zsh completions for 'dynamicwall' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-f,--force}'[update wallpaper immediately, optionally to a specific time]' + {-p,--preview}'[run a 24 hour preview for a certain theme]' + {-c,--config}'[edit your config file using your default editor]' + {-s,--status}'[display systemd service status/crontab and system-sleep script log]' + {-l,--list}'[list available themes to choose from]' + {-h,--help}'[show help]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/snippets/config/completions/_fzf b/NICHOLAS85/.zinit/snippets/config/completions/_fzf new file mode 100644 index 0000000..31f0ab6 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/_fzf @@ -0,0 +1,61 @@ +#compdef fzf + +_arguments \ + '*:file:_files' \ + {-x,--extended}'[Extended-search mode. Since 0. 10. 9, this is enabled by default.]' \ + {-e,--exact}'[Enable exact-match.]' \ + '-i[Case-insensitive match (default: smart-case match).]' \ + '--literal[Do not normalize latin script letters for matching.]' \ + '--algo[Fuzzy matching algorithm (default: v2) .]' \ + {-n,--nth}'[Comma-separated list of field index expressions for limiting search scope.]' \ + '--with-nth[Transform the presentation of each line using field index expressions.]' \ + {-d,--delimiter}'[Field delimiter regex for --nth and --with-nth (default: AWK-style).]' \ + '--phony[Do not perform search.]' \ + '--no-sort[Do not sort the result.]' \ + '--tac[Reverse the order of the input . RS e. g.]' \ + '--tiebreak[Comma-separated list of sort criteria to apply when the scores are tied. br .]' \ + {-m,--multi}'[Enable multi-select with tab/shift-tab.]' \ + '--no-multi[Disable multi-select.]' \ + '--no-mouse[Disable mouse.]' \ + '--bind[Comma-separated list of custom key bindings.]' \ + '--cycle[Enable cyclic scroll.]' \ + '--keep-right[Keep the right end of the line visible when it'"'"'s too long.]' \ + '--no-hscroll[Disable horizontal scroll.]' \ + '--hscroll-off[Number of screen columns to keep to the right of the highlighted substring (d…]' \ + '--filepath-word[Make word-wise movements and actions respect path separators.]' \ + '--jump-labels[Label characters for jump and jump-accept . SS Layout.]' \ + '--height[Display fzf window below the cursor with the given height instead of using th…]' \ + '--min-height[Minimum height when --height is given in percent (default: 10).]' \ + '--layout[Choose the layout (default: default) .]' \ + '--reverse[A synonym for --layout=reverse.]' \ + '--border[Draw border around the finder .]' \ + '--no-unicode[Use ASCII characters instead of Unicode box drawing characters to draw border.]' \ + '--margin[Comma-separated expression for margins around the finder. br . br .]' \ + '--info[Determines the display style of finder info.]' \ + '--no-info[A synonym for --info=hidden.]' \ + '--prompt[Input prompt (default: '"'"'> '"'"').]' \ + '--pointer[Pointer to the current line (default: '"'"'>'"'"').]' \ + '--marker[Multi-select marker (default: '"'"'>'"'"').]' \ + '--header[The given string will be printed as the sticky header.]' \ + '--header-lines[The first N lines of the input are treated as the sticky header.]' \ + '--ansi[Enable processing of ANSI color codes.]' \ + '--tabstop[Number of spaces for a tab character (default: 8).]' \ + '--color[Color configuration.]' \ + '--no-bold[Do not use bold text.]' \ + '--black[Use black background . SS History.]' \ + '--history[Load search history from the specified file and update the file on completion.]' \ + '--history-size[Maximum number of entries in the history file (default: 1000).]' \ + '--preview[Execute the given command for the current line and display the result on the …]' \ + '--preview-window[RS POSITION: (default: right) up down left right .]' \ + {-q,--query}'[Start the finder with the given query.]' \ + {-1,--select-1}'[Automatically select the only match.]' \ + {-0,--exit-0}'[Exit immediately when there'"'"'s no match.]' \ + {-f,--filter}'[Filter mode. Do not start interactive finder.]' \ + '--print-query[Print query as the first line.]' \ + '--expect[Comma-separated list of keys that can be used to complete fzf in addition to …]' \ + '--read0[Read input delimited by ASCII NUL characters instead of newline characters.]' \ + '--print0[Print output delimited by ASCII NUL characters instead of newline characters.]' \ + '--no-clear[Do not clear finder interface on exit.]' \ + '--sync[Synchronous search for multi-staged filtering.]' \ + '--version[Display version information and exit.]' \ + '-2[.]' diff --git a/NICHOLAS85/.zinit/snippets/config/completions/_gebaard b/NICHOLAS85/.zinit/snippets/config/completions/_gebaard new file mode 100644 index 0000000..8bb57e7 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/_gebaard @@ -0,0 +1,13 @@ +#compdef gebaard + +# zsh completions for 'gebaard' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-b,--background}'[daemonize]' + {-h,--help}'[prints this help text]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/snippets/config/completions/_groff b/NICHOLAS85/.zinit/snippets/config/completions/_groff new file mode 100644 index 0000000..d5fe52b --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/_groff @@ -0,0 +1,53 @@ +#compdef groff + +# zsh completions for 'groff' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + '-h[print this message]' + '-v[print version number]' + '-e[preprocess with eqn]' + '-g[preprocess with grn]' + '-j[preprocess with chem]' + '-k[preprocess with preconv]' + '-p[preprocess with pic]' + '-s[preprocess with soelim]' + '-t[preprocess with tbl]' + '-G[preprocess with grap]' + '-J[preprocess with gideal]' + '-R[preprocess with refer]' + '-a[produce ASCII description of output]' + '-b[print backtraces with errors or warnings]' + '-c[disable color output]' + '-dcs[define a string c as s]' + '-ffam[use fam as the default font family]' + '-i[read standard input after named input files]' + '-l[spool the output]' + '-mname[read macros tmac.name]' + '-nnum[number first page n]' + '-olist[output only pages in list]' + '-rcn[define a number register c as n]' + '-wname[enable warning name]' + '-z[suppress formatted output]' + '-C[enable compatibility mode]' + '-Darg[use arg as default input encoding. Implies -k]' + '-E[inhibit all errors]' + '-Fdir[search dir for device directories]' + '-Idir[search dir for soelim, troff, and grops. Implies -s]' + '-Karg[use arg as input encoding. Implies -k]' + '-Larg[pass arg to the spooler]' + '-Mdir[search dir for macro files]' + '-N[dont allow newlines within eqn delimiters]' + '-Parg[pass arg to the postprocessor]' + '-S[enable safer mode (the default)]' + '-Tdev[use device dev]' + '-U[enable unsafe mode]' + '-V[print commands on stdout instead of running them]' + '-Wname[inhibit warning name]' + '-X[use X11 previewer rather than usual postprocessor]' + '-Z[dont postprocess]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/snippets/config/completions/_micro b/NICHOLAS85/.zinit/snippets/config/completions/_micro new file mode 100644 index 0000000..3533353 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/_micro @@ -0,0 +1,23 @@ +#compdef micro + +# zsh completions for 'micro' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + '-clean[cleans the configuration directory]' + '-config-dir[specify a custom location for the configuration directory]' + '-options[show all option help]' + '-debug[enable debug mode (enables logging to ./log.txt)]' + '-version[show the version number and information]' + '-plugin[\[PLUGIN\]...]' + '-plugin[\[PLUGIN\]...]' + '-plugin[\[PLUGIN\]...]' + '-plugin[\[PLUGIN\]...]' + '-plugin[list installed plugins]' + '-plugin[list available plugins]' + '-option[set `option` to `value` for this session]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/snippets/config/completions/_nl b/NICHOLAS85/.zinit/snippets/config/completions/_nl new file mode 100644 index 0000000..7785f50 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/_nl @@ -0,0 +1,24 @@ +#compdef nl + +# zsh completions for 'nl' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-b,--body-numbering}'[use STYLE for numbering body lines]' + {-d,--section-delimiter}'[use CC for logical page delimiters]' + {-f,--footer-numbering}'[use STYLE for numbering footer lines]' + {-h,--header-numbering}'[use STYLE for numbering header lines]' + {-i,--line-increment}'[line number increment at each line]' + {-l,--join-blank-lines}'[group of NUMBER empty lines counted as one]' + {-n,--number-format}'[insert line numbers according to FORMAT]' + {-p,--no-renumber}'[do not reset line numbers for each section]' + {-s,--number-separator}'[add STRING after (possible) line number]' + {-v,--starting-line-number}'[first line number for each section]' + {-w,--number-width}'[use NUMBER columns for line numbers]' + '--help[display this help and exit]' + '--version[output version information and exit]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/snippets/config/completions/_pmm b/NICHOLAS85/.zinit/snippets/config/completions/_pmm new file mode 100644 index 0000000..2239c4a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/_pmm @@ -0,0 +1,48 @@ +#compdef pmm +# zsh tab completion for pmm +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# + +# zsh-ism: this file is effectively a function. +# shellcheck disable=SC2168 +local -a args +args=( + # Flags + '--assume-no:assume no at prompts' + '(-y --yes --assume-yes)'{-y,--yes,--assume-yes}'[assume yes at prompts]' + '(-q --quiet)'{-q,--quiet}'[lesson output verbosity]' + '(--strat --stratum)'{--strat,--stratum}'[restrict to ]' + '(--pm --package-manager)'{--pm,--package-manager}'[restrict to ]' + '--every:operate on every available instance of items' + '--newest:select newest corresponding versions of items' + '--oldest:select oldest corresponding versions of items' + '--approx-version:only consider items with a version prefixed by ' + '--exact-version:only consider items that are exactly ' + '--newer-or-equal:only consider items that are newer than or equal to ' + '--newer-than:only consider items that are newer than ' + '--older-or-equal:only consider items that are older than or equal to ' + '--older-than:only consider items that are older than ' + "--diff-world:print differences between /bedrock/etc/world and system's explicitly installed packages" + '--update-world-installed:populate /bedrock/etc/world with missing explicitly installed packages' + '--update-world-removed:remove /bedrock/etc/world items that do not correspond to explicitly installed packages' + "--update-world:sync /bedrock/etc/world to system's explicitly installed package list" + '--apply-world-installed:explicitly install /bedrock/etc/world items' + '--apply-world-removed:remove packages not in /bedrock/etc/world and resulting orphan packages' + "--apply-world:sync system's explicitly installed package list to /bedrock/etc/world and remove orphans" + '--check-pmm-configuration:sanity check pmm configuration' + '--list-pmm-ui-files:list expected front-end files with current user interface' + '(-h --help)'{-h,--help}'[print help message]' + # Stratum + #'(-)1:operations:_pmm_list_operations' + # Command to run from stratum + #'2:command:_strat_local_cmds' + # Parameters for command being run from specified stratum + #'*::parameters:_strat_local_params' +) + +# zsh-ism: we want it to expand here +# shellcheck disable=SC2128,SC2086 +_arguments ${args} diff --git a/NICHOLAS85/.zinit/snippets/config/completions/_tlp-stat b/NICHOLAS85/.zinit/snippets/config/completions/_tlp-stat new file mode 100644 index 0000000..979f031 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/_tlp-stat @@ -0,0 +1,18 @@ +#compdef tlp-stat + +# zsh completions for 'tlp-stat' +# automatically generated with http://github.com/RobSis/zsh-completion-generator +local arguments + +arguments=( + {-d,--disk}'[| -e | --pcie |]' + {-g,--graphics}'[| -p | --processor |]' + {-r,--rfkill}'[| -s | --system |]' + {-t,--temp}'[| -u | --usb |]' + {-w,--warn}'[| -v | --verbose |]' + {-P,--pev}'[| | --psup |]' + {-T,--trace}'[]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/NICHOLAS85/.zinit/snippets/config/completions/err_ggrep b/NICHOLAS85/.zinit/snippets/config/completions/err_ggrep new file mode 100644 index 0000000..ab0dc2b --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/completions/err_ggrep @@ -0,0 +1,2 @@ +No options found for ggrep. Was fetching from following invocation: `ggrep --help'. +Program reacted with exit code: 127. diff --git a/NICHOLAS85/.zinit/snippets/config/config-files.plugin.zsh b/NICHOLAS85/.zinit/snippets/config/config-files.plugin.zsh new file mode 100644 index 0000000..7af9867 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/config-files.plugin.zsh @@ -0,0 +1,226 @@ +#Let Atom highlight this: -*- shell-script -*- + +# According to the Zsh Plugin Standard: +# http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html + +0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" +0="${${(M)0:#/*}:-$PWD/$0}" + +# Then ${0:h} to get plugin's directory + +# Autoload personal functions +fpath=("${0:h}/functions" "${fpath[@]}") +autoload -Uz $fpath[1]/*(.:t) + +_zsh_autosuggest_strategy_dir_history(){ # Avoid Zinit picking this up as a completion + emulate -L zsh + if $_per_directory_history_is_global && [[ -r "$_per_directory_history_path" ]]; then + setopt EXTENDED_GLOB + local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" + local pattern="$prefix*" + if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then + pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)" + fi + [[ "${dir_history[(r)$pattern]}" != "$prefix" ]] && \ + typeset -g suggestion="${dir_history[(r)$pattern]}" + fi +} + +_zsh_autosuggest_strategy_custom_history () { + emulate -L zsh + setopt EXTENDED_GLOB + local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" + local pattern="$prefix*" + if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]] + then + pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)" + fi + [[ "${history[(r)$pattern]}" != "$prefix" ]] && \ + typeset -g suggestion="${history[(r)$pattern]}" +} + +! $isdolphin && add-zsh-hook chpwd chpwd_ls + +######################### +# Variables # +######################### + +[[ -z ${fpath[(re)/usr/share/zsh/site-functions]} && -d /usr/share/zsh/site-functions ]] && fpath=( "${fpath[@]}" /usr/share/zsh/site-functions ) +[[ -z ${path[(re)$HOME/bin]} && -d "$HOME/bin" ]] && path=( "$HOME/bin" "${path[@]}" ) +[[ -z ${path[(re)$HOME/.local/bin]} && -d "$HOME/.local/bin" ]] && path=( "$HOME/.local/bin" "${path[@]}" ) +ZINIT[ZCOMPDUMP_PATH]="${ZSH_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache/zinit}}/zcompdump-${HOST/.*/}-${ZSH_VERSION}" +pchf="${0:h}/patches" +thmf="${0:h}/themes" +GENCOMPL_FPATH="${0:h}/completions" +GENCOMP_DIR="${0:h}/completions" +ZSHZ_DATA="${ZPFX}/z" +AUTOENV_AUTH_FILE="${ZPFX}/autoenv_auth" +PER_DIRECTORY_HISTORY_BASE="${ZPFX}/per-directory-history" +export HISTFILE="${XDG_DATA_HOME}/zsh/history" +export CUSTOMIZEPKG_CONFIG="${HOME}/.config/customizepkg" +export WGETRC="${XDG_CONFIG_HOME}/wgetrc" +export LESSKEY="${XDG_CONFIG_HOME}/less/lesskey" +export LESSHISTFILE="${XDG_CACHE_HOME}/less/history" +export TMPPREFIX="${TMPDIR%/}/zsh" + +# Directory checked for locally built projects (plugin NICHOLAS85/updatelocal) +UPDATELOCAL_GITDIR="${HOME}/github/built" + +ZSH_AUTOSUGGEST_USE_ASYNC=true +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 +ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c100,)" # Do not consider 100 character entries +ZSH_AUTOSUGGEST_COMPLETION_IGNORE="[[:space:]]*" # Ignore leading whitespace +ZSH_AUTOSUGGEST_MANUAL_REBIND=set +ZSH_AUTOSUGGEST_STRATEGY=(dir_history custom_history completion) +HISTORY_SUBSTRING_SEARCH_FUZZY=set +AUTOPAIR_CTRL_BKSPC_WIDGET=".backward-kill-word" + +export GI_TEMPLATE="${ZPFX}/git-ignore-template" +export OPENCV_LOG_LEVEL=ERROR # Hide nonimportant errors for howdy +export rm_opts=(-I -v) +export EDITOR=micro +export SYSTEMD_EDITOR=${EDITOR} +export GIT_DISCOVERY_ACROSS_FILESYSTEM=true # etckeeper on bedrock + +FZF_DEFAULT_OPTS=" +--border +--height 80% +--extended +--ansi +--reverse +--cycle +--bind ctrl-s:toggle-sort +--bind 'alt-e:execute($EDITOR {} >/dev/tty /dev/null | head -200' +--preview-window right:65%:wrap +" +FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git 2>/dev/null" + +FZ_HISTORY_CD_CMD=zshz +ZSHZ_CMD=" " # Do not set the alias, fz will cover that +ZSHZ_UNCOMMON=1 +forgit_ignore="/dev/null" #replaced gi with local git-ignore plugin + +# Strings to ignore when using dotscheck, escape stuff that could be wild cards (../) +dotsvar=( gtkrc-2.0 kwinrulesrc '\.\./' \.config/gtk-3\.0/settings\.ini ) + +# Export variables when connected via SSH +if [[ -n $SSH_CONNECTION ]]; then + export DISPLAY=:0 + alias ls="lsd --group-dirs=first --icon=never" +else + alias ls='lsd --group-dirs=first' +fi + +# Set variables if on ac mode +if [[ $(cat /run/tlp/last_pwr) = 0 ]]; then + alias micro="micro -fastdirty false" +fi + +######################### +# Aliases # +######################### + +# Access zsh config files +alias zshconf="(){ setopt extendedglob local_options; $EDITOR ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc }" +alias zshconfkate="(){ setopt extendedglob local_options; kate ${HOME}/.zshrc ${0:h}/config-files.plugin.zsh ${0:h}/themes/\${MYPROMPT}-*~*.zwc }" + +alias t='tail -f' +alias g='git' +alias gi="git-ignore" +alias open='xdg-open' +alias atom='atom --disable-gpu' +alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"' # Allows leaving from deleted directories +# Aesthetic function for Dolphin, clear -x if cd while in Dolphin +$isdolphin && alias cd='clear -x; cd' + +# dot file management +alias dots='DOTBARE_DIR="$HOME/.dots" DOTBARE_TREE="$HOME" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/dotbare" dotbare' +export DOTBARE_FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" +export DOTBARE_DIFF_PAGER=delta + +(( ${+commands[brl]} )) && { +(){ local stratum strata=( /bedrock/run/enabled_strata/* local) +for stratum in ${strata:t}; do +hash -d "${stratum}"="/bedrock/strata/${stratum}" +[[ "${stratum}" = "local" ]] && continue +alias "${stratum}"="strat ${stratum}" +alias "r${stratum}"="strat -r ${stratum}" +[[ -d "/bedrock/strata/${stratum}/etc/.git" ]] && \ +alias "${stratum:0:1}edots"="command sudo strat -r ${stratum} git --git-dir=/etc/.git --work-tree=/etc" +done } +alias bedots='command sudo DOTBARE_FZF_DEFAULT_OPTS="$DOTBARE_FZF_DEFAULT_OPTS" DOTBARE_DIR="/bedrock/.git" DOTBARE_TREE="/bedrock" DOTBARE_BACKUP="${ZPFX:-${XDG_DATA_HOME:-$HOME/.local/share}}/bdotbare" dotbare' +} + +######################### +# Other # +######################### + +bindkey -e # EMACS bindings +setopt append_history # Allow multiple terminal sessions to all append to one zsh command history +setopt hist_ignore_all_dups # delete old recorded entry if new entry is a duplicate. +setopt no_beep # do not beep on error +setopt auto_cd # If you type foo, and it is not a command, and it is a directory in your cdpath, go there +setopt multios # perform implicit tees or cats when multiple redirections are attempted +setopt prompt_subst # enable parameter expansion, command substitution, and arithmetic expansion in the prompt +setopt interactive_comments # Allow comments even in interactive shells (especially for Muness) +setopt pushd_ignore_dups # don't push multiple copies of the same directory onto the directory stack +setopt auto_pushd # make cd push the old directory onto the directory stack +setopt pushdminus # swapped the meaning of cd +1 and cd -1; we want them to mean the opposite of what they mean +setopt pushd_silent # Silence pushd +setopt glob_dots # Show dotfiles in completions +setopt extended_glob + +# Fuzzy matching of completions for when you mistype them: +zstyle ':completion:*' completer _complete _match _list _ignored _correct _approximate +zstyle ':completion:*:match:*' original only +zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' + +# Pretty completions +#zstyle ':completion:*:matches' group 'yes' +#zstyle ':completion:*:options' description 'yes' +#zstyle ':completion:*:options' auto-description '%d' +#zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +#zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:descriptions' format '[%d]' +#zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +#zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +#zstyle ':completion:*' group-name '' +zstyle ':completion:*' verbose yes +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' +zstyle ':completion:*' use-cache on +# do not include pwd after ../ +zstyle ':completion:*' ignore-parents parent pwd +# Hide nonexistant matches, speeds up completion a bit +zstyle ':completion:*' accept-exact '*(N)' +# divide man pages by sections +zstyle ':completion:*:manuals' separate-sections true + +# fzf-tab +zstyle ':fzf-tab:*' fzf-bindings 'space:accept' # Space as accept +zstyle ':fzf-tab:*' print-query ctrl-c # Use input as result when ctrl-c +zstyle ':fzf-tab:*' accept-line enter # Accept selected entry on enter +zstyle ':fzf-tab:*' prefix '' # No dot prefix +zstyle ':fzf-tab:*' single-group color header # Show header for single groups +zstyle ':fzf-tab:complete:(cd|ls|lsd):*' fzf-preview 'ls -1 --color=always -- $realpath' +zstyle ':fzf-tab:complete:((micro|cp|rm):argument-rest|kate:*)' fzf-preview 'bat --color=always -- $realpath 2>/dev/null || ls --color=always -- $realpath' +zstyle ':fzf-tab:complete:micro:argument-rest' fzf-flags --preview-window=right:65% +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-preview "git --git-dir=$UPDATELOCAL_GITDIR/\${word}/.git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset ||%b' ..FETCH_HEAD 2>/dev/null" +zstyle ':fzf-tab:complete:updatelocal:argument-rest' fzf-flags --preview-window=down:5:wrap +zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview \ + '[[ $group == "[process ID]" ]] && ps --pid=$word -o cmd --no-headers -w -w' +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap + + +bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word +bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word +bindkey -s '^[[5~' '' # Do nothing on pageup and pagedown. Better than printing '~'. +bindkey -s '^[[6~' '' +bindkey '^[[3;5~' kill-word # ctrl+del delete next word +# bindkey '^h' _complete_help +bindkey '^I' expand-or-complete-prefix # Fix autopair completion within brackets +bindkey '^H' backward-kill-word diff --git a/NICHOLAS85/.zinit/snippets/config/functions/@append_dir-history-var b/NICHOLAS85/.zinit/snippets/config/functions/@append_dir-history-var new file mode 100644 index 0000000..230153d --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/@append_dir-history-var @@ -0,0 +1,3 @@ +emulate -L zsh + +dir_history=("${1%%$'\n'}" "${(u)dir_history[@]}" ) diff --git a/NICHOLAS85/.zinit/snippets/config/functions/@chwpd_dir-history-var b/NICHOLAS85/.zinit/snippets/config/functions/@chwpd_dir-history-var new file mode 100644 index 0000000..6be1553 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/@chwpd_dir-history-var @@ -0,0 +1,7 @@ +emulate -L zsh + +if [[ -r "$_per_directory_history_path" ]]; then + fc -a -p "$_per_directory_history_path" +fi + +dir_history=("${history[@]}") diff --git a/NICHOLAS85/.zinit/snippets/config/functions/apt-history b/NICHOLAS85/.zinit/snippets/config/functions/apt-history new file mode 100644 index 0000000..72cc25f --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/apt-history @@ -0,0 +1 @@ + zcat -qf /var/log/apt/history.log* | grep -Po '^Commandline: apt install (?!.*--reinstall)\K.*' diff --git a/NICHOLAS85/.zinit/snippets/config/functions/autoenv-files b/NICHOLAS85/.zinit/snippets/config/functions/autoenv-files new file mode 100644 index 0000000..c4df5bc --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/autoenv-files @@ -0,0 +1,6 @@ +dirs=( $( { sed -e 's/:\(.*\):/\1/' $AUTOENV_AUTH_FILE } | sed 's/:.*//' | +FZF_DEFAULT_OPTS="$FORGIT_FZF_DEFAULT_OPTS -0 -m --nth 2..,.. +--preview='[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --style=numbers --color=always {}) 2> /dev/null | head -500' +$FORGIT_ADD_FZF_OPTS" fzf ) ) + +${dirs:+kate} $dirs diff --git a/NICHOLAS85/.zinit/snippets/config/functions/chpwd_ls b/NICHOLAS85/.zinit/snippets/config/functions/chpwd_ls new file mode 100644 index 0000000..ef5034a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/chpwd_ls @@ -0,0 +1,4 @@ +emulate -L zsh +if [[ "$OLDPWD" != "$PWD" ]]; then + lsd --group-dirs=first +fi diff --git a/NICHOLAS85/.zinit/snippets/config/functions/dotscheck b/NICHOLAS85/.zinit/snippets/config/functions/dotscheck new file mode 100644 index 0000000..a6ac913 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/dotscheck @@ -0,0 +1,14 @@ + if [ -d $HOME/.dots ]; then + local dotsvar1 dotsvar2 dotsvar3 dotsvar4 dotcmd + dotcmd="/usr/bin/git --git-dir=$HOME/.dots/ --work-tree=$HOME" + dotsvar1=("${dotsvar[@]/%/'}") + dotsvar2=("${dotsvar1[@]/#/-e '}") + dotsvar3=(grep -v "${dotsvar2[*]}") + dotsvar4=$(eval $dotcmd ls-files --modified --deleted --exclude-standard | eval "${dotsvar3[*]}") + if ! [ -z $dotsvar4 ]; then + echo "" + eval $dotcmd status -s + else + return 1 + fi +fi diff --git a/NICHOLAS85/.zinit/snippets/config/functions/history-stat b/NICHOLAS85/.zinit/snippets/config/functions/history-stat new file mode 100644 index 0000000..c4ab262 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/history-stat @@ -0,0 +1 @@ +fc -ln 0 | awk '{print $1}' | sort | uniq -c | sort -nr | head diff --git a/NICHOLAS85/.zinit/snippets/config/functions/kate b/NICHOLAS85/.zinit/snippets/config/functions/kate new file mode 100644 index 0000000..ddbe25c --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/kate @@ -0,0 +1 @@ +command kate "${@}" 2>/dev/null &! diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/mcsvr b/NICHOLAS85/.zinit/snippets/config/functions/mcsvr similarity index 66% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/mcsvr rename to NICHOLAS85/.zinit/snippets/config/functions/mcsvr index 5788b49..a1ccb55 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/mcsvr +++ b/NICHOLAS85/.zinit/snippets/config/functions/mcsvr @@ -6,4 +6,4 @@ local svrdir="${HOME}/bin/minecraft/servers" dir $FORGIT_ADD_FZF_OPTS" fzf ) ) } -[ ! -z $dir ] && systemd-inhibit --who="mcsvr ${1:-${dir:t}}" --why="Running Minecraft Server" $dir/serverstartlinux.sh +[ ! -z $dir ] && sudo systemd-inhibit --who="mcsvr ${1:-${dir:t}}" --why="Running Minecraft Server" "$dir/serverstartlinux.sh" diff --git a/NICHOLAS85/.zinit/snippets/config/functions/prompt_my_per_dir_status b/NICHOLAS85/.zinit/snippets/config/functions/prompt_my_per_dir_status new file mode 100644 index 0000000..e5c039c --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/prompt_my_per_dir_status @@ -0,0 +1,6 @@ +if $_per_directory_history_is_global; then + return +else + p10k segment -i '' +fi + diff --git a/NICHOLAS85/.zinit/snippets/config/functions/rm b/NICHOLAS85/.zinit/snippets/config/functions/rm new file mode 100644 index 0000000..2a167d5 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/rm @@ -0,0 +1 @@ +[[ $EUID -ne 0 ]] && rm-trash -I -v "${@}" || command rm -I -v "${@}" diff --git a/NICHOLAS85/.zinit/snippets/config/functions/sudo b/NICHOLAS85/.zinit/snippets/config/functions/sudo new file mode 100644 index 0000000..3d0dad8 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/sudo @@ -0,0 +1,58 @@ +function _do_sudo() { + [[ -z ${__do_sudo_glob+x} ]] && local __do_sudo_glob=1 + [[ -z ${__do_sudo_expanded+x} ]] && local -A __do_sudo_expanded + local -a args + local -a cmd_alias_arr + local cmd_alias first=true + while (($#)); do + case "$1" in + command|exec|-) shift; break ;; + nocorrect) shift ;; + noglob) __do_sudo_glob=0; shift ;; + [1-9]) args+=( $1 ); shift ;; + *) + $first && { first=false; cmd_alias="$(command -v 2>/dev/null -- "$1")" } + if [[ "$?" -eq 0 ]] && [[ "$cmd_alias" == 'alias'* ]] && [[ -z "$__do_sudo_expanded["$1"]" ]]; then + __do_sudo_expanded["$1"]=1 + IFS=' ' read -A cmd_alias_arr <<< "$(sed -e "s/[^=]*=//" -e "s/^'//" -e "s/'$//" <<< "$cmd_alias")" + args+=( "${cmd_alias_arr[@]}" ) + shift + break + else + if ((__do_sudo_glob)); then + args+=( $~==1 ) + else + args+=( $==1 ) + fi + shift + fi + ;; + esac + done + if [[ ${#cmd_alias_arr[@]} -gt 0 ]]; then + _do_sudo "${args[@]}" $==* + else + if ((__do_sudo_glob)); then + command sudo "${args[@]}" $~==* + else + command sudo "${args[@]}" $==* + fi + fi +} + +local -a first +local pos=1 second ret +for arg in "$@" +do + if [[ ${arg:0:1} == "-" ]]; then + ((++pos)) + first=("${first[@]}" "$arg") + else + noglob _do_sudo ${first[@]} ${@:$pos} + ret=$? + unset -f _do_sudo + return $ret + fi +done +command sudo "${@}" +unset -f _do_sudo diff --git a/NICHOLAS85/.zinit/snippets/config/functions/whichedit b/NICHOLAS85/.zinit/snippets/config/functions/whichedit new file mode 100644 index 0000000..74b3935 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/whichedit @@ -0,0 +1,7 @@ +local fulldir="$(which ${1})" + +if file -b -L --mime-type "${fulldir}" | grep -q "text/"; then + "${EDITOR}" "${fulldir}" +else + echo "Not a text file, not editing..." +fi diff --git a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zicompinit_fast b/NICHOLAS85/.zinit/snippets/config/functions/zicompinit_fast similarity index 90% rename from NICHOLAS85/.zinit/plugins/_local---config-files/functions/zicompinit_fast rename to NICHOLAS85/.zinit/snippets/config/functions/zicompinit_fast index fd14fa8..3f5de65 100644 --- a/NICHOLAS85/.zinit/plugins/_local---config-files/functions/zicompinit_fast +++ b/NICHOLAS85/.zinit/snippets/config/functions/zicompinit_fast @@ -5,11 +5,11 @@ 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 +if [[ -e "$zcompf_a" && -f "$zcompf_a"(#qN.md-1) ]]; then + compinit -C -d "$zcompf" +else 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 diff --git a/NICHOLAS85/.zinit/snippets/config/patches/LS_COLORS.patch b/NICHOLAS85/.zinit/snippets/config/patches/LS_COLORS.patch new file mode 100644 index 0000000..7c6c218 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/LS_COLORS.patch @@ -0,0 +1,33 @@ +Change dir color and add color to configs +--- trapd00r---LS_COLORS/LS_COLORS 2019-11-10 20:06:56.272863178 -0500 ++++ trapd00r---LS_COLORS/LS_COLORS-patch 2019-11-10 20:07:58.156027896 -0500 +@@ -36,7 +36,7 @@ + BLK 38;5;68 + CAPABILITY 38;5;17 + CHR 38;5;113;1 +-DIR 38;5;30 ++DIR 01;34 + DOOR 38;5;127 + EXEC 38;5;208;1 + FIFO 38;5;126 +@@ -146,14 +146,14 @@ + # }}} + # }}} + # configs {{{2 +-*config 1 +-*cfg 1 +-*conf 1 +-*rc 1 ++*config 36 ++*cfg 36 ++*conf 36 ++*rc 36 + *authorized_keys 1 + *known_hosts 1 +-.ini 1 +-.plist 1 ++.ini 36 ++.plist 36 + # vim + .viminfo 1 + # cisco VPN client configuration diff --git a/NICHOLAS85/.zinit/snippets/config/patches/delta.patch b/NICHOLAS85/.zinit/snippets/config/patches/delta.patch new file mode 100644 index 0000000..5956dda --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/delta.patch @@ -0,0 +1,8 @@ +--- empty 1969-12-31 19:00:00.000000000 -0500 ++++ dandavison---delta/git-dsf 2020-11-24 02:51:43.973724962 -0500 +@@ -0,0 +1,5 @@ ++#!/bin/sh ++ ++[ -z "$GIT_PREFIX" ] || \ ++ cd "$GIT_PREFIX" && \ ++ git diff --color "$@" | delta --diff-so-fancy diff --git a/NICHOLAS85/.zinit/snippets/config/patches/dotbare.patch b/NICHOLAS85/.zinit/snippets/config/patches/dotbare.patch new file mode 100644 index 0000000..e49ae69 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/dotbare.patch @@ -0,0 +1,24 @@ +Allow dotbare to be symlinked +--- kazhala---dotbare/dotbare 2020-11-08 03:51:47.379765820 -0500 ++++ kazhala---dotbare/dotbare-patch 2020-11-08 03:51:12.764122189 -0500 +@@ -12,7 +12,7 @@ + # option flags: + # check sub commands for available option flags + +-mydir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ++mydir="$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")" + source "${mydir}"/helper/set_variable.sh + + function usage() { +--- kazhala---dotbare/pkg/completion/zsh/_dotbare 2020-11-23 17:46:34.913377981 -0500 ++++ kazhala---dotbare/pkg/completion/zsh/_dotbare.patch 2020-11-23 17:46:32.169435684 -0500 +@@ -127,6 +127,9 @@ + '(- : *)'{-h,--help}'[show help information]' \ + && ret=0 + ;; ++ *) ++ _normal ++ ;; + esac + ;; + esac diff --git a/NICHOLAS85/.zinit/snippets/config/patches/fz.patch b/NICHOLAS85/.zinit/snippets/config/patches/fz.patch new file mode 100644 index 0000000..a861bcf --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/fz.patch @@ -0,0 +1,25 @@ +Fuzzy match subdirs using last arg +--- changyuheng---fz/fz.sh 2020-07-21 01:00:05.985292796 -0400 ++++ changyuheng---fz/fz.sh-patch 2020-08-24 04:21:02.276684891 -0400 +@@ -271,15 +271,15 @@ + + _fz() { + local rc +- if [[ "$($FZ_HISTORY_LIST_GENERATOR "$@" | head | wc -l)" -gt 0 ]]; then +- "$FZ_HISTORY_CD_CMD" "$@" ++ local err ++ local zmatch="$($FZ_HISTORY_LIST_GENERATOR "${@%/}" | head -n1)" ++ if [[ ${#zmatch} -gt 0 ]]; then ++ "$FZ_HISTORY_CD_CMD" "${@%/}" + elif [[ "$FZ_SUBDIR_TRAVERSAL" -ne 0 ]]; then +- err=$(cd "${@: -1}" 2>&1) +- rc=$? +- if ! cd "${@: -1}" 2>/dev/null; then ++ zmatch="$($FZ_HISTORY_LIST_GENERATOR "${@[0,-2]}" | head -n1)" ++ (){ cd "$zmatch/"*"${@: -1}"*"/" 2> $1; rc=$? err=$(<$1);} =(:) "${@}" + echo ${err#* } >&2 + return $rc +- fi + fi + } + diff --git a/NICHOLAS85/.zinit/snippets/config/patches/git-completion.patch b/NICHOLAS85/.zinit/snippets/config/patches/git-completion.patch new file mode 100644 index 0000000..7e7384a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/git-completion.patch @@ -0,0 +1,11 @@ +For some reason git would stop completing after one complete, this just redos it every time +--- felipec---git-completion/_git 2020-10-25 20:20:07.064072866 -0400 ++++ felipec---git-completion/_git-patch 2020-10-25 20:18:34.801896765 -0400 +@@ -239,6 +239,7 @@ + _requested common-commands && __git_zsh_cmd_common + _requested alias-commands && __git_zsh_cmd_alias + _requested all-commands && __git_zsh_cmd_all ++ compdef _git git + let _ret || break + done + ;; diff --git a/NICHOLAS85/.zinit/snippets/config/patches/history-search-multi-word.patch b/NICHOLAS85/.zinit/snippets/config/patches/history-search-multi-word.patch new file mode 100644 index 0000000..3a4b706 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/history-search-multi-word.patch @@ -0,0 +1,34 @@ +Partially support per_directory_history, fix trap for SIGINT +--- zdharma---history-search-multi-word/history-search-multi-word 2020-11-05 23:01:31.568455761 -0500 ++++ zdharma---history-search-multi-word/history-search-multi-word-patch 2020-11-05 23:01:18.603608347 -0500 +@@ -169,7 +169,11 @@ + # Colorify + # + +- local preamble=$'\n'"Ctrl-K – context, Ctrl-J – bump. Entry #$__hsmw_hcw_index of $max_index"$'\n' ++ local history_type="" ++ if (( ${+_per_directory_history_is_global} )); then ++ history_type=", Ctrl-G – ${${_per_directory_history_is_global/false/global}/true/local}" ++ fi ++ local preamble=$'\n'"Ctrl-K – context, Ctrl-J – bump$history_type. Entry #$__hsmw_hcw_index of $max_index"$'\n' + integer offset=${#preamble}+${#BUFFER} + POSTDISPLAY="$preamble$text" + +@@ -408,7 +412,7 @@ + trap '(( __hsmw_recedit_trap_executed == 0 )) && zle && { __hsmw_recedit_trap_executed=1; zle .send-break; }' INT + + if zle .recursive-edit -K hsmw; then +- trap '' INT ++ trap - INT + + if [[ "$__hsmw_hcw_index" -gt "0" ]]; then + if (( __hsmw_ctx )); then +@@ -427,7 +431,7 @@ + unset __hsmw_conc + fi + else +- trap '' INT ++ trap - INT + (( __hsmw_conc )) && BUFFER="" + unset __hsmw_conc + fi diff --git a/NICHOLAS85/.zinit/snippets/config/patches/per-directory-history.patch b/NICHOLAS85/.zinit/snippets/config/patches/per-directory-history.patch new file mode 100644 index 0000000..474c7e1 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/per-directory-history.patch @@ -0,0 +1,30 @@ +Optimize +--- kadaan---per-directory-history/per-directory-history.zsh 2020-08-24 05:35:33.232756679 -0400 ++++ kadaan---per-directory-history/per-directory-history-patch 2020-08-24 05:37:48.008288237 -0400 +@@ -46,7 +46,7 @@ + if ! $_per_directory_history_is_global + then + fc -P +- mkdir -p ${_per_directory_history_path:h} ++ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h} + fc -p $_per_directory_history_path + fi + } +@@ -73,7 +73,7 @@ + local fn + if $_per_directory_history_is_global + then +- mkdir -p ${_per_directory_history_path:h} ++ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h} + fn=$_per_directory_history_path + else + fn=$_per_directory_history_main_histfile +@@ -96,7 +96,7 @@ + function _per-directory-history-set-directory-history() { + fc -P + +- mkdir -p ${_per_directory_history_path:h} ++ [ -d ${_per_directory_history_path:h} ] || mkdir -p ${_per_directory_history_path:h} + fc -p $_per_directory_history_path + _per_directory_history_is_global=false + } diff --git a/NICHOLAS85/.zinit/snippets/config/patches/rm-trash.patch b/NICHOLAS85/.zinit/snippets/config/patches/rm-trash.patch new file mode 100644 index 0000000..61a8778 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/rm-trash.patch @@ -0,0 +1,50 @@ +Don't run on sudo, Fix arg handling +--- nateshmbhat---rm-trash/rm-trash/rm-trash 2020-05-22 20:42:16.267371553 -0400 ++++ nateshmbhat---rm-trash/rm-trash/rm-trash-patch 2020-05-22 20:42:13.677459148 -0400 +@@ -1,4 +1,5 @@ + #!/bin/bash ++[[ $EUID = 0 ]] && { echo "Root detected, running builtin rm"; command rm ${rm_opts} "${@}"; exit; } + + # MIT License + +@@ -238,7 +239,7 @@ + + LOOPENTERFLAG=0 + +- for file in ${FILE_ARGS[@]} ++ for file in "${FILE_ARGS[@]}" + do + LOOPENTERFLAG=1 + if [ $DEBUGFLAG -eq 1 ] ; then +@@ -273,7 +274,7 @@ + exit 1 + fi + +- for arg in $@ ; do ++ for arg in "$@" ; do + + if [ "${arg:0:1}" == '-' ] ; then + if [ "$arg" == "--no-trash" ] ;then +@@ -283,7 +284,7 @@ + + OPTIONAL_ARGS+=($arg) + else +- FILE_ARGS+=($arg) ++ FILE_ARGS+=("$arg") + fi + + case "$arg" in +@@ -318,10 +319,10 @@ + + + +-handleArguments $@ ++handleArguments "$@" + if [ $DEBUGFLAG -eq 1 ] ;then + echo ${OPTIONAL_ARGS[@]} + echo ${FILE_ARGS[@]} + fi + +-main $@ +\ No newline at end of file ++main $@ diff --git a/NICHOLAS85/.zinit/snippets/config/patches/winapps.patch b/NICHOLAS85/.zinit/snippets/config/patches/winapps.patch new file mode 100644 index 0000000..2f82323 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/winapps.patch @@ -0,0 +1,94 @@ +--- Fmstrat---winapps/bin/winapps 2020-12-09 03:05:29.845329531 -0500 ++++ Fmstrat---winapps/bin/winapps-patch 2020-12-09 03:05:25.621439998 -0500 +@@ -47,6 +47,16 @@ + exit + fi + ++DOMSTATE=$(sudo virsh domstate RDPWindows) ++case $DOMSTATE in ++ paused) ++ sudo virsh resume RDPWindows ++ ;; ++ "shut off") ++ sudo virsh start RDPWindows ++ ;; ++esac ++ + if [ -z "${RDP_IP}" ]; then + if [ -z "$(groups |grep libvirt)" ]; then + echo "You are not a member of the libvirt group. Run the below then reboot." +@@ -54,12 +64,12 @@ + echo ' sudo usermod -a -G kvm $(whoami)' + exit + fi +- if [ -z "$(virsh list |grep RDPWindows)" ]; then ++ if [ -z "$(sudo virsh list |grep RDPWindows)" ]; then + echo "RDPWindows is not running, run:" + echo " virsh start RDPWindows" + exit + fi +- RDP_IP=$(virsh net-dhcp-leases default |grep RDPWindows |awk '{print $5}') ++ RDP_IP=$(sudo virsh net-dhcp-leases default |grep RDPWindows |awk '{print $5}') + RDP_IP=${RDP_IP%%\/*} + fi + +@@ -72,14 +82,45 @@ + MULTI_FLAG="multimon" + fi + ++xfreerdp(){ ++ ( ++ if [[ -f $TMP/winappslastuse ]]; then ++ rm $TMP/winappslastuse ++ fi ++ command xfreerdp "${@}" & ++ wait $! ++ ret=$? ++ if [[ $ret = 131 ]]; then ++ notify-send -t 3000 -i dialog-warning "Windows VM not ready, wait" ++ else ++ if [[ $ret != 0 ]]; then ++ notify-send -t 4000 -i dialog-warning "xfreerdp returned $ret" ++ # https://github.com/FreeRDP/FreeRDP/blob/90b3bf4891e426d422ddb0581560450013832e5e/client/X11/xfreerdp.h#L252 ++ fi ++ date +%s > $TMP/winappslastuse ++ if ! pgrep xfreerdp 1>/dev/null; then ++ sudo virsh suspend RDPWindows ++ while [[ -f $TMP/winappslastuse ]] && [[ $(( $(date +%s) - $(cat $TMP/winappslastuse) )) -lt 300 ]]; do ++ sleep 100 ++ done ++ if ! [[ -f $TMP/winappslastuse ]]; then ++ return ++ fi ++ sudo virsh managedsave RDPWindows --running ++ rm $TMP/winappslastuse ++ fi ++ fi ++ ) & ++} ++ + if [ "${1}" = "windows" ]; then +- xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} /scale:${RDP_SCALE} /dynamic-resolution +clipboard +auto-reconnect +home-drive /wm-class:"Microsoft Windows" 1> /dev/null 2>&1 & ++ xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} /scale:${RDP_SCALE} /dynamic-resolution +clipboard +auto-reconnect +home-drive /wm-class:"Microsoft Windows" + elif [ "${1}" = "check" ]; then + dprint "CHECK" + xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /app:"explorer.exe" + elif [ "${1}" = "manual" ]; then + dprint "MANUAL:${2}" +- xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +home-drive +clipboard -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /app:"${2}" 1> /dev/null 2>&1 & ++ xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +home-drive +clipboard -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /app:"${2}" + elif [ "${1}" != "install" ]; then + dprint "DIR:${DIR}" + if [ -e "${DIR}/../apps/${1}/info" ]; then +@@ -99,9 +140,9 @@ + dprint "HOME:${HOME}" + FILE=$(echo "${2}" | sed 's|'"${HOME}"'|\\\\tsclient\\home|;s|/|\\|g;s|\\|\\\\|g') + dprint "FILE:${FILE}" +- xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${ICON}" /app-cmd:"\"${FILE}\"" 1> /dev/null 2>&1 & ++ xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${ICON}" /app-cmd:"\"${FILE}\"" + else +- xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${ICON}" 1> /dev/null 2>&1 & ++ xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${ICON}" + fi + fi + diff --git a/NICHOLAS85/.zinit/snippets/config/patches/zsh-autopair.patch b/NICHOLAS85/.zinit/snippets/config/patches/zsh-autopair.patch new file mode 100644 index 0000000..55f7a72 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/zsh-autopair.patch @@ -0,0 +1,12 @@ +Remove overwriting bindkey +--- hlissner---zsh-autopair/autopair.zsh 2020-11-06 16:54:27.410262798 -0500 ++++ hlissner---zsh-autopair/autopair.zsh-patch 2020-11-06 16:54:41.395204729 -0500 +@@ -211,8 +211,6 @@ + done + + bindkey "^?" autopair-delete +- bindkey "^h" autopair-delete + bindkey -M isearch "^?" backward-delete-char +- bindkey -M isearch "^h" backward-delete-char + } + [[ -n $AUTOPAIR_INHIBIT_INIT ]] || autopair-init diff --git a/NICHOLAS85/.zinit/snippets/config/patches/zsh-dircycle.patch b/NICHOLAS85/.zinit/snippets/config/patches/zsh-dircycle.patch new file mode 100644 index 0000000..00a9a79 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/zsh-dircycle.patch @@ -0,0 +1,30 @@ +p10k support, Affect dirstack and chwpd +--- michaelxmcbride---zsh-dircycle/dircycle.zsh 2020-10-14 03:42:40.565527743 -0400 ++++ michaelxmcbride---zsh-dircycle/dircycle.zsh-patch 2020-10-14 03:42:32.315653673 -0400 +@@ -5,20 +5,22 @@ + + [[ ${#dirstack} -eq 0 ]] && return + +- while ! builtin pushd -q $1 &>/dev/null; do ++ while ! builtin pushd $1 &>/dev/null; do + # A missing directory was found; pop it out of the directory stack. +- builtin popd -q $1 ++ builtin popd $1 + + # Stop trying if there are no more directories in the directory stack. + [[ ${#dirstack} -eq 0 ]] && break + done +- ++ + # Trigger a prompt update if using Pure (https://github.com/sindresorhus/pure). + if typeset -f prompt_pure_setup > /dev/null; then + prompt_pure_async_tasks + prompt_pure_preprompt_render + else +- zle reset-prompt ++ _p9k_precmd ++ zle .reset-prompt ++ zle -R + fi + } + diff --git a/NICHOLAS85/.zinit/snippets/config/patches/zsh-edit.patch b/NICHOLAS85/.zinit/snippets/config/patches/zsh-edit.patch new file mode 100644 index 0000000..659335a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/patches/zsh-edit.patch @@ -0,0 +1,14 @@ +Fix autoloading with Zinit, remove cdpath hook +--- marlonrichert---zsh-edit/zsh-edit.plugin.zsh 2020-11-24 14:57:14.225191357 -0500 ++++ marlonrichert---zsh-edit/zsh-edit.plugin.zsh-patch 2020-11-24 15:01:38.468808641 -0500 +@@ -6,9 +6,7 @@ + + local fdir=${${(%):-%x}:A:h}/functions + typeset -gU FPATH fpath=( $fdir $fpath ) +- autoload -Uz add-zsh-hook $fdir/_*~*.zwc +- +- add-zsh-hook chpwd _cdpath ++ autoload -Uz add-zsh-hook $fdir/_*~*.zwc(.:t) + + local widget + diff --git a/NICHOLAS85/.zinit/snippets/config/themes/dolphin-post.zsh b/NICHOLAS85/.zinit/snippets/config/themes/dolphin-post.zsh new file mode 100644 index 0000000..36f9584 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/themes/dolphin-post.zsh @@ -0,0 +1,193 @@ +# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure). +# +# Differences from Pure: +# +# - Git: +# - `@c4d3ec2c` instead of something like `v1.4.0~11` when in detached HEAD state. +# - No automatic `git fetch` (the same as in Pure with `PURE_GIT_PULL=0`). +# +# Apart from the differences listed above, the replication of Pure prompt is exact. This includes +# even the questionable parts. For example, just like in Pure, there is no indication of Git status +# being stale; prompt symbol is the same in command, visual and overwrite vi modes; when prompt +# doesn't fit on one line, it wraps around with no attempt to shorten it. +# +# If you like the general style of Pure but not particularly attached to all its quirks, type +# `p10k configure` and pick "Lean" style. This will give you slick minimalist prompt while taking +# advantage of Powerlevel10k features that aren't present in Pure. + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh + + # Unset all configuration options. + unset -m 'POWERLEVEL9K_*|DEFAULT_USER' + + # Zsh >= 5.1 is required. + autoload -Uz is-at-least && is-at-least 5.1 || return + + # Prompt colors. + local grey=242 + local red=1 + local yellow=3 + local blue=4 + local magenta=5 + local cyan=6 + local white=7 + + # Left prompt segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + #context # user@host + # dir # current directory + # =========================[ Line #2 ]========================= + # newline # \n + # virtualenv # python virtual environment + prompt_char # prompt symbol + ) + + # Right prompt segments. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + # command_execution_time # previous command duration + # virtualenv # python virtual environment + # context # user@host + # time # current time + # =========================[ Line #2 ]========================= + # newline # \n + command_execution_time # previous command duration + vcs # git status + ) + + # Basic style options that define the overall prompt look. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol + typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION= # no segment icons + + # Add an empty line before each prompt except the first. This doesn't emulate the bug + # in Pure that makes prompt drift down whenever you use the Alt-C binding from fzf or similar. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + + # Magenta prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=$magenta + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=$red + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode is the same as in command mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❮' + # Prompt symbol in overwrite vi mode is the same as in command mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=false + + # Grey Python Virtual Environment. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=$grey + # Don't show Python version. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + + # Blue current directory. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue + + # Context format when root: user@host. The first part white, the rest grey. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE="%F{$white}%n%f%F{$grey}@%m%f" + # Context format when not root: user@host. The whole thing grey. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE="%F{$grey}%n@%m%f" + # Don't show context unless root or in SSH. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION= + + # Show previous command duration only if it's >= 5s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5 + # Don't show fractional seconds. Thus, 7s rather than 7.3s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Yellow previous command duration. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$yellow + + # Grey Git prompt. This makes stale prompts indistinguishable from up-to-date ones. + typeset -g POWERLEVEL9K_VCS_FOREGROUND=$grey + + # Disable async loading indicator to make directories that aren't Git repositories + # indistinguishable from large Git repositories without known state. + typeset -g POWERLEVEL9K_VCS_LOADING_TEXT= + + # Don't wait for Git status even for a millisecond, so that prompt always updates + # asynchronously when Git state changes. + typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0 + + # Cyan ahead/behind arrows. + typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan + # Don't show remote branch, current tag or stashes. + typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind) + # Don't show the branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= + # When in detached HEAD state, show @commit where branch normally goes. + typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@' + # Don't show staged, unstaged, untracked indicators. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON= + # Show '*' when there are staged, unstaged or untracked files. + typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*' + # Show '⇣' if local branch is behind remote. + typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣' + # Show '⇡' if local branch is ahead of remote. + typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡' + # Don't show the number of commits next to the ahead/behind arrows. + typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1 + # Remove space between '⇣' and '⇡' and all trailing spaces. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }' + + # Grey current time. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=$grey + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands rather than the end times of + # their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/NICHOLAS85/.zinit/snippets/config/themes/p10k-post.zsh b/NICHOLAS85/.zinit/snippets/config/themes/p10k-post.zsh new file mode 100644 index 0000000..409f0ab --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/themes/p10k-post.zsh @@ -0,0 +1,1575 @@ +# Generated by Powerlevel10k configuration wizard on 2020-12-14 at 18:21 EST. +# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 21453. +# Wizard options: nerdfont-complete + powerline, large icons, unicode, lean, 2 lines, +# disconnected, no frame, sparse, few icons, concise, instant_prompt=quiet. +# Type `p10k configure` to generate another config. +# +# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate +# your own config based on it. +# +# Tip: Looking for a nice color? Here's a one-liner to print colormap. +# +# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh -o extended_glob + + # Unset all configuration options. This allows you to apply configuration changes without + # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. + unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' + + # Zsh >= 5.1 is required. + autoload -Uz is-at-least && is-at-least 5.1 || return + + zmodload zsh/langinfo + if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then + local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8} + fi + + # The list of segments shown on the left. Fill it with the most important segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + # os_icon # os identifier + dir # current directory + vcs # git status + # =========================[ Line #2 ]========================= + newline # \n + prompt_char # prompt symbol + ) + + # The list of segments shown on the right. Fill it with less important segments. + # Right prompt on the last prompt line (where you are typing your commands) gets + # automatically hidden when the input line reaches it. Right prompt above the + # last prompt line gets hidden if it would overlap with left prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + my_per_dir_status + command_execution_time # duration of the last command + status # exit code of the last command + background_jobs # presence of background jobs + context # user@hostname + # =========================[ Line #2 ]========================= + newline # \n + command_execution_time + status + time + dir + ) + + # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. + typeset -g POWERLEVEL9K_MODE=nerdfont-complete + # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid + # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. + typeset -g POWERLEVEL9K_ICON_PADDING=none + + # Basic style options that define the overall look of your prompt. You probably don't want to + # change them. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_LEFT_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%242F⎸' # separate segments + typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='' # separate segments nothing + typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0BC' # separator between different-color segments on the left. + typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0BA' # separator between different-color segments on the right. + typeset -g POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR="" + + + + # When set to true, icons appear before content on both sides of the prompt. When set + # to false, icons go after content. If empty or not set, icons go before content in the left + # prompt and after content in the right prompt. + # + # You can also override it for a specific segment: + # + # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false + # + # Or for a specific segment in specific state: + # + # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false + typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= + typeset -g POWERLEVEL9K_DIR_ICON_BEFORE_CONTENT=true + + # Add an empty line before each prompt. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true + + # Connect left prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= + # Connect right prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= + + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll + # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and + # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. + typeset -g POWERLEVEL9K_SHOW_RULER=false + typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·' + typeset -g POWERLEVEL9K_RULER_FOREGROUND=242 + + # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─' + # to make it easier to see the alignment between left and right prompt and to separate prompt + # from command output. It serves the same purpose as ruler (see above) without increasing + # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false + # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact + # prompt. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='' + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= + # The color of the filler. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=238 + # Start filler from the edge of the screen if there are no left segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' + # End filler on the edge of the screen if there are no right segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' + # The left end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + # Left prompt terminator for lines without any segments. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + typeset -g ZLE_RPROMPT_INDENT=0 + + #################################[ os_icon: os identifier ]################################## + # OS identifier color. + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= + # Make the icon bold. + typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' + + ################################[ prompt_char: prompt symbol ]################################ + # Green prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='➜' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' + # Prompt symbol in overwrite vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true + # No line terminator if prompt_char is the last segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + # No line introducer if prompt_char is the first segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + # No surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_LEFT_WHITESPACE= + + ##################################[ dir: current directory ]################################## + # Default current directory color. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=012 + # If directory is too long, shorten some of its segments to the shortest possible unique + # prefix. The shortened directory can be tab-completed to the original. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique + # Replace removed segment suffixes with this symbol. + typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= + # Color of the shortened directory segments. + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 + # Color of the anchor directory segments. Anchor segments are never shortened. The first + # segment is always an anchor. + typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 + # Display anchor directory segments in bold. + typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true + # Don't shorten directories that contain any of these files. They are anchors. + local anchor_files=( + .bzr + .citc + .git + .hg + .node-version + .python-version + .go-version + .ruby-version + .lua-version + .java-version + .perl-version + .php-version + .tool-version + .shorten_folder_marker + .svn + .terraform + CVS + Cargo.toml + composer.json + go.mod + package.json + stack.yaml + ) + typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" + # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains + # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is + # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) + # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers + # and other directories don't. + # + # Optionally, "first" and "last" can be followed by ":" where is an integer. + # This moves the truncation point to the right (positive offset) or to the left (negative offset) + # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" + # respectively. + typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false + # Don't shorten this many last directory segments. They are anchors. + typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 + # Shorten directory if it's longer than this even if there is space for it. The value can + # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, + # directory will be shortened only when prompt doesn't fit or when other parameters demand it + # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). + # If set to `0`, directory will always be shortened to its minimum length. + typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this + # many columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least + # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 + # If set to true, embed a hyperlink into the directory. Useful for quickly + # opening a directory in the file manager simply by clicking the link. + # Can also be handy when the directory is shortened, as it allows you to see + # the full directory that was used in previous commands. + typeset -g POWERLEVEL9K_DIR_HYPERLINK=true + + # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON + # and POWERLEVEL9K_DIR_CLASSES below. + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 + + # The default icon shown next to non-writable and non-existent directories when + # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. + typeset -g POWERLEVEL9K_LOCK_ICON='%197F' + + # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different + # directories. It must be an array with 3 * N elements. Each triplet consists of: + # + # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with + # extended_glob option enabled. + # 2. Directory class for the purpose of styling. + # 3. An empty string. + # + # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. + # + # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories + # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=( + # '~/work(|/*)' WORK '' + # '~(|/*)' HOME '' + # '*' DEFAULT '') + # + # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one + # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or + # WORK_NON_EXISTENT. + # + # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an + # option to define custom colors and icons for different directory classes. + # + # # Styling for WORK. + # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 + # + # # Styling for WORK_NOT_WRITABLE. + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 + # + # # Styling for WORK_NON_EXISTENT. + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39 + # + # If a styling parameter isn't explicitly defined for some class, it falls back to the classless + # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls + # back to POWERLEVEL9K_DIR_FOREGROUND. + # + typeset -g POWERLEVEL9K_DIR_CLASSES=( + '/etc|/etc/*' ETC '' + '~' HOME '' + '~/*' HOME_SUBFOLDER '' + '*' DEFAULT '' + ) + + # Icon to show when dir is non-existent + typeset -g POWERLEVEL9K_DIR_{ETC,HOME,HOME_SUBFOLDER,DEFAULT}_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='%227F✖' + + # Custom prefix. + # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' + + #####################################[ vcs: git status ]###################################### + # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' + # Process escape sequences like the echo builtin + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=${(g::)POWERLEVEL9K_VCS_BRANCH_ICON} + + # Untracked files icon. It's really a question mark, your font isn't broken. + # Change the value of this parameter to show a different icon. + typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' + # Process escape sequences like the echo builtin + typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON=${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON} + + typeset -g POWERLEVEL9K_VCS_GIT_{GITHUB,GITLAB}_ICON="" + typeset -g POWERLEVEL9K_VCS_GIT_ICON="" + + # Formatter for Git status. + # + # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # + # You can edit the function to customize how Git status looks. + # + # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: + # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. + function my_git_formatter() { + emulate -L zsh + + if [[ -n $P9K_CONTENT ]]; then + # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from + # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. + typeset -g my_git_format=$P9K_CONTENT + return + fi + + if (( $1 )); then + # Styling for up-to-date Git status. + local meta='%f' # default foreground + local clean='%76F' # green foreground + local modified='%178F' # yellow foreground + local untracked='%39F' # blue foreground + local conflicted='%196F' # red foreground + else + # Styling for incomplete and stale Git status. + local meta='%244F' # grey foreground + local clean='%244F' # grey foreground + local modified='%244F' # grey foreground + local untracked='%244F' # grey foreground + local conflicted='%244F' # grey foreground + fi + + local res + + if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then + local branch=${(V)VCS_STATUS_LOCAL_BRANCH} + # If local branch name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show local branch name in full without truncation, delete the next line. + (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line + res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" + fi + + if [[ -n $VCS_STATUS_TAG + # Show tag only if not on a branch. + # Tip: To always show tag, delete the next line. + && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line + ]]; then + local tag=${(V)VCS_STATUS_TAG} + # If tag name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show tag name in full without truncation, delete the next line. + (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line + res+="${meta}#${clean}${tag//\%/%%}" + fi + + # Display the current Git commit if there is no branch and no tag. + # Tip: To always display the current Git commit, delete the next line. + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_LOCAL_BRANCH ]] && # <-- this line + res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" + + # Show tracking branch name if it differs from local branch. + if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then + res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" + fi + + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + # ⇠42 if behind the push remote. + (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" + (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " + # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. + (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" + # *42 if have stashes. + (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" + # 'merge' if the repo is in an unusual state. + [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" + # ~42 if have merge conflicts. + (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" + # +42 if have staged changes. + (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" + # !42 if have unstaged changes. + (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" + # ?42 if have untracked files. It's really a question mark, your font isn't broken. + # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. + # Remove the next line if you don't want to see untracked files at all. + (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" + # "─" if the number of unstaged files is unknown. This can happen due to + # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower + # than the number of files in the Git index, or due to bash.showDirtyState being set to false + # in the repository config. The number of staged and untracked files may also be unknown + # in this case. + (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" + + typeset -g my_git_format=$res + } + functions -M my_git_formatter 2>/dev/null + + # Don't count the number of unstaged, untracked and conflicted files in Git repositories with + # more than this many files in the index. Negative value means infinity. + # + # If you are working in Git repositories with tens of millions of files and seeing performance + # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output + # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's + # config: `git config bash.showDirtyState false`. + typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + + # Disable the default Git status formatting. + typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true + # Install our own Git status formatter. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' + typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' + # Enable counters for staged, unstaged, etc. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 + + # Icon color. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 + typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 + # Custom icon. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' + + # Show status of repositories of these types. You can add svn and/or hg if you are + # using them. If you do, your prompt may become slow even when your current directory + # isn't in an svn or hg reposotiry. + typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) + + # These settings are used for repositories other than Git or when gitstatusd fails and + # Powerlevel10k has to fall back to using vcs_info. + typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 + + ##########################[ status: exit code of the last command ]########################### + # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and + # style them independently from the regular OK and ERROR state. + typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true + + # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as + # it will signify success by turning green. + typeset -g POWERLEVEL9K_STATUS_OK=false + typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when some part of a pipe command fails but the overall exit status is zero. It may look + # like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as + # it will signify error by turning red. + typeset -g POWERLEVEL9K_STATUS_ERROR=false + typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when the last command was terminated by a signal. + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 + # Use terse signal names: "INT" instead of "SIGINT(2)". + typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when some part of a pipe command fails and the overall exit status is also non-zero. + # It may look like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' + + ###################[ command_execution_time: duration of the last command ]################### + # Show duration of the last command if takes at least this many seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 + # Show this many fractional digits. Zero means round to seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Execution time color. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=248 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Custom icon. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' + + #######################[ background_jobs: presence of background jobs ]####################### + # Show the number of background jobs. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=true + # Background jobs color. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=37 + # Custom icon. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='✦' + + #######################[ direnv: direnv status (https://direnv.net/) ]######################## + # Direnv color. + typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### + # Default asdf color. Only used to display tools for which there is no color override (see below). + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND. + typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 + + # There are four parameters that can be used to hide asdf tools. Each parameter describes + # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at + # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to + # hide a tool, it gets shown. + # + # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and + # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: + # + # asdf local python 3.8.1 + # asdf global python 3.8.1 + # + # After running both commands the current python version is 3.8.1 and its source is "local" as + # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, + # it'll hide python version in this case because 3.8.1 is the same as the global version. + # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't + # contain "local". + + # Hide tool versions that don't come from one of these sources. + # + # Available sources: + # + # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" + # - local `asdf current` says "set by /some/not/home/directory/file" + # - global `asdf current` says "set by /home/username/file" + # + # Note: If this parameter is set to (shell local global), it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. + typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) + + # If set to false, hide tool versions that are the same as global. + # + # Note: The name of this parameter doesn't reflect its meaning at all. + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. + typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false + + # If set to false, hide tool versions that are equal to "system". + # + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. + typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true + + # If set to non-empty value, hide tools unless there is a file matching the specified file pattern + # in the current directory, or its parent directory, or its grandparent directory, and so on. + # + # Note: If this parameter is set to empty value, it won't hide tools. + # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. + # + # Example: Hide nodejs version when there is no package.json and no *.js files in the current + # directory, in `..`, in `../..` and so on. + # + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' + typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= + + # Ruby version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 + # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Python version from asdf. + typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Go version from asdf. + typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Node.js version from asdf. + typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Rust version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' + + # .NET Core version from asdf. + typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 + # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Flutter version from asdf. + typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Lua version from asdf. + typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Java version from asdf. + typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Perl version from asdf. + typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 + # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Erlang version from asdf. + typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 + # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Elixir version from asdf. + typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Postgres version from asdf. + typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' + + # PHP version from asdf. + typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 + # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Haskell version from asdf. + typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172 + # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Julia version from asdf. + typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' + + ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### + # NordVPN connection indicator color. + typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 + # Hide NordVPN connection indicator when not connected. + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= + # Custom icon. + # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## + # Ranger shell color. + typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### + # Nnn shell color. + typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### + # Vim shell indicator color. + typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 + # Custom icon. + # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### + # Midnight Commander shell color. + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## + # Nix shell color. + typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 + + # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. + # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ disk_usage: disk usage ]################################## + # Colors for different levels of disk usage. + typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 + # Thresholds for different levels of disk usage (percentage points). + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 + # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. + typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false + # Custom icon. + # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ ram: free RAM ]####################################### + # RAM color. + typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 + # Custom icon. + # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################################[ swap: used swap ]###################################### + # Swap color. + typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 + # Custom icon. + # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ load: CPU load ]###################################### + # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. + typeset -g POWERLEVEL9K_LOAD_WHICH=5 + # Load color when load is under 50%. + typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 + # Load color when load is between 50% and 70%. + typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 + # Load color when load is over 70%. + typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 + # Custom icon. + # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ + # Todo color. + typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 + # Hide todo when the total number of tasks is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true + # Hide todo when the number of tasks after filtering is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false + + # Todo format. The following parameters are available within the expansion. + # + # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. + # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. + # + # These variables correspond to the last line of the output of `todo.sh -p ls`: + # + # TODO: 24 of 42 tasks shown + # + # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. + # + # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ + # Timewarrior color. + typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 + # If the tracked task is longer than 24 characters, truncate and append "…". + # Tip: To always display tasks without truncation, delete the following parameter. + # Tip: To hide task names and display just the icon when time tracking is enabled, set the + # value of the following parameter to "". + typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' + + # Custom icon. + # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## + # Taskwarrior color. + typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 + + # Taskwarrior segment format. The following parameters are available within the expansion. + # + # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. + # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. + # + # Zero values are represented as empty parameters. + # + # The default format: + # + # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' + # + # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ context: user@hostname ]################################## + # Context color when running with privileges. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 + # Context color in SSH without privileges. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 + # Default context color (no privileges, no SSH). + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 + + # Context format when running with privileges: bold user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' + # Context format when in SSH without privileges: user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' + # Default context format (no privileges, no SSH): user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' + + # Don't show context unless running with privileges or in SSH. + # Tip: Remove the next line to always show context. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' + + ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### + # Python virtual environment color. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 + # Don't show Python version next to the virtual environment name. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + # If set to "false", won't show virtualenv if pyenv is already shown. + # If set to "if-different", won't show virtualenv if it's the same as pyenv. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ anaconda: conda environment (https://conda.io/) ]###################### + # Anaconda environment color. + typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 + + # Anaconda segment format. The following parameters are available within the expansion. + # + # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. + # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. + # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). + # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). + # + # CONDA_PROMPT_MODIFIER can be configured with the following command: + # + # conda config --set env_prompt '({default_env}) ' + # + # The last argument is a Python format string that can use the following variables: + # + # - prefix The same as CONDA_PREFIX. + # - default_env The same as CONDA_DEFAULT_ENV. + # - name The last segment of CONDA_PREFIX. + # - stacked_env Comma-separated list of names in the environment stack. The first element is + # always the same as default_env. + # + # Note: '({default_env}) ' is the default value of env_prompt. + # + # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER + # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former + # is empty. + typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' + + # Custom icon. + # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ + # Pyenv color. + typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 + # Hide python version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) + # If set to false, hide python version if it's the same as global: + # $(pyenv version-name) == $(pyenv global). + typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide python version if it's equal to "system". + typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true + + # Pyenv segment format. The following parameters are available within the expansion. + # + # - P9K_CONTENT Current pyenv environment (pyenv version-name). + # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). + # + # The default format has the following logic: + # + # 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not + # empty and unequal to $P9K_CONTENT. + # 2. Otherwise display just "$P9K_CONTENT". + typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}' + + # Custom icon. + # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ + # Goenv color. + typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 + # Hide go version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) + # If set to false, hide go version if it's the same as global: + # $(goenv version-name) == $(goenv global). + typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide go version if it's equal to "system". + typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## + # Nodenv color. + typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 + # Hide node version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) + # If set to false, hide node version if it's the same as global: + # $(nodenv version-name) == $(nodenv global). + typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### + # Nvm color. + typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ + # Nodeenv color. + typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 + # Don't show Node version next to the environment name. + typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false + # Separate environment name from Node version only with a space. + typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############################[ node_version: node.js version ]############################### + # Node version color. + typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 + # Show node version only when in a directory tree containing package.json. + typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ go_version: go version (https://golang.org) ]######################## + # Go version color. + typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 + # Show go version only when in a go project subdirectory. + typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## + # Rust version color. + typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 + # Show rust version only when in a rust project subdirectory. + typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ + # .NET version color. + typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 + # Show .NET version only when in a .NET project subdirectory. + typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ php_version: php version (https://www.php.net/) ]###################### + # PHP version color. + typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 + # Show PHP version only when in a PHP project subdirectory. + typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### + # Laravel version color. + typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 + # Custom icon. + # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ####################[ java_version: java version (https://www.java.com/) ]#################### + # Java version color. + typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32 + # Show java version only when in a java project subdirectory. + typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true + # Show brief version. + typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false + # Custom icon. + # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### + # Package color. + typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117 + # Package format. The following parameters are available within the expansion. + # + # - P9K_PACKAGE_NAME The value of `name` field in package.json. + # - P9K_PACKAGE_VERSION The value of `version` field in package.json. + # + # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' + # Custom icon. + # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## + # Rbenv color. + typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 + # Hide ruby version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) + # If set to false, hide ruby version if it's the same as global: + # $(rbenv version-name) == $(rbenv global). + typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide ruby version if it's equal to "system". + typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## + # Rvm color. + typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 + # Don't show @gemset at the end. + typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false + # Don't show ruby- at the front. + typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ + # Fvm color. + typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### + # Lua color. + typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 + # Hide lua version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) + # If set to false, hide lua version if it's the same as global: + # $(luaenv version-name) == $(luaenv global). + typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide lua version if it's equal to "system". + typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ + # Java color. + typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 + # Hide java version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) + # If set to false, hide java version if it's the same as global: + # $(jenv version-name) == $(jenv global). + typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide java version if it's equal to "system". + typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ + # Perl color. + typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 + # Hide perl version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) + # If set to false, hide perl version if it's the same as global: + # $(plenv version-name) == $(plenv global). + typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide perl version if it's equal to "system". + typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ + # PHP color. + typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 + # Hide php version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) + # If set to false, hide php version if it's the same as global: + # $(phpenv version-name) == $(phpenv global). + typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide php version if it's equal to "system". + typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### + # Scala color. + typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 + # Hide scala version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) + # If set to false, hide scala version if it's the same as global: + # $(scalaenv version-name) == $(scalaenv global). + typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide scala version if it's equal to "system". + typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### + # Haskell color. + typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 + # Hide haskell version if it doesn't come from one of these sources. + # + # shell: version is set by STACK_YAML + # local: version is set by stack.yaml up the directory tree + # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) + typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) + # If set to false, hide haskell version if it's the same as in the implicit global project. + typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true + # Custom icon. + # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# + # Show kubecontext only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show kubecontext. + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile' + + # Kubernetes context classes for the purpose of using different colors, icons and expansions with + # different contexts. + # + # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current kubernetes context gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current kubernetes context is "deathray-testing/default", its class is TEST + # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 + # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext + # segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # Within the expansion the following parameters are always available: + # + # - P9K_CONTENT The content that would've been displayed if there was no content + # expansion defined. + # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE + # in the output of `kubectl config get-contexts`. If there is no + # namespace, the parameter is set to "default". + # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the + # output of `kubectl config get-contexts`. + # + # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), + # the following extra parameters are available: + # + # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. + # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. + # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. + # + # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, + # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=gke + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + # + # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=eks + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= + # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' + # Append the current context's namespace if it's not "default". + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' + + # Custom prefix. + # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' + + ################[ terraform: terraform workspace (https://www.terraform.io) ]################# + # Don't show terraform workspace if it's literally "default". + typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false + # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current terraform workspace gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current terraform workspace is "project_test", its class is TEST because "project_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# + # Show aws only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show aws. + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current AWS profile gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current AWS profile is "company_test", its class is TEST + # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 + # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# + # AWS Elastic Beanstalk environment color. + typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## + # Show azure only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show azure. + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + # Azure account name color. + typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 + # Custom icon. + # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### + # Show gcloud only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show gcloud. + typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' + # Google cloud color. + typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 + + # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or + # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative + # enough. You can use the following parameters in the expansions. Each of them corresponds to the + # output of `gcloud` tool. + # + # Parameter | Source + # -------------------------|-------------------------------------------------------------------- + # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' + # P9K_GCLOUD_ACCOUNT | gcloud config get-value account + # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project + # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. + # + # Obtaining project name requires sending a request to Google servers. This can take a long time + # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud + # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets + # set and gcloud prompt segment transitions to state COMPLETE. + # + # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL + # and COMPLETE. You can also hide gcloud in state PARTIAL by setting + # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and + # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. + typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' + typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' + + # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name + # this often. Negative value disables periodic polling. In this mode project name is retrieved + # only when the current configuration, account or project id changes. + typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 + + # Custom icon. + # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# + # Show google_app_cred only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show google_app_cred. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + + # Google application credentials classes for the purpose of using different colors, icons and + # expansions with different credentials. + # + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first + # element in each pair defines a pattern against which the current kubernetes context gets + # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion + # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION + # parameters, you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. + # The first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD + # '*:*test*:*' TEST + # '*' DEFAULT) + # + # If your current Google application credentials is "service_account deathray-testing x@y.com", + # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD # These values are examples that are unlikely + # '*:*test*:*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by + # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # You can use the following parameters in the expansion. Each of them corresponds to one of the + # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. + # + # Parameter | JSON key file field + # ---------------------------------+--------------- + # P9K_GOOGLE_APP_CRED_TYPE | type + # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id + # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' + + ###############################[ public_ip: public IP address ]############################### + # Public IP color. + typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 + # Custom icon. + # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ########################[ vpn_ip: virtual private network indicator ]######################### + # VPN IP color. + typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 + # When on VPN, show just an icon without the IP address. + # Tip: To display the private IP address when on VPN, remove the next line. + typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= + # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN + # to see the name of the interface. + typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*' + # If set to true, show one segment per matching network interface. If set to false, show only + # one segment corresponding to the first matching network interface. + # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. + typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false + # Custom icon. + # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### + # IP color. + typeset -g POWERLEVEL9K_IP_FOREGROUND=38 + # The following parameters are accessible within the expansion: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_IP_IP | IP address + # P9K_IP_INTERFACE | network interface + # P9K_IP_RX_BYTES | total number of bytes received + # P9K_IP_TX_BYTES | total number of bytes sent + # P9K_IP_RX_RATE | receive rate (since last prompt) + # P9K_IP_TX_RATE | send rate (since last prompt) + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}' + # Show information for the first network interface whose name matches this regular expression. + # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. + typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' + # Custom icon. + # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #########################[ proxy: system-wide http/https/ftp proxy ]########################## + # Proxy color. + typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ battery: internal battery ]################################# + # Show battery in red when it's below this level and not connected to power supply. + typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 + typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 + # Show battery in green when it's charging or fully charged. + typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 + # Show battery in yellow when it's discharging. + typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 + # Battery pictograms going from low to high level of charge. + typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' + # Don't show the remaining time to charge/discharge. + typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false + + #####################################[ wifi: wifi speed ]##################################### + # WiFi color. + typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). + # + # # Wifi colors and icons for different signal strength levels (low to high). + # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values + # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values + # + # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' + # + # The following parameters are accessible within the expansions: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_WIFI_SSID | service set identifier, a.k.a. network name + # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown + # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second + # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 + # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 + # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) + + ####################################[ time: current time ]#################################### + # Current time color. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%l:%M}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands as opposed to the default + # behavior where they contain the end times of their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=true + # Custom icon. + typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION="" + # Custom prefix. + # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' + + # Example of a user-defined prompt segment. Function prompt_example will be called on every + # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or + # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. + # + # Type `p10k help segment` for documentation and a more sophisticated example. + function prompt_example() { + p10k segment -f 208 -i '⭐' -t 'hello, %n' + } + + # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job + # is to generate the prompt segment for display in instant prompt. See + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # + # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function + # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k + # will replay these calls without actually calling instant_prompt_*. It is imperative that + # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this + # rule is not observed, the content of instant prompt will be incorrect. + # + # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If + # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. + function instant_prompt_example() { + # Since prompt_example always makes the same `p10k segment` calls, we can call it from + # instant_prompt_example. This will give us the same `example` prompt segment in the instant + # and regular prompts. + prompt_example + } + + # User-defined prompt segments can be customized the same way as built-in segments. + # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 + # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off + + function p10k-on-pre-prompt() { + # # Show empty line if it's the first prompt in the TTY. + # [[ $P9K_TTY == old ]] && p10k display 'empty_line'=show + # Show the first prompt line. + p10k display '1|*/left_frame'=show '2/right/(time|dir|status|command_execution_time)'=hide + } + + function p10k-on-post-prompt() { + # Hide the empty line and the first prompt line. + p10k display '1|*/left_frame'=hide '2/right/(time|dir|status|command_execution_time)'=show + } + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index e2da149..c0104ef 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -1,190 +1,206 @@ # https://github.com/NICHOLAS85/dotfiles/blob/xps_13_9365_refresh/.zshrc -# Used to programatically disable plugins when opening the terminal view in dolphin -if [[ $MYPROMPT = dolphin ]]; then - isdolphin=true -else +# Change shell behavior when opening the terminal view in dolphin. MYPROMPT set by konsole profile +if ! [[ $MYPROMPT = dolphin ]]; then isdolphin=false + # Use chpwd_recent_dirs to start new sessions from last working dir + # Populate dirstack with chpwd history 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}") - } + zstyle ':chpwd:*' recent-dirs-file "${TMPDIR:-/tmp}/chpwd-recent-dirs" + dirstack=($(awk -F"'" '{print $2}' ${$(zstyle -L ':chpwd:*' recent-dirs-file)[4]} 2>/dev/null)) + [[ ${PWD} = ${HOME} || ${PWD} = "." ]] && (){ + local dir + for dir ($dirstack){ + [[ -d "${dir}" ]] && { cd -q "${dir}"; break } + } + } 2>/dev/null +else + isdolphin=true fi -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. -# 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" +# Enable Powerlevel10k instant prompt +if [[ -r "${XDG_CACHE_HOME:-${HOME}/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + 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}" +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 +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" && \ + 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" fi -source "$ZINIT_HOME/$ZINIT_BIN_DIR_NAME/zinit.zsh" +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]}/" -fi +# A binary Zsh module which transparently and automatically compiles sourced scripts +module_path+=( "${HOME}/.zinit/bin/zmodules/Src" ) +zmodload zdharma/zplugin &>/dev/null # 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}"; } -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=(); -} +zt(){ zinit depth'3' lucid ${1/#[0-9][a-c]/wait"${1}"} "${@:2}"; } ################## -# Initial Prompt # # Annexes # # Config source # +# Prompt # ################## -zt light-mode for \ - pick'async.zsh' \ - mafredri/zsh-async \ - romkatv/powerlevel10k \ +zt light-mode blockf svn id-as for \ + https://github.com/NICHOLAS85/dotfiles/trunk/.zinit/snippets/config -zt for if'zct dolphin' \ - zdharma/null \ - if'zct p10k' \ - zdharma/null - -zt light-mode compile'*handler' for \ +# zcompile doesn't support Unicode file names, planned on using compile'*handler' ice. +# https://www.zsh.org/mla/workers/2020/msg01057.html +zt light-mode for \ zinit-zsh/z-a-patch-dl \ - zinit-zsh/z-a-bin-gem-node \ - zinit-zsh/z-a-submods - -zt light-mode blockf for \ - _local/config-files + zinit-zsh/z-a-submods \ + NICHOLAS85/z-a-linkman \ + NICHOLAS85/z-a-linkbin + +(){ # Load $MYPROMPT configuration and powerlevel10k + if [[ -f "${thmf}/${1}-pre.zsh" || -f "${thmf}/${1}-post.zsh" ]] && { + zt light-mode for \ + romkatv/powerlevel10k \ + id-as"${1}-theme" \ + atinit"[[ -f ${thmf}/${1}-pre.zsh ]] && source ${thmf}/${1}-pre.zsh" \ + atload"[[ -f ${thmf}/${1}-post.zsh ]] && source ${thmf}/${1}-post.zsh" \ + zdharma/null + } || print -P "%F{220}Theme \"${1}\" not found%f" +} "${MYPROMPT=p10k}" ########### # Plugins # ########### -zt atinit'HISTFILE="${HOME}/.histfile"' for \ - OMZL::history.zsh - ###################### # Trigger-load block # ###################### zt light-mode for \ - trigger-load'!x' \ - OMZ::plugins/extract/extract.plugin.zsh \ + trigger-load'!x' svn \ + OMZ::plugins/extract \ trigger-load'!man' \ ael-code/zsh-colored-man-pages \ - trigger-load'!ga;!gcf;!gclean;!gd;!glo;!grh;!gss' \ + trigger-load'!ga;!grh;!glo;!gd;!gcf;!gclean;!gss;!gcp' \ wfxr/forgit \ trigger-load'!zshz' blockf \ agkozak/zsh-z \ - trigger-load'!updatelocal' blockf \ + trigger-load'!updatelocal' blockf compile'f*/*~*.zwc' \ 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'!zhooks' \ + agkozak/zhooks \ + trigger-load'!gcomp' blockf \ + atclone'command rm -rf lib/*;git ls-files -z lib/ |xargs -0 git update-index --skip-worktree' \ + submods'RobSis/zsh-completion-generator -> lib/zsh-completion-generator; + nevesnunes/sh-manpage-completions -> lib/sh-manpage-completions' \ + atload' gcomp(){gencomp "${@}" && zinit creinstall -q ${ZINIT[SNIPPETS_DIR]}/config 1>/dev/null}' \ + Aloxaf/gencomp ################## # Wait'0a' block # ################## zt 0a light-mode for \ - OMZL::completion.zsh \ - if'false' ver'dev' \ - marlonrichert/zsh-autocomplete \ - has'systemctl' \ + OMZL::history.zsh \ OMZP::systemd/systemd.plugin.zsh \ OMZP::sudo/sudo.plugin.zsh \ - blockf \ + atload'zstyle ":completion:*" special-dirs false' \ + OMZL::completion.zsh \ + as'completion' atpull'zinit cclear' 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 + as'completion' nocompile mv'*.zsh -> _git' patch"${pchf}/%PLUGIN%.patch" reset \ + felipec/git-completion \ + ver'develop' atload'_zsh_autosuggest_start' \ + zsh-users/zsh-autosuggestions ################## # Wait'0b' block # ################## -zt 0b light-mode for \ - pack'no-dir-color-swap' patch"$pchf/%PLUGIN%.patch" reset \ +zt 0b light-mode patch"${pchf}/%PLUGIN%.patch" reset nocompile'!' for \ + atload'ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(__fz_zsh_completion)' \ + changyuheng/fz \ + atload'ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(autopair-insert)' \ + hlissner/zsh-autopair \ + pack'no-dir-color-swap' atload"zstyle ':completion:*' list-colors \${(s.:.)LS_COLORS}" \ trapd00r/LS_COLORS \ - compile'{hsmw-*,test/*}' \ + atload'add-zsh-hook chpwd @chwpd_dir-history-var; + add-zsh-hook zshaddhistory @append_dir-history-var; @chwpd_dir-history-var' \ + kadaan/per-directory-history \ + compile'h*' \ 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' \ + trackbinds bindmap'\e[1\;6D -> ^[[1\;5B; \e[1\;6C -> ^[[1\;5A' \ michaelxmcbride/zsh-dircycle \ + blockf nocompletions compile'functions/*~*.zwc' \ + marlonrichert/zsh-edit + +zt 0b light-mode for \ + blockf compile'lib/*f*~*.zwc' \ + Aloxaf/fzf-tab \ autoload'#manydots-magic' \ knu/zsh-manydots-magic \ - pick'autoenv.zsh' nocompletions \ - Tarrasch/zsh-autoenv \ + RobSis/zsh-reentry-hook \ atinit'zicompinit_fast; zicdreplay' atload'FAST_HIGHLIGHT[chroma-man]=' \ + atclone'(){local f;cd -q →*;for f (*~*.zwc){zcompile -Uz -- ${f}};}' \ + compile'.*fast*~*.zwc' nocompletions atpull'%atclone' \ 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 \ + pick'autoenv.zsh' nocompletions \ + Tarrasch/zsh-autoenv \ + atload'bindkey "${terminfo[kcuu1]}" history-substring-search-up; + bindkey "${terminfo[kcud1]}" history-substring-search-down' \ + zsh-users/zsh-history-substring-search ################## # 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 +zt 0c light-mode binary from'gh-r' lman lbin for \ + lbin'**/gh' atclone'./**/gh completion --shell zsh > _gh' atpull'%atclone' \ + cli/cli \ + atclone'./just --completions zsh > _just' atpull'%atclone' \ + casey/just \ + bpick'*linux64*' \ + zyedidia/micro \ + atclone'mv -f **/*.zsh _bat' atpull'%atclone' \ + @sharkdp/bat \ + @sharkdp/hyperfine \ + @sharkdp/fd 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 + lbin \ + laggardkernel/git-ignore \ + lbin from'gh-r' \ + Peltoche/lsd \ + lbin'!' patch"${pchf}/%PLUGIN%.patch" reset \ + kazhala/dotbare zt 0c light-mode null for \ - sbin"bin/git-dsf;bin/diff-so-fancy" \ - zdharma/zsh-diff-so-fancy \ - sbin \ + lbin'!**/winapps' patch"${pchf}/%PLUGIN%.patch" reset \ + Fmstrat/winapps \ + lbin'*d.sh;*n.sh' \ + bkw777/notify-send.sh \ + lbin'antidot* -> antidot' from'gh-r' atclone'./**/antidot* update 1>/dev/null' atpull'%atclone' \ + doron-cohen/antidot \ + lbin from'gh-r' bpick'*x_x86*' \ + charmbracelet/glow \ + lbin'nnn* -> nnn' from'gh-r' bpick'*nerd*' \ + jarun/nnn \ + lbin \ 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" \ + lbin'**/*nal;**/*nal-run' from'gh-r' \ + tycho-kirchner/shournal \ + lbin'*/delta;git-dsf' from'gh-r' patch"${pchf}/%PLUGIN%.patch" \ + dandavison/delta \ + lbin lman patch"${pchf}/%PLUGIN%.patch" reset \ nateshmbhat/rm-trash \ - sbin \ - kazhala/dotbare \ - id-as'Cleanup' nocd atinit'unset -f zct zt; SPACESHIP_PROMPT_ADD_NEWLINE=true; _zsh_autosuggest_bind_widgets' \ + lbin from'gh-r' dl'https://raw.githubusercontent.com/junegunn/fzf/master/man/man1/fzf.1' lman \ + junegunn/fzf \ + id-as'Cleanup' nocd atinit'unset -f zt; _zsh_autosuggest_bind_widgets' \ zdharma/null diff --git a/NICHOLAS85/bootstrap.sh b/NICHOLAS85/bootstrap.sh index 41b6e7c..93310ea 100644 --- a/NICHOLAS85/bootstrap.sh +++ b/NICHOLAS85/bootstrap.sh @@ -1,4 +1,3 @@ #!/usr/bin/env zsh -sudo apt install --yes tlp lscolors fd-find fzf -cargo install lsd +sudo apt install --yes tlp lscolors