diff --git a/dot_config/sheldon/plugins.toml b/dot_config/sheldon/plugins.toml index 0f576bd..3cf499e 100644 --- a/dot_config/sheldon/plugins.toml +++ b/dot_config/sheldon/plugins.toml @@ -10,32 +10,44 @@ zsh-defer -t 0.5 source "{{ file }}" {% endfor %}""" # own files -[plugins.ownfiles] -local = "~/.config/zsh/" -use = ["{env,.p10k,aliases,keybinds,distroicon,transfer}.zsh"] +[plugins.localenv] +local = "~/.local/share/zsh/" +use = ["env.zsh"] -[plugins.zsh-defer] -github = "romkatv/zsh-defer" +[plugins.p10kconfig] +local = "~/.config/zsh/" +use = [".p10k.zsh"] + +[plugins.ownfiles] +local = "~/.config/zsh/files/" +use = ["{compinit,aliases,keybinds,distroicon,transfer}.zsh"] # completions -[plugins.zsh-completions] +[plugins.completions] github = "zsh-users/zsh-completions" +# lscolors +[plugins.lscolors] +github = "trapd00r/LS_COLORS" + # plugins -[plugins.ohmyzsh-lib] +[plugins.zshdefer] +github = "romkatv/zsh-defer" + +[plugins.ohmyzshlib] github = "ohmyzsh/ohmyzsh" dir = "lib" use = ["{completion,key-bindings,history,directories}.zsh"] -[plugins.ohmyzsh-plugins] +[plugins.ohmyzshplugins] github = "ohmyzsh/ohmyzsh" dir = "plugins" use = ["{systemd,fzf,command-not-found}/*.plugin.zsh"] -[plugins.fzf-tab] +[plugins.fzftab] github = "Aloxaf/fzf-tab" -[plugins.fzf-marks] +[plugins.fzfmarks] github = "urbainvaes/fzf-marks" [plugins.evalcache] @@ -44,41 +56,40 @@ github = "mroth/evalcache" [plugins.colorize] github = "zpm-zsh/colorize" -[plugins.ssh] -github = "zpm-zsh/ssh" - -[plugins.wakatime-zsh-plugin] +[plugins.wakatime] github = "sobolevn/wakatime-zsh-plugin" -[plugins.zsh-titles] +[plugins.titles] github = "amyreese/zsh-titles" -[plugins.zsh-thefuck] +[plugins.thefuck] github = "laggardkernel/zsh-thefuck" [plugins.oath] github = "alexdesousa/oath" -[plugins.zsh-exa] +[plugins.exa] github = "TwoPizza9621536/zsh-exa" -[plugins.zsh-bat] +[plugins.bat] github = "fdellwing/zsh-bat" -[plugins.zsh-you-should-use] +[plugins.youshoulduse] github = "MichaelAquilina/zsh-you-should-use" -[plugins.zsh-autosuggestions] +[plugins.autosuggestions] github = "zsh-users/zsh-autosuggestions" -use = ["{{ name }}.zsh"] -[plugins.zsh-syntax-highlighting] +[plugins.syntaxhighlighting] github = "zsh-users/zsh-syntax-highlighting" +[plugins.asdf] +github = "asdf-vm/asdf" + +[plugins.sshcomp] +local = "~/.config/zsh/files/" +use = ["sshcomp.zsh"] + # theme [plugins.powerlevel10k] github = "romkatv/powerlevel10k" - -[plugins.asdf] -local = "/opt/asdf-vm" -use = ["asdf.sh"] diff --git a/dot_config/zsh/env.zsh b/dot_config/zsh/env.zsh index a908235..e3784dc 100644 --- a/dot_config/zsh/env.zsh +++ b/dot_config/zsh/env.zsh @@ -60,6 +60,6 @@ export ZELLIJ_AUTO_EXIT=true export TERMINALNAME=$(fastfetch --pipe 2>/dev/null | grep -i terminal: | awk '{print $2}') # zsh specific -export HISTSIZE=1048576 -export SAVEHIST=1048576 +export SAVEHIST=$(( 1000 * 1000 )) +export HISTSIZE=$(( 1.2 * SAVEHIST )) export HISTFILE="$XDG_CACHE_HOME"/zsh/history diff --git a/dot_config/zsh/aliases.zsh b/dot_config/zsh/files/aliases.zsh similarity index 100% rename from dot_config/zsh/aliases.zsh rename to dot_config/zsh/files/aliases.zsh diff --git a/dot_config/zsh/files/compinit.zsh b/dot_config/zsh/files/compinit.zsh new file mode 100644 index 0000000..645a420 --- /dev/null +++ b/dot_config/zsh/files/compinit.zsh @@ -0,0 +1,3 @@ +autoload -Uz compinit +mkdir -p "$XDG_CACHE_HOME"/zsh &>/dev/null +compinit -d "$XDG_CACHE_HOME"/zsh/compdump diff --git a/dot_config/zsh/distroicon.zsh b/dot_config/zsh/files/distroicon.zsh similarity index 100% rename from dot_config/zsh/distroicon.zsh rename to dot_config/zsh/files/distroicon.zsh diff --git a/dot_config/zsh/keybinds.zsh b/dot_config/zsh/files/keybinds.zsh similarity index 100% rename from dot_config/zsh/keybinds.zsh rename to dot_config/zsh/files/keybinds.zsh diff --git a/dot_config/zsh/files/sshcomp.zsh b/dot_config/zsh/files/sshcomp.zsh new file mode 100644 index 0000000..3984595 --- /dev/null +++ b/dot_config/zsh/files/sshcomp.zsh @@ -0,0 +1,12 @@ +zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*' sort false +zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*' group-name '' +zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*' verbose yes + +zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' +zstyle ':completion:*:(scp|sshfs|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr +zstyle ':completion:*:(ssh|mosh):*' group-order users hosts-domain hosts-host users hosts-ipaddr + +zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:users' ignored-patterns '*' +zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback localhost broadcasthost 'ip6-*' 'hbz*' +zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' '*.eeleater.org' '*.hbz-nrw.de' +zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.*' '255.255.255.255' '::1' 'fe80::*' 'ff02::*' diff --git a/dot_config/zsh/transfer.zsh b/dot_config/zsh/files/transfer.zsh similarity index 87% rename from dot_config/zsh/transfer.zsh rename to dot_config/zsh/files/transfer.zsh index 1415467..394bdf3 100644 --- a/dot_config/zsh/transfer.zsh +++ b/dot_config/zsh/files/transfer.zsh @@ -1,5 +1,5 @@ -transfer(){ - if [ $# -eq 0 ]; then +transfer () { + if test $# -eq 0; then echo "No arguments specified.\nUsage:\n transfer \n ... | transfer ">&2 return 1 fi @@ -8,12 +8,12 @@ transfer(){ file="$1" file_name=$(basename "$file") - if [ ! -e "$file" ]; then + if test ! -e "$file"; then echo "$file: No such file or directory">&2 return 1 fi - if [ -d "$file" ]; then + if test -d "$file"; then file_name="$file_name.zip" (cd "$file" && zip -r -q - .) | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null else diff --git a/dot_config/zsh/zprofile.zsh b/dot_config/zsh/profile.zsh similarity index 100% rename from dot_config/zsh/zprofile.zsh rename to dot_config/zsh/profile.zsh diff --git a/dot_config/zsh/rc.zsh b/dot_config/zsh/rc.zsh index b321bf4..a2a95e7 100644 --- a/dot_config/zsh/rc.zsh +++ b/dot_config/zsh/rc.zsh @@ -1,32 +1,20 @@ if test -v DISTROBOX_HOST_HOME; then unset ZDOTDIR; exec zsh; fi # fix distrobox -if test $TERMINALNAME = "alacritty"; then eval "$(zellij setup --generate-auto-start zsh)"; fi # autostart only in alacritty +if test $TERMINALNAME = "alacritty"; then eval "$(zellij setup --generate-auto-start zsh)"; fi # autostart zellij only in alacritty #fastfetch bofh; echo " - BOFH" #hackerquotes #colorscript random -# powerlevel10k instant prompt () { test -r $1 && source $1 } "$XDG_CACHE_HOME"/p10k-instant-prompt-$USERNAME.zsh -# compinit -autoload -Uz compinit; mkdir -p "$XDG_CACHE_HOME"/zsh &>/dev/null; compinit -d "$XDG_CACHE_HOME"/zsh/compdump - -# source from sheldon eval "$(sheldon source)" -# other themes +# eval stuff + other themes #_evalcache starship init zsh #_evalcache oh-my-posh init zsh --config /usr/share/oh-my-posh/themes/kali.omp.json - -# eval stuff _evalcache zoxide init zsh -_evalcache dircolors -b /usr/share/LS_COLORS/LS_COLORS _evalcache atuin init zsh _evalcache navi widget zsh _evalcache direnv hook zsh eval "$(keychain --dir "$XDG_CACHE_HOME"/keychain --eval --quiet id_rsa)" - -# ssh ignored patterns -zstyle ':completion:*:*:*:users' ignored-patterns '*' -zstyle ':completion:*:*:*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' '*localdomain*' '*.eeleater.org' '*.local' '*.hbz-nrw.de' diff --git a/dot_config/zsh/symlink_dot_zprofile b/dot_config/zsh/symlink_dot_zprofile index fc78fe4..dd49749 100644 --- a/dot_config/zsh/symlink_dot_zprofile +++ b/dot_config/zsh/symlink_dot_zprofile @@ -1 +1 @@ -zprofile.zsh +profile.zsh diff --git a/dot_config/zsh/symlink_dot_zsh_plugins.txt b/dot_config/zsh/symlink_dot_zsh_plugins.txt deleted file mode 100644 index d349554..0000000 --- a/dot_config/zsh/symlink_dot_zsh_plugins.txt +++ /dev/null @@ -1 +0,0 @@ -zsh_plugins.txt diff --git a/dot_config/zsh/zsh_plugins.txt b/dot_config/zsh/zsh_plugins.txt deleted file mode 100644 index 15e09a6..0000000 --- a/dot_config/zsh/zsh_plugins.txt +++ /dev/null @@ -1,29 +0,0 @@ -# oh my zsh -ohmyzsh/ohmyzsh path:lib/history.zsh -ohmyzsh/ohmyzsh path:lib/completion.zsh -ohmyzsh/ohmyzsh path:lib/directories.zsh -ohmyzsh/ohmyzsh path:lib/key-bindings.zsh -ohmyzsh/ohmyzsh path:plugins/systemd -ohmyzsh/ohmyzsh path:plugins/fzf -ohmyzsh/ohmyzsh path:plugins/command-not-found - -# other plugins -Aloxaf/fzf-tab -urbainvaes/fzf-marks -mroth/evalcache -zpm-zsh/colorize -zpm-zsh/ssh -sobolevn/wakatime-zsh-plugin -amyreese/zsh-titles -laggardkernel/zsh-thefuck -MichaelAquilina/zsh-you-should-use -alexdesousa/oath -TwoPizza9621536/zsh-exa -fdellwing/zsh-bat - -# theme -romkatv/powerlevel10k - -# fish like -zsh-users/zsh-autosuggestions -zsh-users/zsh-syntax-highlighting diff --git a/dot_local/bin/executable_bofh b/dot_local/bin/executable_bofh index 711e373..d1ca04e 100644 --- a/dot_local/bin/executable_bofh +++ b/dot_local/bin/executable_bofh @@ -1,5 +1,5 @@ #!/usr/bin/env bash excuses_file="$HOME/.local/share/zsh/bofh" -num_lines=$(nl $excuses_file | tail -n 1 | awk '{print $1}') -awk 'NR=='$((1 + RANDOM % num_lines ))'{print;exit}' $excuses_file \ No newline at end of file +num_lines=$(nl "$excuses_file" | tail -n 1 | awk '{print $1}') +awk 'NR=='$((1 + RANDOM % num_lines ))'{print;exit}' "$excuses_file" \ No newline at end of file