From 0fe2468791d6358a8b8df521d139c027dec02f8a Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Mon, 21 Oct 2024 09:00:15 +0200 Subject: [PATCH 1/7] add supervise files back to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..e0253bce6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*/.local/share/service/**/supervise/** From 5c85898837180ebc9ae15ed36d472aec12389349 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Mon, 21 Oct 2024 09:00:35 +0200 Subject: [PATCH 2/7] zsh: clean up aliases --- dijkstra/.config/zsh/configs/host-setup | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dijkstra/.config/zsh/configs/host-setup b/dijkstra/.config/zsh/configs/host-setup index 0719d3370..038e5589b 100644 --- a/dijkstra/.config/zsh/configs/host-setup +++ b/dijkstra/.config/zsh/configs/host-setup @@ -11,13 +11,13 @@ alias vault_login_tralios=' -token-only \ -method=userpass \ username=luca | - tee ${HOME}/Documents/dev/tralios/ansible/classes/.tralios-vault-token + tee ${HOME}/Documents/dev/tralios/ansible/.tralios-vault-token +' +alias vault_tralios=' + export VAULT_ADDR=https://vault.tralios.de && + export VAULT_TOKEN=$(cat ${HOME}/Documents/dev/tralios/ansible/.tralios-vault-token) && + vault \ ' -function vault_tralios { - export VAULT_ADDR=https://vault.tralios.de - export VAULT_TOKEN=$(cat ${HOME}/Documents/dev/tralios/ansible/classes/.tralios-vault-token) - vault -} alias vault_login_schneiderfilz=' VAULT_ADDR=https://vault.schneiderfilz.com \ @@ -26,10 +26,10 @@ alias vault_login_schneiderfilz=' -token-only \ -method=userpass \ username=luca | - tee ${HOME}/Documents/dev/schneiderfilz/sf-ansible/classes/.schneiderfilz-vault-token + tee ${HOME}/Documents/dev/schneiderfilz/sf-ansible/.schneiderfilz-vault-token +' +alias vault_schneiderfilz=' + export VAULT_ADDR=https://vault.schneiderfilz.com && + export VAULT_TOKEN=$(cat ${HOME}/Documents/dev/schneiderfilz/sf-ansible/.schneiderfilz-vault-token) && + vault \ ' -function vault_schneiderfilz { - export VAULT_ADDR=https://vault.schneiderfilz.com - export VAULT_TOKEN=$(cat ${HOME}/Documents/dev/schneiderfilz/sf-ansible/classes/.schneiderfilz-vault-token) - vault $@ -} From 408307cf302e6cb67bd2f8a505451ccdf5c29b45 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Mon, 21 Oct 2024 09:00:46 +0200 Subject: [PATCH 3/7] git: fix redact filter --- common/.local/libexec/redact_git_filter | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/.local/libexec/redact_git_filter b/common/.local/libexec/redact_git_filter index 45ad85f6d..4a21f80dc 100755 --- a/common/.local/libexec/redact_git_filter +++ b/common/.local/libexec/redact_git_filter @@ -6,10 +6,10 @@ GS="$(printf '\034')" map=$(jq -r 'to_entries[] | "\(.key)'"$FS"'\(.value)"' "${HOME}/.secrets/dotfile-secrets.json") -awk='{gsub(/[^\^]/, "[&]", $2); gsub(/\^/, "\\^", $2);' +escape='{gsub(/[^\^]/, "[&]", $2); gsub(/\^/, "\\^", $2);' case $1 in - clean) awk="${awk}"' printf "s%s%s%s<#%s#>%sg;", d, $2, d, $1, d}' ;; - smudge) awk="${awk}"' printf "s%s<#%s#>%s%s%sg;", d, $1, d, $2, d}' ;; + clean) awk="${escape}"' printf "s%s%s%s<#%s#>%sg;", d, $2, d, $1, d}' ;; + smudge) awk='printf "s%s<#%s#>%s%s%sg;", d, $1, d, $2, d}' ;; esac sed "$(echo "$map" | awk -F"$FS" -v d="$GS" "$awk")" From a15f13f1480e2e6759820c6102a6cccb6cbe502d Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Mon, 21 Oct 2024 09:00:57 +0200 Subject: [PATCH 4/7] lf: fix preview in fzf --- common/.config/lf/lfrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/.config/lf/lfrc b/common/.config/lf/lfrc index fef9c6286..cf44da1f2 100644 --- a/common/.config/lf/lfrc +++ b/common/.config/lf/lfrc @@ -148,7 +148,7 @@ res="$( --bind="start:reload([ -n {q} ] && $rg_cmd -- {q} || true)" \ --bind="change:reload([ -n {q} ] && $rg_cmd -- {q} || true)" \ --preview-window="right,50%" \ - --preview='~/.config/lf/preview/clean; ~/.config/lf/preview/preview {1} "$FZF_PREVIEW_COLUMNS" "$FZF_PREVIEW_LINES" "$FZF_PREVIEW_LEFT" "$FZF_PREVIEW_TOP"' + --preview='~/.config/lf/preview {1} "$FZF_PREVIEW_COLUMNS" "$FZF_PREVIEW_LINES" "$FZF_PREVIEW_LEFT" "$FZF_PREVIEW_TOP"' )" file="$(realpath "$(echo "$res" | cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g')" 2>/dev/null)" row="$(echo "$res" | cut -d':' -f2)" From 8facd1beee7e08b98d6fb2ae9fafaa37a8538e08 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Mon, 21 Oct 2024 09:01:11 +0200 Subject: [PATCH 5/7] elia: mention "linux" in system prompt --- common/.config/elia/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/.config/elia/config.toml b/common/.config/elia/config.toml index 57357262f..8fe6bb031 100644 --- a/common/.config/elia/config.toml +++ b/common/.config/elia/config.toml @@ -1,5 +1,5 @@ default_model = "anthropic/claude-3-5-sonnet-20240620" -system_prompt = "You are a coding and system administration assistant." +system_prompt = "You are a coding and linux system administration assistant." theme = "monokai" [[models]] From bb575651eff1f7833aa9fb70b19783dccf991d30 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Tue, 22 Oct 2024 12:52:13 +0200 Subject: [PATCH 6/7] zsh: change config load order to fix rprompt --- common/.config/zsh/.zshrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/.config/zsh/.zshrc b/common/.config/zsh/.zshrc index 73eeee3ed..96f4a5502 100644 --- a/common/.config/zsh/.zshrc +++ b/common/.config/zsh/.zshrc @@ -2,10 +2,6 @@ source "$ZDOTDIR"/plugins/zsh-defer/zsh-defer.plugin.zsh -for f in "$ZDOTDIR"/configs/*; do - source "$f" -done - for f in \ "$ZDOTDIR"/plugins/*/*.plugin.zsh \ /usr/share/zsh/plugins/*/*.plugin.zsh \ @@ -14,5 +10,9 @@ do [ "$f" != "${ZDOTDIR}/plugins/zsh-defer.plugin.zsh" ] && zsh-defer source $f done +for f in "$ZDOTDIR"/configs/*; do + source "$f" +done + export GPG_TTY="$(tty)" gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1 From 0a200d107f78f66213fea984775e377a7a628c4f Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Tue, 22 Oct 2024 13:31:20 +0200 Subject: [PATCH 7/7] xdg-settings: set up default handlers --- common/.config/mimeapps.list | 40 +++++++++++++++++++ .../.local/share/applications/browser.desktop | 5 +++ common/.local/share/applications/file.desktop | 5 +++ .../.local/share/applications/image.desktop | 5 +++ common/.local/share/applications/mail.desktop | 5 +++ common/.local/share/applications/pdf.desktop | 5 +++ common/.local/share/applications/text.desktop | 5 +++ .../.local/share/applications/video.desktop | 5 +++ 8 files changed, 75 insertions(+) create mode 100644 common/.config/mimeapps.list create mode 100644 common/.local/share/applications/browser.desktop create mode 100644 common/.local/share/applications/file.desktop create mode 100644 common/.local/share/applications/image.desktop create mode 100644 common/.local/share/applications/mail.desktop create mode 100644 common/.local/share/applications/pdf.desktop create mode 100644 common/.local/share/applications/text.desktop create mode 100644 common/.local/share/applications/video.desktop diff --git a/common/.config/mimeapps.list b/common/.config/mimeapps.list new file mode 100644 index 000000000..d0b830fa7 --- /dev/null +++ b/common/.config/mimeapps.list @@ -0,0 +1,40 @@ +[Default Applications] +text/x-shellscript=text.desktop; +text/plain=text.desktop; +application/postscript=pdf.desktop; +application/pdf=pdf.desktop; +image/png=img.desktop; +image/jpeg=img.desktop; +image/gif=img.desktop; +video/x-matroska=video.desktop +video/mp4=video.desktop +inode/directory=file.desktop + +text/html=browser.desktop +x-scheme-handler/http=browser.desktop +x-scheme-handler/https=browser.desktop +x-scheme-handler/chrome=browser.desktop +application/x-extension-htm=browser.desktop +application/x-extension-html=browser.desktop +application/x-extension-shtml=browser.desktop +application/xhtml+xml=browser.desktop +application/x-extension-xhtml=browser.desktop +application/x-extension-xht=browser.desktop + +text/calendar=mail.desktop +message/rfc822=mail.desktop +x-scheme-handler/mailto=mail.desktop +x-scheme-handler/mid=mail.desktop +x-scheme-handler/news=mail.desktop +x-scheme-handler/snews=mail.desktop +x-scheme-handler/nntp=mail.desktop +x-scheme-handler/feed=mail.desktop +x-scheme-handler/webcal=mail.desktop +x-scheme-handler/webcals=mail.desktop +application/rss+xml=mail.desktop +application/x-extension-rss=mail.desktop +application/x-extension-ics=mail.desktop + +; x-scheme-handler/magnet=torrent.desktop; +; application/x-bittorrent=torrent.desktop; +; application/rss+xml=rss.desktop diff --git a/common/.local/share/applications/browser.desktop b/common/.local/share/applications/browser.desktop new file mode 100644 index 000000000..d5e546aad --- /dev/null +++ b/common/.local/share/applications/browser.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Browser +Type=Application +Terminal=false +Exec=/usr/bin/firefox %u diff --git a/common/.local/share/applications/file.desktop b/common/.local/share/applications/file.desktop new file mode 100644 index 000000000..1515c1632 --- /dev/null +++ b/common/.local/share/applications/file.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=File Manager +Type=Application +Terminal=true +Exec=/usr/bin/st -e lfX %u diff --git a/common/.local/share/applications/image.desktop b/common/.local/share/applications/image.desktop new file mode 100644 index 000000000..298f3ed50 --- /dev/null +++ b/common/.local/share/applications/image.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Image viewer +Type=Application +Terminal=false +Exec=/usr/bin/nsxiv -a %f diff --git a/common/.local/share/applications/mail.desktop b/common/.local/share/applications/mail.desktop new file mode 100644 index 000000000..23fc25430 --- /dev/null +++ b/common/.local/share/applications/mail.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Mail Client +Type=Application +Terminal=false +Exec=/usr/lib/thunderbird/thunderbird %u diff --git a/common/.local/share/applications/pdf.desktop b/common/.local/share/applications/pdf.desktop new file mode 100644 index 000000000..47986b6b1 --- /dev/null +++ b/common/.local/share/applications/pdf.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=PDF Viewer +Type=Application +Terminal=false +Exec=/usr/bin/zathura %u diff --git a/common/.local/share/applications/text.desktop b/common/.local/share/applications/text.desktop new file mode 100644 index 000000000..14f91aa9b --- /dev/null +++ b/common/.local/share/applications/text.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Text Editor +Type=Application +Terminal=true +Exec=/usr/bin/st -e nvim %u diff --git a/common/.local/share/applications/video.desktop b/common/.local/share/applications/video.desktop new file mode 100644 index 000000000..e196db6bb --- /dev/null +++ b/common/.local/share/applications/video.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Video Player +Type=Application +Terminal=false +Exec=/usr/bin/mpv -quiet %f