diff --git a/dot_config/zsh/dot_zshrc.tmpl b/dot_config/zsh/dot_zshrc.tmpl index c6ca66d..a577fb1 100644 --- a/dot_config/zsh/dot_zshrc.tmpl +++ b/dot_config/zsh/dot_zshrc.tmpl @@ -24,10 +24,14 @@ source "$XDG_DATA_HOME"/antidote/antidote.zsh zstyle ':antidote:bundle' use-friendly-names 'yes' antidote load +# load programs +_evalcache zoxide init --cmd cd zsh +_evalcache atuin init zsh +_evalcache navi widget zsh +_evalcache direnv hook zsh + # source files -source "$ZDOTDIR"/files/evalstuff.zsh source "$ZDOTDIR"/files/aliases.zsh -source "$ZDOTDIR"/files/functions.zsh # completion files source "$ZDOTDIR"/files/sshcomp.zsh diff --git a/dot_config/zsh/files/aliases.zsh b/dot_config/zsh/files/aliases.zsh index c5bcaf0..3f0c27a 100644 --- a/dot_config/zsh/files/aliases.zsh +++ b/dot_config/zsh/files/aliases.zsh @@ -19,3 +19,12 @@ if (( ${+commands[nvim]} )); then alias vim="nvim"; fi alias peda="gdb -iex 'source /usr/share/peda/peda.py' --nh -q" alias gef="gdb -iex 'source /usr/share/gef/gef.py' --nh -q" alias pwndbg="gdb -iex 'source /usr/share/pwndbg/gdbinit.py' --nh -q" + +# ranger as cli file manager +run_ranger () { + echo + ranger < $TTY + zle redisplay +} +zle -N run_ranger +bindkey '^f' run_ranger diff --git a/dot_config/zsh/files/evalstuff.zsh b/dot_config/zsh/files/evalstuff.zsh deleted file mode 100644 index 10e3509..0000000 --- a/dot_config/zsh/files/evalstuff.zsh +++ /dev/null @@ -1,5 +0,0 @@ -# evalstuff -_evalcache zoxide init --cmd cd zsh -_evalcache atuin init zsh -_evalcache navi widget zsh -_evalcache direnv hook zsh diff --git a/dot_config/zsh/files/functions.zsh b/dot_config/zsh/files/functions.zsh deleted file mode 100644 index 1fbf928..0000000 --- a/dot_config/zsh/files/functions.zsh +++ /dev/null @@ -1,20 +0,0 @@ -pet_select () { - BUFFER=$(pet search --query "$LBUFFER") - CURSOR=$#BUFFER - zle redisplay -} -zle -N pet_select -bindkey '^s' pet_select - -prev () { - PREV=$(fc -lrn | head -n 1) - sh -c "pet new $(printf %q "$PREV")" -} - -run_ranger () { - echo - ranger < $TTY - zle redisplay -} -zle -N run_ranger -bindkey '^f' run_ranger