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/00dani/zshrc.zsh b/00dani/zshrc.zsh index d47830f..49d743c 100644 --- a/00dani/zshrc.zsh +++ b/00dani/zshrc.zsh @@ -2,34 +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; 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 054738f..d03050d 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 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 @@ -22,12 +22,8 @@ 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)" +# Install zinit +RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" # Copy configs into home directory ARG FOLDER @@ -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 +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; \ @@ -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 -- 'zinit module build; @zinit-scheduler burst || true ' + +CMD zsh -i -l -CMD zsh 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/snippets/config/.svn/pristine/02/02c13ed091c78090552d22fc73c018aedfca9fbb.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/02/02c13ed091c78090552d22fc73c018aedfca9fbb.svn-base new file mode 100644 index 0000000..c4df5bc --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/02/02c13ed091c78090552d22fc73c018aedfca9fbb.svn-base @@ -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/.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/snippets/config/.svn/pristine/20/207c4e870581c3ca7f71482c9d65a80c6267ee6f.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/20/207c4e870581c3ca7f71482c9d65a80c6267ee6f.svn-base new file mode 100644 index 0000000..c4ab262 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/20/207c4e870581c3ca7f71482c9d65a80c6267ee6f.svn-base @@ -0,0 +1 @@ +fc -ln 0 | awk '{print $1}' | sort | uniq -c | sort -nr | head 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/snippets/config/.svn/pristine/4e/4e8d63f972c1464440650397af4cbdb3b4c776b3.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/4e/4e8d63f972c1464440650397af4cbdb3b4c776b3.svn-base new file mode 100644 index 0000000..8bb57e7 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/4e/4e8d63f972c1464440650397af4cbdb3b4c776b3.svn-base @@ -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/.svn/pristine/52/52ea6cd5f79134eab50820d2e509dafba6ce92fb.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/52/52ea6cd5f79134eab50820d2e509dafba6ce92fb.svn-base new file mode 100644 index 0000000..36f9584 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/52/52ea6cd5f79134eab50820d2e509dafba6ce92fb.svn-base @@ -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/.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/snippets/config/.svn/pristine/60/6040293f07123217c60427530e5d03f787e054de.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/60/6040293f07123217c60427530e5d03f787e054de.svn-base new file mode 100644 index 0000000..a9567a3 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/60/6040293f07123217c60427530e5d03f787e054de.svn-base @@ -0,0 +1,2 @@ +emulate -L zsh +lsd --group-dirs=first diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/6c/6c809a36d4f313ca52b075fd3bce3f88e880d695.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/6c/6c809a36d4f313ca52b075fd3bce3f88e880d695.svn-base new file mode 100644 index 0000000..3d0dad8 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/6c/6c809a36d4f313ca52b075fd3bce3f88e880d695.svn-base @@ -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/.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/snippets/config/.svn/pristine/77/7723bbaf7022143494bcd2ce157082e718b9ae27.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/77/7723bbaf7022143494bcd2ce157082e718b9ae27.svn-base new file mode 100644 index 0000000..b2a5f6a --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/77/7723bbaf7022143494bcd2ce157082e718b9ae27.svn-base @@ -0,0 +1 @@ +# config-files 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/snippets/config/.svn/pristine/93/936d1459f2c372e9bcc1a5d76d366096d0084949.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/93/936d1459f2c372e9bcc1a5d76d366096d0084949.svn-base new file mode 100644 index 0000000..979f031 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/93/936d1459f2c372e9bcc1a5d76d366096d0084949.svn-base @@ -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/.svn/pristine/93/93ab88a10a883a675a7ccc78eaef79e6831d56d4.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/93/93ab88a10a883a675a7ccc78eaef79e6831d56d4.svn-base new file mode 100644 index 0000000..05520c8 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/93/93ab88a10a883a675a7ccc78eaef79e6831d56d4.svn-base @@ -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/.svn/pristine/94/94668cb2ebb8349a9e6b247ae4a97746ea5c377e.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/94/94668cb2ebb8349a9e6b247ae4a97746ea5c377e.svn-base new file mode 100644 index 0000000..396d783 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/94/94668cb2ebb8349a9e6b247ae4a97746ea5c377e.svn-base @@ -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/.svn/pristine/97/97f14ef7096727665d7090f9ab87284726b08212.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/97/97f14ef7096727665d7090f9ab87284726b08212.svn-base new file mode 100644 index 0000000..ab0dc2b --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/97/97f14ef7096727665d7090f9ab87284726b08212.svn-base @@ -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/.svn/pristine/9b/9b28eb8ce43991079a894778e865b3a1831daa33.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/9b/9b28eb8ce43991079a894778e865b3a1831daa33.svn-base new file mode 100644 index 0000000..aa8b6b6 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/9b/9b28eb8ce43991079a894778e865b3a1831daa33.svn-base @@ -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/.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/snippets/config/.svn/pristine/c3/c3aad847a2a766ed8e09da49ec2aa29d29e4edd1.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/c3/c3aad847a2a766ed8e09da49ec2aa29d29e4edd1.svn-base new file mode 100644 index 0000000..7c6c218 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/c3/c3aad847a2a766ed8e09da49ec2aa29d29e4edd1.svn-base @@ -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/.svn/pristine/cb/cb570dd0186e46e553ccceb11d36bcd3e3c64f05.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/cb/cb570dd0186e46e553ccceb11d36bcd3e3c64f05.svn-base new file mode 100644 index 0000000..61a8778 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/cb/cb570dd0186e46e553ccceb11d36bcd3e3c64f05.svn-base @@ -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/.svn/pristine/d3/d375e7f3dcab0b9631d393efbd8f978db12be7ea.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/d3/d375e7f3dcab0b9631d393efbd8f978db12be7ea.svn-base new file mode 100644 index 0000000..c75e755 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/d3/d375e7f3dcab0b9631d393efbd8f978db12be7ea.svn-base @@ -0,0 +1,1446 @@ +# 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 ]========================= + 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 + # 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 + typeset -g 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=false + + # 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/snippets/config/.svn/pristine/d8/d8e8fc99befd65967d6e5d356a20ee469efab8dd.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/d8/d8e8fc99befd65967d6e5d356a20ee469efab8dd.svn-base new file mode 100644 index 0000000..74b3935 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/d8/d8e8fc99befd65967d6e5d356a20ee469efab8dd.svn-base @@ -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/snippets/config/.svn/pristine/e0/e0d1117c6080120c2d34c622e3cf57c928577d73.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e0/e0d1117c6080120c2d34c622e3cf57c928577d73.svn-base new file mode 100644 index 0000000..72cc25f --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e0/e0d1117c6080120c2d34c622e3cf57c928577d73.svn-base @@ -0,0 +1 @@ + zcat -qf /var/log/apt/history.log* | grep -Po '^Commandline: apt install (?!.*--reinstall)\K.*' 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/snippets/config/.svn/pristine/e5/e5588c8e0ee170a4e2465c61781ee9bcce80445c.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e5588c8e0ee170a4e2465c61781ee9bcce80445c.svn-base new file mode 100644 index 0000000..bdc3547 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e5588c8e0ee170a4e2465c61781ee9bcce80445c.svn-base @@ -0,0 +1,204 @@ +#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" +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,)" # 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 _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 diff --git a/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e590eb7ad1e07095165decc9055d7fb5cda55424.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e590eb7ad1e07095165decc9055d7fb5cda55424.svn-base new file mode 100644 index 0000000..a6ac913 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e5/e590eb7ad1e07095165decc9055d7fb5cda55424.svn-base @@ -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/.svn/pristine/e8/e8b18f011cef1c0110bad99d713dcb9aba2f16d2.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e8/e8b18f011cef1c0110bad99d713dcb9aba2f16d2.svn-base new file mode 100644 index 0000000..6c77007 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/e8/e8b18f011cef1c0110bad99d713dcb9aba2f16d2.svn-base @@ -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/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/snippets/config/.svn/pristine/eb/eb4823aefc48bf4cd35e7a61e22a0750ad1e38e6.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/eb/eb4823aefc48bf4cd35e7a61e22a0750ad1e38e6.svn-base new file mode 100644 index 0000000..d5fe52b --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/eb/eb4823aefc48bf4cd35e7a61e22a0750ad1e38e6.svn-base @@ -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/.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/snippets/config/.svn/pristine/fc/fc6c981c59123f219de90b451160c9b9e1d7781e.svn-base b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/fc/fc6c981c59123f219de90b451160c9b9e1d7781e.svn-base new file mode 100644 index 0000000..7785f50 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/.svn/pristine/fc/fc6c981c59123f219de90b451160c9b9e1d7781e.svn-base @@ -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/.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 0000000..7e48852 Binary files /dev/null and b/NICHOLAS85/.zinit/snippets/config/.svn/wc.db differ 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/snippets/config/functions/mcsvr b/NICHOLAS85/.zinit/snippets/config/functions/mcsvr new file mode 100644 index 0000000..a1ccb55 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/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 ] && 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/snippets/config/functions/zicompinit_fast b/NICHOLAS85/.zinit/snippets/config/functions/zicompinit_fast new file mode 100644 index 0000000..3f5de65 --- /dev/null +++ b/NICHOLAS85/.zinit/snippets/config/functions/zicompinit_fast @@ -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/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/.zplugin/user/personal b/NICHOLAS85/.zplugin/user/personal deleted file mode 100644 index 8f89cfd..0000000 --- a/NICHOLAS85/.zplugin/user/personal +++ /dev/null @@ -1,177 +0,0 @@ -#Let Atom highlight this: -*- shell-script -*- - -######################### -# Variables # -######################### - -HISTFILE="${HOME}/.histfile" - -ZSH_AUTOSUGGEST_USE_ASYNC=true -ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=50 - -colorlscommand=(lsd --group-dirs first) -colorlsgitcommand=(colorls --gs -A) - -AUTO_LS_COMMANDS=(modecheck colorls) -AUTO_LS_COMMANDSBAT=(ls) -AUTO_LS_NEWLINE=false - -EDITOR=kate - -rm_opts=(-I -v) - -# Directory checked for locally built projects (plugin updatelocal) -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) -else - # Used to programatically disable plugins when opening the terminal view in dolphin - if [[ $(ps -ocommand= -p $PPID) =~ "dolphin" ]]; then - isdolphin=true - 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 # -######################### - -# Allows leaving from deleted directories -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 "zshconfatom"='atom $ZPLGM[HOME_DIR]/user/theme $ZPLGM[HOME_DIR]/user/personal ${HOME}/.zshrc &!' - -# 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 apt="apt-fast" -#alias open='xdg-open' -# allow sudo to expand aliases (checkinstall for example) 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 -' - -unalias zplg - -if [[ -n $SSH_CONNECTION ]]; then - alias ls="lsd --group-dirs=first --icon=never" -fi - -######################### -# 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 # 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 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 - -# Fuzzy matching of completions for when you mistype them: -zstyle ':completion:*' completer _complete _match _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:*: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:*' rehash true - -bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word -bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word diff --git a/NICHOLAS85/.zplugin/user/theme b/NICHOLAS85/.zplugin/user/theme deleted file mode 100644 index 7c0e662..0000000 --- a/NICHOLAS85/.zplugin/user/theme +++ /dev/null @@ -1,39 +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 - 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 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/NICHOLAS85/.zshrc b/NICHOLAS85/.zshrc index f81c4c0..c0104ef 100644 --- a/NICHOLAS85/.zshrc +++ b/NICHOLAS85/.zshrc @@ -1,122 +1,206 @@ -# https://github.com/NICHOLAS85/dotfiles/blob/master/.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)" - 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 +# https://github.com/NICHOLAS85/dotfiles/blob/xps_13_9365_refresh/.zshrc + +# 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:-/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 -### Added by Zplugin's installer -source "${HOME}/.zplugin/bin/zplugin.zsh" -autoload -Uz _zplugin -(( ${+_comps} )) && _comps[zplugin]=_zplugin -### End of Zplugin's installer chunk - -# Functions to make configuration less verbose -zt() { zplugin ice wait"${1}" lucid "${@:2}"; } # Turbo -z() { [ -z $2 ] && zplugin light "${@}" || zplugin "${@}"; } # zplugin - -# 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 -zt "" atinit'ZSH_CACHE_DIR="$HOME/.zcompcache"' -z snippet OMZ::lib/history.zsh - -zt 0a -z snippet OMZ::lib/completion.zsh - -# Plugins - -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 - -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 0b has'git' as'command' -z paulirish/git-open - -zt 0b 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 -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 }' -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' -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'!' -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 nocompletions -z hlissner/zsh-autopair - -zt 0a blockf atpull'zplugin creinstall -q .' -z zsh-users/zsh-completions - -zt '[[ $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 - -source "$ZPLGM[HOME_DIR]/user/personal" +# 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 -zt 0b atinit'_zpcompinit_fast; zpcdreplay' -z zdharma/fast-syntax-highlighting +ZINIT_HOME="${ZINIT_HOME:-${ZPLG_HOME:-${ZDOTDIR:-${HOME}}/.zinit}}" +ZINIT_BIN_DIR_NAME="${${ZINIT_BIN_DIR_NAME:-${ZPLG_BIN_DIR_NAME}}:-bin}" +### Added by Zinit's installer +if [[ ! -f "${ZINIT_HOME}/${ZINIT_BIN_DIR_NAME}/zinit.zsh" ]]; then + print -P "%F{33}▓▒░ %F{220}Installing DHARMA Initiative Plugin Manager (zdharma/zinit)…%f" + command mkdir -p "${ZINIT_HOME}" && command chmod g-rwX "${ZINIT_HOME}" + command git clone https://github.com/zdharma/zinit "${ZINIT_HOME}/${ZINIT_BIN_DIR_NAME}" && \ + print -P "%F{33}▓▒░ %F{34}Installation successful.%f" || \ + print -P "%F{160}▓▒░ The clone has failed.%f" +fi +source "${ZINIT_HOME}/${ZINIT_BIN_DIR_NAME}/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit +### End of Zinit installer's chunk -zt 0c id-as'Cleanup' atinit'unset -f zt z' -z zdharma/null +# A binary Zsh module which transparently and automatically compiles sourced scripts +module_path+=( "${HOME}/.zinit/bin/zmodules/Src" ) +zmodload zdharma/zplugin &>/dev/null -#dotscheck +# 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 +zt(){ zinit depth'3' lucid ${1/#[0-9][a-c]/wait"${1}"} "${@:2}"; } + +################## +# Annexes # +# Config source # +# Prompt # +################## + +zt light-mode blockf svn id-as for \ + https://github.com/NICHOLAS85/dotfiles/trunk/.zinit/snippets/config + +# 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-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 # +########### + +###################### +# Trigger-load block # +###################### + +zt light-mode for \ + trigger-load'!x' svn \ + OMZ::plugins/extract \ + trigger-load'!man' \ + ael-code/zsh-colored-man-pages \ + trigger-load'!ga;!grh;!glo;!gd;!gcf;!gclean;!gss;!gcp' \ + wfxr/forgit \ + trigger-load'!zshz' blockf \ + agkozak/zsh-z \ + trigger-load'!updatelocal' blockf compile'f*/*~*.zwc' \ + NICHOLAS85/updatelocal \ + 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::history.zsh \ + OMZP::systemd/systemd.plugin.zsh \ + OMZP::sudo/sudo.plugin.zsh \ + atload'zstyle ":completion:*" special-dirs false' \ + OMZL::completion.zsh \ + as'completion' atpull'zinit cclear' blockf \ + zsh-users/zsh-completions \ + 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 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 \ + 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 \ + 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 \ + 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 \ + 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 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 \ + lbin \ + laggardkernel/git-ignore \ + lbin from'gh-r' \ + Peltoche/lsd \ + lbin'!' patch"${pchf}/%PLUGIN%.patch" reset \ + kazhala/dotbare + +zt 0c light-mode null for \ + 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 \ + 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 \ + 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 515ff64..93310ea 100644 --- a/NICHOLAS85/bootstrap.sh +++ b/NICHOLAS85/bootstrap.sh @@ -1,4 +1,3 @@ #!/usr/bin/env zsh -sudo apt install --yes tlp -cargo install lsd +sudo apt install --yes tlp lscolors diff --git a/README.md b/README.md index dc5c865..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 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) +![Starting search](https://raw.githubusercontent.com/zdharma/zinit-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) +![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/agkozak/.profile b/agkozak/.profile new file mode 100644 index 0000000..3c418b4 --- /dev/null +++ b/agkozak/.profile @@ -0,0 +1,148 @@ +# ~/.profile: executed by the command interpreter for login shells. +# +# https://github.com/agkozak/dotfiles +# +# 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' +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='| 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 + +# }}}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 + +# }}}1 + +# vim: fdm=marker:ts=2:sts=2:sw=2:ai:et diff --git a/agkozak/.shrc b/agkozak/.shrc new file mode 100644 index 0000000..496fef5 --- /dev/null +++ b/agkozak/.shrc @@ -0,0 +1,364 @@ +# ~/.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 {{{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" + +# }}}1 + +# Begin .shrc benchmark {{{1 + +_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 + +# }}}1 + +# 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 + +# Miscellaneous {{{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 + +# }}}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 + +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 {{{1 + +# zsh might be running in ksh emulation mode +if [ "$0" = 'ksh' ] || [ -z "$ZSH_VERSION" ]; then + stty -ixon +fi + +# }}}1 + +# End .shrc benchmark {{{1 + +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 + +# }}}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/.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..109fd08 --- /dev/null +++ b/agkozak/.zshenv @@ -0,0 +1,46 @@ +# ~/.zshenv +# +# https://github.com/agkozak/dotfiles + +# Benchmarks {{{1 + +typeset -F SECONDS=0 + +# }}}1 + +# if ~/.profile has not been loaded and /etc/zsh/zshenv has {{{1 + +if [[ -z $ENV ]] && [[ -n $PATH ]]; then + case $- in + *l*) ;; + *) [[ -f ${HOME}/.profile ]] && source ${HOME}/.profile ;; + esac +fi + +# }}}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 + source /etc/profile.d/apps-bin-path.sh + emulate zsh + fi +fi + +# }}}1 + +# source ~/.zshenv.local {{{1 + +[[ -f ${HOME}/.zshenv.local ]] && source ${HOME}/.zshenv.local + +# }}}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 new file mode 100644 index 0000000..306f0d0 --- /dev/null +++ b/agkozak/.zshrc @@ -0,0 +1,568 @@ +# ~/.zshrc +# +# https://github.com/agkozak/dotfiles +# +# shellcheck disable=SC1090,SC2034,SC2128,SC2148,SC2154 + +# 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 +# +# 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 + +# zinit {{{1 + +if (( AGKDOT_NO_ZPLUGIN != 1 )) && is-at-least 5; then + + # Optional binary module + if [[ -f "$HOME/.zinit/bin/zmodules/Src/zdharma/zplugin.so" ]]; then + module_path+=( "$HOME/.zinit/bin/zmodules/Src" ) + zmodload zdharma/zplugin + fi + + if whence -w git &> /dev/null; then + + if [[ ! -d ${HOME}/.zinit/bin ]]; then + print 'Installing zinit...' + mkdir -p "${HOME}/.zinit" + git clone https://github.com/zdharma/zinit.git "${HOME}/.zinit/bin" + compile_or_recompile "${HOME}/.zinit/bin/zinit.zsh" + fi + + # Configuration hash + typeset -A ZINIT + + # Location of .zcompdump file + ZINIT[ZCOMPDUMP_PATH]="${HOME}/.zcompdump_${ZSH_VERSION}" + + # zinit and its plugins and snippets + source "${HOME}/.zinit/bin/zinit.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 + zinit ver"develop" for agkozak/agkozak-zsh-prompt + + # zinit light agkozak/polyglot + # if which kubectl &> /dev/null; then + # zinit light jonmosco/kube-ps1 + # zinit 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 + + 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 + zinit lucid wait for jreese/zsh-titles + fi + + if [[ $AGKDOT_SYSTEMINFO != *ish* ]]; then + zinit lucid wait for zdharma/zui + zinit lucid wait'1' for zdharma/zbrowse + fi + + zinit snippet OMZ::plugins/extract/extract.plugin.zsh + + 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 + 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 + zinit ice \ + atload'unset "FAST_HIGHLIGHT[chroma-git]"; fast-theme free &> /dev/null' \ + lucid wait + else + zinit ice atload'fast-theme free &> /dev/null' lucid wait + fi + zinit 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 && zinit 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}/.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 +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 + +# 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}" + +# }}}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 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 diff --git a/jubi/.zshrc b/jubi/.zshrc new file mode 100644 index 0000000..aaf1918 --- /dev/null +++ b/jubi/.zshrc @@ -0,0 +1,50 @@ +### Added by Zinit's installer +source ~/.zinit/bin/zinit.zsh +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit +### End of Zinit installer's chunk + +##### BEGIN Zinit stuff ##### +### needs: zinit, fzf + +# z +zinit ice wait blockf lucid +zinit light rupa/z + +# z tab completion +zinit ice wait lucid +zinit light changyuheng/fz + +# z / fzf (ctrl-g) +zinit ice wait lucid +zinit light andrewferrier/fzf-z + +# cd +zinit ice wait lucid +zinit 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 +zinit ice wait lucid atload'__bind_history_keys' +zinit light zsh-users/zsh-history-substring-search + +# autosuggestions, trigger precmd hook upon load +zinit ice wait lucid atload'_zsh_autosuggest_start' +zinit light zsh-users/zsh-autosuggestions +export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=10 + +# Tab completions +zinit ice wait lucid blockf atpull'zinit creinstall -q .' +zinit light zsh-users/zsh-completions + +# Syntax highlighting +zinit ice wait lucid atinit'zpcompinit; zpcdreplay' +zinit light zdharma/fast-syntax-highlighting + +##### END Zinit stuff ##### diff --git a/jubi/bootstrap.sh b/jubi/bootstrap.sh new file mode 100644 index 0000000..7c4e76b --- /dev/null +++ b/jubi/bootstrap.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env zsh + +case `uname` in + Darwin) + brew install fzf + ;; + Linux) + # No such package + # sudo apt install fzf + : + ;; +esac 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/.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/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/.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 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/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 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' 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/psprint/bootstrap.sh b/psprint/bootstrap.sh index 62d78fb..b45dfee 100644 --- a/psprint/bootstrap.sh +++ b/psprint/bootstrap.sh @@ -1,6 +1,8 @@ #!/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 libfreetype6-dev libfontconfig-dev \ + autoconf automake nodejs npm # For zdharma/zredis sudo mkdir -p usr/local/var/db/redis 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 diff --git a/psprint/zshrc.zsh b/psprint/zshrc.zsh index d880c0c..0f94865 100644 --- a/psprint/zshrc.zsh +++ b/psprint/zshrc.zsh @@ -2,7 +2,7 @@ # 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} @@ -23,12 +23,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 +setopt rc_quotes extendedglob notify #setopt IGNORE_EOF #setopt NO_SHORT_LOOPS @@ -92,12 +92,13 @@ 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" +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" @@ -160,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' @@ -177,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" @@ -189,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 \ @@ -198,8 +201,11 @@ 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 deploy-message +autoload +X zman +functions[zzman]="${functions[zman]}" function run_diso { sh -c "$@" & disown @@ -210,7 +216,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 } @@ -228,10 +234,10 @@ osxnotify() { localbin_on -PS1="READY > " +#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 plg-zsh-notify palette() { local colors; for n in {000..255}; do colors+=("%F{$n}$n%f"); done; print -cP $colors; } @@ -245,188 +251,208 @@ zflai-msg "[zshrc] ssl tunnel PID: $!" typeset -F4 SECONDS=0 -source "$HOME/.zplugin/bin/zplugin.zsh" -autoload -Uz _zplugin -(( ${+_comps} )) && _comps[zplugin]=_zplugin - -# Assign each zsh session an unique ID, available in -# ZUID_ID and also a codename (ZUID_CODENAME) -zplugin load zdharma/zsh-unique-id +[[ ! -f ~/.zinit/bin/zinit.zsh ]] && { + command mkdir -p ~/.zinit + command git clone https://github.com/zdharma/zinit ~/.zinit/bin +} -# Loaded mostly to stay in touch with the plugin (for the users) +source "$HOME/.zinit/bin/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit + +# Zplugin annexes +# zinit-zsh/z-a-man \ +zinit light-mode for \ + zinit-zsh/z-a-as-monitor \ + zinit-zsh/z-a-patch-dl \ + zinit-zsh/z-a-submods \ + zinit-zsh/z-a-bin-gem-node \ + zinit-zsh/z-a-rust + +# Fast-syntax-highlighting & autosuggestions +zinit wait lucid for \ + atinit"ZINIT[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" \ + zdharma/fast-syntax-highlighting \ + atload"!_zsh_autosuggest_start" \ + zsh-users/zsh-autosuggestions \ + blockf \ + zsh-users/zsh-completions + +# 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"0" 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 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"git reset --hard; sed -i \ - '/DIR/c\DIR 38;5;63;1' LS_COLORS; \ - dircolors -b LS_COLORS > c.zsh" \ - atpull'%atclone' pick"c.zsh" nocompile'!' -zplugin light trapd00r/LS_COLORS - -# Zconvey shell integration plugin -zplugin ice wait"0" silent -zplugin load zdharma/zconvey - -# 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 - -# fzy -zplugin ice wait'1' lucid as"command" 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'0' 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 load urbainvaes/fzf-marks - -# 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 load zdharma/zredis - -# a service that runs the redis database, in background, single instance -zplugin ice service"redis" lucid wait"1" -zplugin light zservices/redis - -# zsh-editing-workbench & zsh-navigation-tools -zplugin ice wait"0" lucid -zplugin load psprint/zsh-editing-workbench -zplugin ice wait"0" 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 - -# Github-Issue-Tracker – the notifier thread -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 - -# Github-Issue-Tracker – the issue-puller thread -GIT_PROJECTS=zdharma/zsh-github-issues:zdharma/zplugin - -zplugin ice service"GIT" pick"zsh-github-issues.service.zsh" wait'2' lucid -zplugin light zdharma/zsh-github-issues +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 ice load'![[ $MYPROMPT = 1 ]]' unload'![[ $MYPROMPT != 1 ]]' atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3' lucid -zplugin load psprint/zprompts +zinit lucid \ + load'![[ $MYPROMPT = 1 ]]' \ + unload'![[ $MYPROMPT != 1 ]]' \ + atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3 yellow red green blue' \ + nocd for \ + psprint/zprompts # Theme no. 2 – lambda-mod-zsh-theme -zplugin ice load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' lucid -zplugin load halfo/lambda-mod-zsh-theme +zinit lucid load'![[ $MYPROMPT = 2 ]]' unload'![[ $MYPROMPT != 2 ]]' nocd for \ + halfo/lambda-mod-zsh-theme # Theme no. 3 – lambda-gitster -zplugin ice load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' lucid -zplugin load ergenekonyigit/lambda-gitster +zinit lucid load'![[ $MYPROMPT = 3 ]]' unload'![[ $MYPROMPT != 3 ]]' nocd for \ + 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 load geometry-zsh/geometry +# Theme no. 4 – geometry +zinit lucid load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ + atload'!geometry::prompt' nocd \ + atinit'GEOMETRY_COLOR_DIR=63 GEOMETRY_PATH_COLOR=63' for \ + geometry-zsh/geometry # Theme no. 5 – pure -zplugin ice ice load'![[ $MYPROMPT = 5 ]]' unload'![[ $MYPROMPT != 5 ]]' \ - multisrc"{async,pure}.zsh" pick"/dev/null" idas"my/pure/login" -zplugin load sindresorhus/pure +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 -AGKOZAK_FORCE_ASYNC_METHOD=subst-async -zplugin ice ice load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' lucid -zplugin load agkozak/agkozak-zsh-theme +zinit lucid load'![[ $MYPROMPT = 6 ]]' unload'![[ $MYPROMPT != 6 ]]' \ + atload'!_agkozak_precmd' nocd atinit'AGKOZAK_FORCE_ASYNC_METHOD=subst-async' for \ + agkozak/agkozak-zsh-theme # 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' -zplugin load robobenklein/zinc +zinit load'![[ $MYPROMPT = 7 ]]' unload'![[ $MYPROMPT != 7 ]]' \ + compile"{zinc_functions/*,segments/*,zinc.zsh}" nocompletions \ + atload'!prompt_zinc_setup; prompt_zinc_precmd' nocd for \ + robobenklein/zinc -# ZUI and Crasis -zplugin ice wait"1" lucid -zplugin load zdharma/zui -zplugin ice wait'[[ -n ${ZLAST_COMMANDS[(r)cras*]} ]]' lucid -zplugin load zdharma/zplugin-crasis +# 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 -# Gitignore plugin – commands gii and gi -zplugin ice wait"2" lucid -zplugin load voronkovich/gitignore.plugin.zsh +# zunit, color +zinit wait"2" lucid as"null" for \ + sbin atclone"./build.zsh" atpull"%atclone" \ + molovo/zunit \ + sbin"color.zsh -> color" \ + molovo/color + +# revolver +zinit wait"2" lucid as"program" pick"revolver" for psprint/revolver + +zinit pack for dircolors-material -# Autosuggestions & fast-syntax-highlighting -zplugin ice wait"0" atload"_zsh_autosuggest_start" lucid -zplugin load zsh-users/zsh-autosuggestions -zplugin ice wait"1" atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" lucid -zplugin load zdharma/fast-syntax-highlighting +# Zconvey shell integration plugin +zinit wait lucid \ + sbin"cmds/zc-bg-notify" sbin"cmds/plg-zsh-notify" for \ + zdharma/zconvey + +# zsh-startify, a vim-startify like plugin +: zinit wait"0b" lucid atload"zsh-startify" for zdharma/zsh-startify +: zinit wait lucid pick"manydots-magic" compile"manydots-magic" for knu/zsh-manydots-magic -# 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 +# remark +zinit pack for remark -# ogham/exa, replacement for ls -zplugin ice from"gh-r" as"command" mv"exa* -> exa" wait'2' lucid -zplugin light ogham/exa +# zsh-autopair +# fzf-marks, at slot 0, for quick Ctrl-G accessibility +zinit wait lucid for \ + hlissner/zsh-autopair \ + urbainvaes/fzf-marks + +# A few wait"1 plugins +zinit wait"1" lucid for \ + psprint/zsh-navigation-tools \ + atinit'zstyle ":history-search-multi-word" page-size "7"' \ + zdharma/history-search-multi-word \ + atinit"local zew_word_style=whitespace" \ + psprint/zsh-editing-workbench -# vramsteg -zplugin ice wait"2" lucid as'command' pick'src/vramsteg' \ - atclone'cmake .' atpull'%atclone' make -zplugin load psprint/vramsteg-zsh +# Github-Issue-Tracker – the notifier thread +zinit lucid id-as"GitHub-notify" \ + on-update-of'~/.cache/zsh-github-issues/new_titles.log' \ + notify'New issue: $NOTIFY_MESSAGE' for \ + zdharma/zsh-github-issues -# zsh-diff-so-fancy -zplugin ice wait"2" lucid as"program" pick"bin/git-dsf" -zplugin load zdharma/zsh-diff-so-fancy +# Github-Issue-Tracker – the issue-puller thread +GIT_SLEEP_TIME=700 +GIT_PROJECTS=zdharma/zsh-github-issues:zdharma/zinit -# git-now -zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-now" make"prefix=$ZPFX install" -zplugin load iwata/git-now +zinit wait"2" lucid service"GIT" \ + pick"zsh-github-issues.service.zsh" for \ + zdharma/zsh-github-issues -# git-extras -zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-alias" make"PREFIX=$ZPFX" -zplugin load tj/git-extras +# Gitignore plugin – commands gii and gi +zinit wait"2" lucid trigger-load'!gi;!gii' \ + dl'https://gist.githubusercontent.com/psprint/1f4d0a3cb89d68d3256615f247e2aac9/raw -> templates/Zsh.gitignore' \ + for \ + voronkovich/gitignore.plugin.zsh + +# F-Sy-H automatic themes – available for patrons +# https://patreon.com/psprint +: zinit wait"1" lucid from"psprint@gitlab.com" for psprint/fsh-auto-themes + +# 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 + +# fzf, fzy +zinit pack"bgn-binary" for fzf +zinit pack"bgn" for fzy + +# A few wait'2' plugins +zinit wait"2" lucid for \ + zdharma/declare-zsh \ + zdharma/zflai \ + blockf \ + zdharma/zui \ + zinit-zsh/zinit-console \ + trigger-load'!crasis' \ + zdharma/zinit-crasis \ + atinit"forgit_ignore='fgi'" \ + wfxr/forgit # 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 pick"git-recall" as"command" -zplugin load Fakerr/git-recall - -: zplugin ice wait"0" blockf lucid -: zplugin light marzocchi/zsh-notify -: zplugin ice wait"0" 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 +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 +zinit as"null" wait"3" lucid for \ + sbin Fakerr/git-recall \ + sbin paulirish/git-open \ + sbin paulirish/git-recent \ + sbin davidosomething/git-my \ + sbin atload"export _MENU_THEME=legacy" \ + arzzen/git-quick-stats \ + sbin iwata/git-now \ + make"PREFIX=$ZPFX" tj/git-extras \ + sbin"bin/git-dsf;bin/diff-so-fancy" zdharma/zsh-diff-so-fancy \ + sbin"git-url;git-guclone" make"GITURL_NO_CGITURL=1" zdharma/git-url + +# fbterm +: zinit wait"3" lucid as"command" \ + pick"$ZPFX/bin/fbterm" \ + dl"https://bugs.archlinux.org/task/46860?getfile=13513 -> ins.patch" \ + dl"https://aur.archlinux.org/cgit/aur.git/plain/0001-Fix-build-with-gcc-6.patch?h=fbterm-git" \ + patch"ins.patch; 0001-Fix-build-with-gcc-6.patch" \ + atclone"./configure --prefix=$ZPFX" \ + atpull"%atclone" \ + make"install" reset for \ + izmntuk/fbterm + +# asciinema +: zinit wait lucid as"command" \ + atinit"export PYTHONPATH=$ZPFX/lib/python3.7/site-packages/" \ + atclone"PYTHONPATH=$ZPFX/lib/python3.7/site-packages/ \ + python3 setup.py --quiet install --prefix $ZPFX" \ + atpull'%atclone' test'0' \ + pick"$ZPFX/bin/asciinema" for \ + asciinema/asciinema + +# Notifications, configured to use zconvey +: zinit wait lucid for marzocchi/zsh-notify zflai-msg "[zshrc] Zplugin block took ${(M)$(( SECONDS * 1000 ))#*.?} ms" @@ -439,21 +465,21 @@ 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 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 { 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 -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 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