From 863808c00de8cb047264dd2780e2b9c04e557048 Mon Sep 17 00:00:00 2001 From: eeleater Date: Wed, 14 Aug 2024 00:45:09 +0200 Subject: [PATCH] updated antidote from sheldon --- dot_config/zsh/dot_zshrc | 6 ++---- dot_config/zsh/files/evalstuff.zsh | 3 ++- dot_config/zsh/files/functions.zsh | 4 ++-- dot_local/bin/executable_joke | 6 +++--- dot_local/bin/executable_updateOhMyPosh | 4 ++-- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc index 7d6e362..864f264 100644 --- a/dot_config/zsh/dot_zshrc +++ b/dot_config/zsh/dot_zshrc @@ -7,7 +7,7 @@ path+=("$XDG_DATA_HOME"/JetBrains/Toolbox/scripts) # jetbrains toolbox path+=("$HOME"/.local/bin) # local bin # startup banner -potentialBanner=('joke bofh' 'joke dad' 'fastfetch') # 'colorscript random' 'joke hq dijkstra' 'joke hq knuth' 'joke hq perlis' 'joke hq mimsc' +potentialBanner=('joke bofh' 'joke dad' 'fastfetch') eval "$potentialBanner[$RANDOM%$#potentialBanner+1]" # disable flowcontrol @@ -30,13 +30,11 @@ source "$ZDOTDIR"/files/functions.zsh source "$ZDOTDIR"/files/distroicon.zsh # completion files -source "$ZDOTDIR"/files/bashcomps.zsh source "$ZDOTDIR"/files/sshcomp.zsh +source "$ZDOTDIR"/files/bashcomps.zsh # local overrides for sourced in "$XDG_DATA_HOME"/zsh/files/*; do source $sourced; done # theme -#potentialTheme=('emodipt-extend') # 'kali' 'lambda' 'bubblesextra' 'illusi0n' 'nordtron' 'di4am0nd' 'atomic' -#eval "$(oh-my-posh init zsh --config="$XDG_CACHE_HOME/oh-my-posh/themes/$potentialTheme[$RANDOM%$#potentialTheme+1].omp.json")" eval "$(oh-my-posh init zsh --config="$XDG_CACHE_HOME/oh-my-posh/themes/emodipt-extend.omp.json")" diff --git a/dot_config/zsh/files/evalstuff.zsh b/dot_config/zsh/files/evalstuff.zsh index 5102e34..b19e153 100644 --- a/dot_config/zsh/files/evalstuff.zsh +++ b/dot_config/zsh/files/evalstuff.zsh @@ -1,7 +1,8 @@ # evalstuff +_evalcache fzf --zsh _evalcache zoxide init --cmd cd zsh _evalcache atuin init zsh _evalcache navi widget zsh _evalcache direnv hook zsh #_evalcache ntfy shell-integration -eval "$(keychain --dir "$XDG_CACHE_HOME"/keychain --eval --quiet id_rsa)" +#eval "$(keychain --dir "$XDG_CACHE_HOME"/keychain --eval --quiet id_rsa)" diff --git a/dot_config/zsh/files/functions.zsh b/dot_config/zsh/files/functions.zsh index 51af6bf..1fbf928 100644 --- a/dot_config/zsh/files/functions.zsh +++ b/dot_config/zsh/files/functions.zsh @@ -4,9 +4,9 @@ pet_select () { zle redisplay } zle -N pet_select -bindkey '^l' pet_select +bindkey '^s' pet_select -pet_add_prev () { +prev () { PREV=$(fc -lrn | head -n 1) sh -c "pet new $(printf %q "$PREV")" } diff --git a/dot_local/bin/executable_joke b/dot_local/bin/executable_joke index 00546a9..248c9fa 100644 --- a/dot_local/bin/executable_joke +++ b/dot_local/bin/executable_joke @@ -6,10 +6,10 @@ case "$1" in echo "Daily Dad Joke: $joke" ;; "bofh") - excuses_file="$HOME/.local/share/bofh" - num_lines=$(nl "$excuses_file" | tail -n 1 | awk '{print $1}') + file="$HOME/.local/share/bofh" + lines=$(nl "$file" | tail -n 1 | awk '{print $1}') echo -n "Daily BOFH Excuse: " - awk 'NR=='$((1 + RANDOM % num_lines ))'{print;exit}' "$excuses_file" + awk 'NR=='$((1 + RANDOM % lines ))'{print;exit}' "$file" ;; "hq") file="$HOME/.local/share/hackerquotes/$2" diff --git a/dot_local/bin/executable_updateOhMyPosh b/dot_local/bin/executable_updateOhMyPosh index e8366eb..8af14c4 100755 --- a/dot_local/bin/executable_updateOhMyPosh +++ b/dot_local/bin/executable_updateOhMyPosh @@ -1,6 +1,6 @@ #!/bin/bash -newestVersion="$(curl -sL https://api.github.com/repos/JanDeDobbeleer/oh-my-posh/releases/latest | jq -r '.name' | cut -dv -f2)" -localVersion="$(oh-my-posh --version)" +newestVersion="$(curl -sL https://api.github.com/repos/JanDeDobbeleer/oh-my-posh/releases/latest | jq -r '.name')" +localVersion="v$(oh-my-posh --version)" tmpFile="$(mktemp -u)" test "$newestVersion" != "$localVersion" && {