Update .config/sheldon/plugins.toml

Update .config/zsh/env.zsh
Add .config/zsh/files/functions.zsh
Remove .config/zsh/files/keybinds.zsh
Remove .config/zsh/files/transfer.zsh
Update .config/zsh/rc.zsh
This commit is contained in:
eeleater 2022-12-20 16:45:56 +01:00
parent 27a779ca15
commit a5c3567d85
6 changed files with 47 additions and 50 deletions

View file

@ -20,7 +20,7 @@ use = [".p10k.zsh"]
[plugins.ownfiles] [plugins.ownfiles]
local = "~/.config/zsh/files/" local = "~/.config/zsh/files/"
use = ["{compinit,aliases,keybinds,distroicon,transfer}.zsh"] use = ["{compinit,aliases,functions,distroicon}.zsh"]
# completions # completions
[plugins.completions] [plugins.completions]
@ -42,7 +42,7 @@ use = ["{completion,key-bindings,history,directories}.zsh"]
[plugins.ohmyzshplugins] [plugins.ohmyzshplugins]
github = "ohmyzsh/ohmyzsh" github = "ohmyzsh/ohmyzsh"
dir = "plugins" dir = "plugins"
use = ["{systemd,fzf,command-not-found}/*.plugin.zsh"] use = ["{systemd,fzf,command-not-found,transfer}/*.plugin.zsh"]
[plugins.fzftab] [plugins.fzftab]
github = "Aloxaf/fzf-tab" github = "Aloxaf/fzf-tab"
@ -86,10 +86,35 @@ github = "zsh-users/zsh-syntax-highlighting"
[plugins.asdf] [plugins.asdf]
github = "asdf-vm/asdf" github = "asdf-vm/asdf"
[plugins.hoco]
github = "Felixoid/zsh-hoco"
[plugins.sshcomp] [plugins.sshcomp]
local = "~/.config/zsh/files/" local = "~/.config/zsh/files/"
use = ["sshcomp.zsh"] use = ["sshcomp.zsh"]
# theme # themes
[plugins.powerlevel10k] [plugins.powerlevel10k]
github = "romkatv/powerlevel10k" github = "romkatv/powerlevel10k"
#[plugins.starship]
#inline = "_evalcache starship init zsh --print-full-init"
#[plugins.ohmyposh]
#inline = "_evalcache oh-my-posh init zsh --config /usr/share/oh-my-posh/themes/kali.omp.json"
# evals
[plugins.zoxide]
inline = "_evalcache zoxide init zsh"
[plugins.atuin]
inline = "_evalcache atuin init zsh"
[plugins.navi]
inline = "_evalcache navi widget zsh"
[plugins.direnv]
inline = "_evalcache direnv hook zsh"
[plugins.keychain]
inline = 'eval "$(keychain --dir "$XDG_CACHE_HOME"/keychain --eval --quiet id_rsa)"'

View file

@ -62,4 +62,5 @@ export TERMINALNAME=$(fastfetch --pipe 2>/dev/null | grep -i terminal: | awk '{p
# zsh specific # zsh specific
export SAVEHIST=$(( 1000 * 1000 )) export SAVEHIST=$(( 1000 * 1000 ))
export HISTSIZE=$(( 1.2 * SAVEHIST )) export HISTSIZE=$(( 1.2 * SAVEHIST ))
export HISTFILE="$XDG_CACHE_HOME"/zsh/history export ZSH_CACHE_DIR="$XDG_CACHE_HOME"/zsh
export HISTFILE="$ZSH_CACHE_DIR"/history

View file

@ -0,0 +1,15 @@
pet_select () {
BUFFER=$(pet search --query "$LBUFFER")
CURSOR=$#BUFFER
zle redisplay
}
zle -N pet_select
bindkey '^l' pet_select
run_ranger () {
echo
ranger < $TTY
zle redisplay
}
zle -N run_ranger
bindkey '^f' run_ranger

View file

@ -1,7 +0,0 @@
run_ranger () { echo; ranger < $TTY; zle redisplay }
zle -N run_ranger
bindkey '^f' run_ranger
pet_select () { BUFFER=$(pet search --query "$LBUFFER"); CURSOR=$#BUFFER; zle redisplay }
zle -N pet_select
bindkey '^l' pet_select

View file

@ -1,26 +0,0 @@
transfer () {
if test $# -eq 0; then
echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2
return 1
fi
if tty -s; then
file="$1"
file_name=$(basename "$file")
if test ! -e "$file"; then
echo "$file: No such file or directory">&2
return 1
fi
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
cat "$file" | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
fi
else
file_name=$1
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
fi
}

View file

@ -1,20 +1,9 @@
if test -v DISTROBOX_HOST_HOME; then unset ZDOTDIR; exec zsh; fi # fix distrobox 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 zellij only in alacritty if test $TERMINALNAME = "alacritty"; then eval "$(zellij setup --generate-auto-start zsh)"; fi # autostart zellij only in alacritty
#fastfetch potentialBanner=('bofh; echo " - BOFH"' 'fastfetch' 'hackerquotes' 'colorscript random')
bofh; echo " - BOFH" eval "$potentialBanner[$RANDOM%$#potentialBanner+1]"
#hackerquotes
#colorscript random
() { test -r $1 && source $1 } "$XDG_CACHE_HOME"/p10k-instant-prompt-$USERNAME.zsh () { test -r $1 && source $1 } "$XDG_CACHE_HOME"/p10k-instant-prompt-$USERNAME.zsh
eval "$(sheldon source)" eval "$(sheldon source)"
# eval stuff + other themes
#_evalcache starship init zsh
#_evalcache oh-my-posh init zsh --config /usr/share/oh-my-posh/themes/kali.omp.json
_evalcache zoxide init zsh
_evalcache atuin init zsh
_evalcache navi widget zsh
_evalcache direnv hook zsh
eval "$(keychain --dir "$XDG_CACHE_HOME"/keychain --eval --quiet id_rsa)"