diff options
| author | seth <[email protected]> | 2022-08-30 07:45:34 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2022-08-30 07:45:34 -0400 |
| commit | bc8c2e6747757306a1b2aba531f7577f51d28650 (patch) | |
| tree | c39cdb169393c26052bd43863d80659223c82c91 /.config | |
| parent | 7ac25e0f42c96f78ddaaffa6df48844bfe6633e0 (diff) | |
make zsh dots a little better
Diffstat (limited to '.config')
| -rw-r--r-- | .config/zsh/.zsh_plugins.txt | 4 | ||||
| -rw-r--r-- | .config/zsh/.zshrc | 39 |
2 files changed, 32 insertions, 11 deletions
diff --git a/.config/zsh/.zsh_plugins.txt b/.config/zsh/.zsh_plugins.txt index 9f5f59b..2c765d6 100644 --- a/.config/zsh/.zsh_plugins.txt +++ b/.config/zsh/.zsh_plugins.txt @@ -1,3 +1,5 @@ -zsh-users/zsh-completions +zsh-users/zsh-completions kind:fpath path:src zsh-users/zsh-syntax-highlighting +# ohmyzsh/ohmyzsh path:lib/git.zsh +# halfo/lambda-mod-zsh-theme kind:zsh romkatv/powerlevel10k diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 9a83c30..fb7a675 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -2,30 +2,49 @@ # getchoo's zshrc # -antidote_dir="${ZDOTDIR}/.antidote" -# plugins :) -if [[ ! -d ${antidote_dir} ]] +# bootstrap antidote +antidote_dir="$ZDOTDIR/.antidote" +plugins_file="$ZDOTDIR/.zsh_plugins.txt" +static_file="$ZDOTDIR/.zsh_plugins.zsh" +zstyle ':antidote:bundle' use-friendly-names 'yes' # don't use ugly dirs + +if [[ ! "$static_file" -nt "$plugins_file" ]] then - git clone https://github.com/mattmc3/antidote.git ${antidote_dir} + [[ ! -e "$antidote_dir" ]] && \ + git clone --depth=1 https://github.com/mattmc3/antidote.git "$antidote_dir" + + source "$antidote_dir/antidote.zsh" + [[ ! -e "$plugins_file" ]] && touch "$plugins_file" + antidote bundle < "$plugins_file" > "$static_file" fi 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 -source $antidote_dir/antidote.zsh -antidote load -unset antidote_dir - # zmodules -autoload -U compinit +autoload -U compinit colors "$antidote_dir/antidote.zsh" +colors zmodload zsh/complist zstyle ':completion:*' menu select reshash true -compinit +zstyle ':completion::complete:*' use-cache on + +# load plugins +source "$static_file" +unset antidote_dir + +# compile completion +zdump="$ZDOTDIR/.zcompdump" +compinit -d "$zdump" +if [[ ! "$zdump.zwc" -nt "$zdump" ]] +then + zcompile "$zdump" +fi # options setopt append_history setopt inc_append_history +setopt prompt_subst setopt share_history # binds |
