From 09118f860f8781c4937996f02ce95909942f11f2 Mon Sep 17 00:00:00 2001 From: eeleater Date: Thu, 15 Dec 2022 14:51:35 +0100 Subject: [PATCH] use sheldon --- dot_config/sheldon/plugins.toml | 17 +++++++++++++++-- dot_config/zsh/rc.zsh | 23 ++++------------------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/dot_config/sheldon/plugins.toml b/dot_config/sheldon/plugins.toml index bd2ae5f..59152c9 100644 --- a/dot_config/sheldon/plugins.toml +++ b/dot_config/sheldon/plugins.toml @@ -1,9 +1,18 @@ shell = "zsh" [templates] -defer = "{% for file in files %}zsh-defer source \"{{ file }}\"\n{% endfor %}" -defer-more = "{% for file in files %}zsh-defer -t 0.5 source \"{{ file }}\"\n{% endfor %}" +defer = """{% for file in files %} +zsh-defer source "{{ file }}" +{% endfor %}""" +defer-more = """{% for file in files %} +zsh-defer -t 0.5 source "{{ file }}" +{% endfor %}""" + +# own files +[plugins.ownfiles] +local = "~/.config/zsh/" +use = ["{env,.p10k}.zsh"] [plugins.zsh-defer] github = "romkatv/zsh-defer" @@ -74,3 +83,7 @@ github = "romkatv/powerlevel10k" [plugins.own-files] local = "~/.config/zsh/" use = ["{aliases,keybinds,distroicon,transfer}.zsh"] + +[plugins.asdf] +local = "/opt/asdf-vm" +use = ["asdf.sh"] diff --git a/dot_config/zsh/rc.zsh b/dot_config/zsh/rc.zsh index 6f9fb20..cd68b67 100644 --- a/dot_config/zsh/rc.zsh +++ b/dot_config/zsh/rc.zsh @@ -6,14 +6,8 @@ bofh; echo " - BOFH" #hackerquotes #colorscript random -try_source () { test -r $1 && source $1 } - -# local env exports -try_source "$XDG_DATA_HOME"/zsh/env.zsh - -# Powerlevel10k - instant prompt and config -try_source "$XDG_CACHE_HOME"/p10k-instant-prompt-$USERNAME.zsh -try_source "$XDG_CONFIG_HOME"/zsh/.p10k.zsh # p10k configure +# powerlevel10k instant prompt +() { test -r $1 && source $1 } "$XDG_CACHE_HOME"/p10k-instant-prompt-$USERNAME.zsh # ensure zsh cache folder exists mkdir -p "$XDG_CACHE_HOME"/zsh &>/dev/null @@ -21,10 +15,8 @@ mkdir -p "$XDG_CACHE_HOME"/zsh &>/dev/null # compinit autoload -Uz compinit; compinit -d "$XDG_CACHE_HOME"/zsh/compdump -# antidote -try_source /usr/share/zsh-antidote/antidote.zsh -zstyle ':antidote:bundle' use-friendly-names 'yes' -antidote load +# source from sheldon +eval "$(sheldon source)" # other themes #_evalcache starship init zsh @@ -36,15 +28,8 @@ _evalcache dircolors -b /usr/share/LS_COLORS/LS_COLORS _evalcache atuin init zsh _evalcache navi widget zsh _evalcache direnv hook zsh -try_source /opt/asdf-vm/asdf.sh eval "$(keychain --dir "$XDG_CACHE_HOME"/keychain --eval --quiet id_rsa)" -# seperate configs -try_source "$ZDOTDIR"/aliases.zsh -try_source "$ZDOTDIR"/keybinds.zsh -try_source "$ZDOTDIR"/distroicon.zsh -try_source "$ZDOTDIR"/transfer.zsh - # ssh ignored patterns zstyle ':completion:*:*:*:users' ignored-patterns '*' zstyle ':completion:*:*:*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' '*localdomain*' '*.eeleater.org' '*.local' '*.hbz-nrw.de'