updated antidote config somewhat

This commit is contained in:
eeleater 2023-04-30 23:09:06 +02:00
parent 7e33d7c962
commit ba8cf2c09f
27 changed files with 361 additions and 178 deletions

View file

@ -0,0 +1 @@
# create the file

View file

@ -6,6 +6,7 @@ ohmyzsh/ohmyzsh path:lib/key-bindings.zsh
ohmyzsh/ohmyzsh path:plugins/systemd
ohmyzsh/ohmyzsh path:plugins/fzf
ohmyzsh/ohmyzsh path:plugins/command-not-found
ohmyzsh/ohmyzsh path:plugins/transfer
# other plugins
Aloxaf/fzf-tab
@ -20,10 +21,17 @@ MichaelAquilina/zsh-you-should-use
alexdesousa/oath
TwoPizza9621536/zsh-exa
fdellwing/zsh-bat
asdf-vm/asdf
Felixoid/zsh-hoco
olets/zsh-abbr
trapd00r/LS_COLORS
# theme
romkatv/powerlevel10k
# stuff
zsh-users/zsh-completions
# fish like
zsh-users/zsh-autosuggestions
zsh-users/zsh-syntax-highlighting

View file

@ -1,16 +1,13 @@
# path
export PATH="$HOME"/.local/bin:"$PATH"
# ibus specific
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
# xdg stuff
export XDG_DATA_HOME="$HOME"/.local/share
export XDG_CONFIG_HOME="$HOME"/.config
export XDG_STATE_HOME="$HOME"/.local/state
export XDG_CACHE_HOME="$HOME"/.cache
export XDG_CONFIG_HOME="$HOME"/.config
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_DATA_HOME="$HOME"/.local/share
export XDG_DATA_DIRS=/usr/local/share:/usr/share
export XDG_STATE_HOME="$HOME"/.local/state
export XDG_DESKTOP_DIR=$HOME/Desktop
export XDG_DOCUMENTS_DIR="$HOME"/Documents
export XDG_DOWNLOAD_DIR="$HOME"/Downloads
@ -19,10 +16,6 @@ export XDG_PICTURES_DIR="$HOME"/Pictures
export XDG_VIDEOS_DIR="$HOME"/Videos
export XDG_PROJECTS_DIR="$XDG_DOCUMENTS_DIR"/projects
# system xdg stuff
export XDG_DATA_DIRS=/usr/local/share:/usr/share
export XDG_CONFIG_DIRS=/etc/xdg
# cache files
export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
export ZSH_EVALCACHE_DIR="$XDG_CACHE_HOME"/evalcache
@ -43,23 +36,27 @@ export ASDF_DATA_DIR="$XDG_DATA_HOME"/asdf
export NB_DIR="$XDG_DATA_HOME"/nb
export DSTASK_GIT_REPO="$XDG_DATA_HOME"/dstask
export WAKATIME_HOME="$XDG_DATA_HOME"/wakatime
# gpg
export WINEPREFIX="$XDG_DATA_HOME"/wine
#export GNUPGHOME="$XDG_DATA_HOME"/gnupg
export GPG_TTY="$TTY"
export W3M_DIR="$XDG_DATA_HOME"/w3m
export GIBO_BOILERPLATES="$XDG_DATA_HOME"/giboboilerplates
# other programs
export LESSHISTFILE="$XDG_STATE_HOME"/less/history
export EDITOR=nvim
export VISUAL="subl -w"
export EDITOR=vim
#export VISUAL=kate
export ZSH_WAKATIME_BIN=/usr/bin/wakatime
export PYTHONSTARTUP=/etc/python/pythonrc
# stuff
export ZELLIJ_AUTO_ATTACH=true
export ZELLIJ_AUTO_EXIT=true
export TERMINALNAME=$(fastfetch --pipe 2>/dev/null | grep -i terminal: | awk '{print $2}')
export TERMINALNAME=$(fastfetch --pipe 2>/dev/null | grep Terminal: | awk '{print $2}')
# zsh specific
export HISTSIZE=1048576
export SAVEHIST=1048576
export HISTFILE="$XDG_CACHE_HOME"/zsh/history
export SAVEHIST=$(( 100 * 1000 ))
export HISTSIZE=$(( 1.2 * SAVEHIST ))
export ZSH_CACHE_DIR="$XDG_CACHE_HOME"/zsh
export HISTFILE="$ZSH_CACHE_DIR"/history
export GPG_TTY="$TTY"
export AUTO_NTFY_DONE_IGNORE="ntfy emacs htop info less mail man meld most mutt nano screen ssh tail tmux top vi vim watch bat cat kate topgrade"

31
dot_config/zsh/dot_zshrc Normal file
View file

@ -0,0 +1,31 @@
if test -v DISTROBOX_HOST_HOME; then unset ZDOTDIR; exec zsh; fi # fix distrobox
if test "x$TERMINALNAME" = "xalacritty"; then eval "$(zellij setup --generate-auto-start zsh)"; fi # autostart zellij only in alacritty
# startup banner
potentialBanner=('bofh; echo " - BOFH"' 'hackerquotes' 'fastfetch')#'colorscript random')
eval "$potentialBanner[$RANDOM%$#potentialBanner+1]"
function source () { test -r $1 && builtin source $1 }
# local env exports
source "$XDG_DATA_HOME"/zsh/env.zsh
# completion stuff
source "$ZDOTDIR"/files/compinit.zsh
source "$ZDOTDIR"/files/bashcomps.zsh
# antidote
source "$XDG_DATA_HOME"/antidote/antidote.zsh
zstyle ':antidote:bundle' use-friendly-names 'yes'
antidote load
# eval stuff
source "$ZDOTDIR"/files/evalstuff.zsh
# seperate configs
source "$ZDOTDIR"/files/aliases.zsh
source "$ZDOTDIR"/files/functions.zsh
source "$ZDOTDIR"/files/distroicon.zsh
# ssh ignored patterns
source "$ZDOTDIR"/files/sshcomp.zsh

View file

@ -1,4 +1,3 @@
alias cd='z'
alias grep='rg'
alias find='fd'

View file

@ -0,0 +1,11 @@
if (( ${+commands[distrobox]} )); then
source /usr/share/bash-completion/completions/distrobox
source /usr/share/bash-completion/completions/distrobox-create
source /usr/share/bash-completion/completions/distrobox-enter
source /usr/share/bash-completion/completions/distrobox-ephemeral
source /usr/share/bash-completion/completions/distrobox-generate-entry
source /usr/share/bash-completion/completions/distrobox-list
source /usr/share/bash-completion/completions/distrobox-rm
source /usr/share/bash-completion/completions/distrobox-stop
source /usr/share/bash-completion/completions/distrobox-upgrade
fi

View file

@ -0,0 +1,4 @@
mkdir -p "$XDG_CACHE_HOME"/zsh &>/dev/null
autoload -Uz compinit
compinit -d "$XDG_CACHE_HOME"/zsh/compdump

View file

@ -0,0 +1,14 @@
# starship
#_evalcache starship init zsh --print-full-init
# ohmyposh
#potentialTheme=('atomic.omp.json' 'emodipt-extend.omp.json' 'kali.omp.json' 'lambda.omp.json' 'nordtron.omp.json' 'pure.omp.json' 'uew.omp.json')
#export POSH_THEME="/usr/share/oh-my-posh/themes/$potentialTheme[$RANDOM%$#potentialTheme+1]"
#eval "$(ohmyposh init zsh)"
# evalstuff
_evalcache zoxide init --cmd cd zsh
_evalcache atuin init zsh
#_evalcache navi widget zsh
#_evalcache direnv hook zsh
#eval "$(keychain --dir "$XDG_CACHE_HOME"/keychain --eval --quiet id_rsa)"

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

@ -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::*'

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,50 +0,0 @@
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
#fastfetch
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
# ensure zsh cache folder exists
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
# 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
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'

View file

@ -1 +0,0 @@
zprofile.zsh

View file

@ -1 +0,0 @@
zsh_plugins.txt

View file

@ -1 +0,0 @@
env.zsh

View file

@ -1 +0,0 @@
rc.zsh

View file

@ -1,26 +0,0 @@
transfer(){
if [ $# -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 [ ! -e "$file" ]; then
echo "$file: No such file or directory">&2
return 1
fi
if [ -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 +0,0 @@