From 0ac6691e0015042555f6066e8c321a63d9e62835 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Thu, 12 Dec 2024 16:23:30 -0500 Subject: [PATCH 1/7] Added starhip config --- _home/private_dot_config/starship.toml | 101 +++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 _home/private_dot_config/starship.toml diff --git a/_home/private_dot_config/starship.toml b/_home/private_dot_config/starship.toml new file mode 100644 index 0000000..45402f4 --- /dev/null +++ b/_home/private_dot_config/starship.toml @@ -0,0 +1,101 @@ +# Customized, based on tokyo-night + +# global prompt configuration ( https://starship.rs/config/#prompt ) +format = """ +[░▒▓](#a3aed2)\ +$os\ +[](bg:#769ff0 fg:#a3aed2)\ +$directory\ +[](fg:#769ff0 bg:#394260)\ +$git_branch\ +$git_status\ +[](fg:#394260 bg:#212736)\ +$nodejs\ +$rust\ +$golang\ +[](fg:#212736 bg:#1d2230)\ +$time\ +[](fg:#212736 bg:#1d2230)\ +$cmd_duration\ +$status\ +[ ](fg:#1d2230)\ +$line_break$character""" + +command_timeout = 1500 # milliseconds; default is 500 + +[profiles] +transient = """ +$time\ +[](fg:#212736 bg:#1d2230)\ +$character""" + + +[os] +style = "bg:#a3aed2 fg:#090c0c" +disabled = false + +# Without NerdFont +#[os.symbols] +#Windows = " Win" + +# NerdFont - see https://www.nerdfonts.com/cheat-sheet +[os.symbols] +Windows = " " + +[directory] +style = "fg:#e3e5e5 bg:#769ff0" +format = "[ $path ]($style)" +truncation_length = 3 +truncation_symbol = "…/" + +[directory.substitutions] +"Documents" = "󰈙 " +"Downloads" = " " +"Music" = " " +"Pictures" = " " + +[git_branch] +symbol = "" +style = "bg:#394260" +format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)' + +[git_status] +style = "bg:#394260" +format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)' + +[nodejs] +symbol = "" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[rust] +symbol = "" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[golang] +symbol = "" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[time] +disabled = false +time_format = "%R" # Hour:Minute Format +style = "bg:#1d2230" +format = '[[  $time ](fg:#a0a9cb bg:#1d2230)]($style)' + +[cmd_duration] +min_time = 500 # milliseconds +# nerd font version: +format = 'prev: [[  $duration ](fg:#a0a9cb bg:#1d2230)]($style)' +# General UNICODE font version: +# format = '[[ ⧗ $duration ](fg:#a0a9cb bg:#1d2230)]($style)' +# Emoji version: +# format = '[[ ⌛ $duration ](fg:#a0a9cb bg:#1d2230)]($style)' + +[status] +disabled = false + +[character] +disabled = false + From 6ea5f89bb439394aa0bb348215d1f6f4cb5f41b9 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Thu, 12 Dec 2024 16:43:39 -0500 Subject: [PATCH 2/7] Simplify vi/vim symlinks, allowing for system nvim vs AppImage --- _home/private_dot_local/bin/symlink_vi | 2 +- _home/private_dot_local/bin/symlink_vim | 2 +- _home/private_dot_local/bin/symlink_vim.tiny | 2 +- _home/private_dot_local/bin/symlink_vimdiff | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_home/private_dot_local/bin/symlink_vi b/_home/private_dot_local/bin/symlink_vi index f280f47..732ff53 100644 --- a/_home/private_dot_local/bin/symlink_vi +++ b/_home/private_dot_local/bin/symlink_vi @@ -1 +1 @@ -nvim.AppImage +nvim diff --git a/_home/private_dot_local/bin/symlink_vim b/_home/private_dot_local/bin/symlink_vim index f280f47..732ff53 100644 --- a/_home/private_dot_local/bin/symlink_vim +++ b/_home/private_dot_local/bin/symlink_vim @@ -1 +1 @@ -nvim.AppImage +nvim diff --git a/_home/private_dot_local/bin/symlink_vim.tiny b/_home/private_dot_local/bin/symlink_vim.tiny index f280f47..732ff53 100644 --- a/_home/private_dot_local/bin/symlink_vim.tiny +++ b/_home/private_dot_local/bin/symlink_vim.tiny @@ -1 +1 @@ -nvim.AppImage +nvim diff --git a/_home/private_dot_local/bin/symlink_vimdiff b/_home/private_dot_local/bin/symlink_vimdiff index f280f47..732ff53 100644 --- a/_home/private_dot_local/bin/symlink_vimdiff +++ b/_home/private_dot_local/bin/symlink_vimdiff @@ -1 +1 @@ -nvim.AppImage +nvim From c8c218f860a964fc24e9065363aba2b4702a921f Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Tue, 24 Dec 2024 15:50:56 -0500 Subject: [PATCH 3/7] Improbe zsh's fpath handling --- .../sz.env/aaa_zsh_0_perp.env | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/_home/private_dot_config/sz.env/aaa_zsh_0_perp.env b/_home/private_dot_config/sz.env/aaa_zsh_0_perp.env index 772818f..be73805 100644 --- a/_home/private_dot_config/sz.env/aaa_zsh_0_perp.env +++ b/_home/private_dot_config/sz.env/aaa_zsh_0_perp.env @@ -8,11 +8,18 @@ if [[ "${BASE_SHELL}" == "zsh" ]]; then mkdir -p $ZSH_CACHE_DIR/completions mkdir -p "$HOME/.local/share/zsh/completions" - [ -d "$HOME/.local/share/zsh/completions" ] && fpath=( - $HOME/.local/share/zsh/completions - $fpath - ) - + # Remove duplicates from fpath, and add local completion dir + fpath=( $( + for d in $( + awk '!seen[$0]++' <( + echo "$HOME/.local/share/zsh/completions" + printf '%s\n' $fpath + ) + ); do + [ -d "$d" ] && echo "$d" + done + ) ) + skip_global_compinit=1 # # Jump to the bottom of the screen From f47d0d00ed8c3e073292167e13e913f023aaeb24 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Tue, 24 Dec 2024 15:51:48 -0500 Subject: [PATCH 4/7] do SCALE_POOL calculation only if necessary Following an incident where midclt calls were hanging --- _home/private_dot_config/sz.env/PATH_truestuff.env | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_home/private_dot_config/sz.env/PATH_truestuff.env b/_home/private_dot_config/sz.env/PATH_truestuff.env index bced20c..0095c06 100644 --- a/_home/private_dot_config/sz.env/PATH_truestuff.env +++ b/_home/private_dot_config/sz.env/PATH_truestuff.env @@ -1,6 +1,8 @@ #!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' -if is_cmd midclt; then +if is_cmd midclt && [ -z "$SCALE_POOL" ]; then + export SCALE_POOL=szmedia + export SCALE_POOL="$(midclt call "kubernetes.config" 2>/dev/null | jq -r '.pool')" [ -n "$SCALE_POOL" ] && [ "$SCALE_POOL" != "null" ] || export SCALE_POOL="$(midclt call "pool.query" 2>/dev/null | jq -r '.[0].name')" [ -d "/mnt/$SCALE_POOL" ] || unset SCALE_POOL From db54baf1b9a0b967ba8e35edf3876308febed37b Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Tue, 24 Dec 2024 15:53:37 -0500 Subject: [PATCH 5/7] add osc (ANSI OSC52 clipboard escape sequence) --- _home/.chezmoiexternal.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/_home/.chezmoiexternal.yaml b/_home/.chezmoiexternal.yaml index 9f0adc3..0cb7e6c 100644 --- a/_home/.chezmoiexternal.yaml +++ b/_home/.chezmoiexternal.yaml @@ -64,6 +64,18 @@ {{- end -}} {{- end }} +{{- with $repo := "theimpostor/osc" -}} +{{- with $version := (gitHubLatestRelease $repo).GetTagName -}} +{{- $_ := set $externals ".local/bin/osc" (dict + "type" "archive-file" + "url" (printf "https://github.com/%s/releases/download/%s/osc_linux_x86_64.tar.gz" $repo $version) + "path" "osc" + "executable" true + "refreshPeriod" $defaultRefresh +) -}} +{{- end -}} +{{- end }} + {{- $externals | toYaml }} ".config/sz.env/lib/ble.sh.curl": type: "archive" From b8301a01605fd085e6d9d596b29da9a19bb71e1f Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Tue, 24 Dec 2024 15:53:54 -0500 Subject: [PATCH 6/7] Add lazyjournal (journalctl TUI) --- _home/.chezmoiexternal.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/_home/.chezmoiexternal.yaml b/_home/.chezmoiexternal.yaml index 0cb7e6c..a5362b7 100644 --- a/_home/.chezmoiexternal.yaml +++ b/_home/.chezmoiexternal.yaml @@ -76,6 +76,17 @@ {{- end -}} {{- end }} +{{- with $repo := "Lifailon/lazyjournal" -}} +{{- with $version := (gitHubLatestRelease $repo).GetTagName -}} +{{- $_ := set $externals ".local/bin/lazyjournal" (dict + "type" "file" + "url" (printf "https://github.com/%s/releases/download/%s/lazyjournal-%s-linux-amd64" $repo $version $version) + "executable" true + "refreshPeriod" $defaultRefresh +) -}} +{{- end -}} +{{- end }} + {{- $externals | toYaml }} ".config/sz.env/lib/ble.sh.curl": type: "archive" From 61a8b9895b7c602963c108a049987dacc82106e9 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Tue, 24 Dec 2024 15:54:13 -0500 Subject: [PATCH 7/7] Fix zellij-load zsh support --- _home/private_dot_local/bin/executable_load-zellij | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_home/private_dot_local/bin/executable_load-zellij b/_home/private_dot_local/bin/executable_load-zellij index 4399ad7..6b2428b 100644 --- a/_home/private_dot_local/bin/executable_load-zellij +++ b/_home/private_dot_local/bin/executable_load-zellij @@ -15,7 +15,7 @@ BASE_SHELL=$(basename "$SHELL") if is_sourced; then zellij-cleanup() { - which zellij > /dev/null && which zellij | grep -E "^$HOME" | ${SUDO:-} xargs -tr rm + env which zellij > /dev/null && env which zellij | grep -E "^$HOME" | ${SUDO:-} xargs -tr rm [[ -d "$HOME/.cache/zellij" ]] && echo "$HOME/.cache/zellij" | ${SUDO:-} xargs -tr rm -fR find /tmp -maxdepth 1 -mindepth 1 -type d -name 'zellij*' -print0 | ${SUDO:-} xargs -r0t rm -fR if [[ -d "$HOME/.cache/zellij" ]]; then @@ -26,7 +26,8 @@ if is_sourced; then fi } refresh-zellij() { - if [ -z "$(which zellij)" ] && ! [ -x ~/.local/bin/zellij ]; then +${SET:-:} -x + if [ -z "$(env which zellij)" ] && ! [ -x ~/.local/bin/zellij ]; then if [[ ! -r /tmp/zellij/bootstrap/zellij ]]; then printf "Grabbing zellij from the web!\n" bash <(curl -sL zellij.dev/launch) "--help" > /dev/null 2>&1 || true @@ -48,13 +49,14 @@ if is_sourced; then } zellij-completion() { if [[ "${BASE_SHELL}" == "zsh" ]]; then - . <( env zellij setup --generate-completion zsh | sed -Ee 's/^(_(zellij) ).*/compdef \1\2/' ) + type _zellij > /dev/null \ + || . <( env zellij setup --generate-completion zsh | sed -Ee 's/^(_(zellij) ).*/compdef \1\2/' ) else . <( env zellij setup --generate-completion "$BASE_SHELL" ) fi } ${SET:-:} -x - if [[ -n "$(which zellij)" ]]; then + if [[ -n "$(env which zellij)" ]]; then zellij-completion fi ${SET:-:} -x