From 7dde4cc946804704c35d9d937839b5179115c8c5 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Sat, 13 Sep 2025 17:13:17 +0300 Subject: [PATCH 1/7] Ensure installation of a magit prerequisite --- .config/emacs/init.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index de9791c..3756d71 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -92,6 +92,8 @@ (use-package transient) +(use-package cond-let + :ensure (:repo "https://github.com/tarsius/cond-let")) (use-package magit :bind (("C-x g" . magit-status) ("C-x M-g" . magit-list-repositories)) From 4d7450727c0fac54ab6b31966e564f432dec40a7 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Sat, 13 Sep 2025 17:13:40 +0300 Subject: [PATCH 2/7] Set ivy-mode config options on init --- .config/emacs/init.el | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 3756d71..0be5a4f 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -141,7 +141,6 @@ ("C-" . ivy-immediate-done)) :init (ivy-add-actions 'project-find-file '(("x" counsel-locate-action-extern "open externally"))) - :config (setq ivy-re-builders-alist '((t . ivy--regex-ignore-order))) :custom From 10ec3a3a37f95974eeb27063f53e94e2223b7763 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Sat, 13 Sep 2025 17:18:00 +0300 Subject: [PATCH 3/7] Handle entries with no image download link (e.g. videos) --- .local/bin/get-nasa-apod | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.local/bin/get-nasa-apod b/.local/bin/get-nasa-apod index c873456..6ca8445 100755 --- a/.local/bin/get-nasa-apod +++ b/.local/bin/get-nasa-apod @@ -19,11 +19,17 @@ echo "Received response from API" # shellcheck disable=SC2005 echo "$(printf '%s' "${response}" | jq '.')" echo "Parsing data" -picture_date="$(printf '%s' "${response}" | jq --raw-output .date)" -picture_url="$(printf '%s' "${response}" | jq --raw-output .hdurl)" rate_remaining="$(printf '%s' "${response}" | jq '."rate-limit"')" echo "Remaining requests until rate limit: ${rate_remaining}" +if [ "$(printf '%s' "${response}" | jq 'has("hdurl")')" == "false" ]; then + echo "Response contains no download URL" + exit 1 +fi + +picture_date="$(printf '%s' "${response}" | jq --raw-output .date)" +picture_url="$(printf '%s' "${response}" | jq --raw-output .hdurl)" + echo "Generating output filename" extension="${picture_url##*.}" filename="${picture_date}.${extension}" From 4e0b14002c7f849843249ffda408256ded5c94a1 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Sat, 13 Sep 2025 17:18:50 +0300 Subject: [PATCH 4/7] Avoid path-caching behavior when displaying the downloaded image --- .local/bin/get-nasa-apod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/get-nasa-apod b/.local/bin/get-nasa-apod index 6ca8445..e2ff7d8 100755 --- a/.local/bin/get-nasa-apod +++ b/.local/bin/get-nasa-apod @@ -57,4 +57,4 @@ ln \ "${outfile}" \ "${WALLPAPERS}/today" echo "Refreshing the desktop background" -swaymsg output "*" bg "${SWAY_WALLPAPER}" fill +swaymsg output "*" bg "${outfile}" fill From dd1532c5c86e96b0fddeb8223d77d66d4cfe2cbe Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Sat, 13 Sep 2025 17:19:53 +0300 Subject: [PATCH 5/7] Increase APOD cron frequency to hourly --- .config/systemd/user/get-nasa-apod.timer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/systemd/user/get-nasa-apod.timer b/.config/systemd/user/get-nasa-apod.timer index 2585e34..e40cf59 100644 --- a/.config/systemd/user/get-nasa-apod.timer +++ b/.config/systemd/user/get-nasa-apod.timer @@ -5,7 +5,7 @@ Requires=get-nasa-apod.service [Timer] Unit=get-nasa-apod.service -OnCalendar=daily +OnCalendar=hourly [Install] WantedBy=timers.target From bf7be1613857c472eee3252de62f63a857a31b3b Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Sat, 13 Sep 2025 17:20:16 +0300 Subject: [PATCH 6/7] Clean up zellij sessions between boots --- .profile | 1 + 1 file changed, 1 insertion(+) diff --git a/.profile b/.profile index 0fb6ca3..faf5244 100644 --- a/.profile +++ b/.profile @@ -43,4 +43,5 @@ done < <(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-g # Autolaunch sway for tty1 logins [ "$(tty)" = "/dev/tty1" ] && + zellij delete-all-sessions --yes exec systemd-cat --identifier sway sway From 5a7b956474d86b188e4f75dcba7d2ed0ad2b1542 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Sat, 13 Sep 2025 17:21:28 +0300 Subject: [PATCH 7/7] Remove old exclusion path --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2fbbd49..2b3d9e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,6 @@ repos: rev: v0.0.18 hooks: - id: forbid-binary - exclude: ^\.local/share/jupyter/kernels/python3\.12/logo- - id: shellcheck - repo: https://github.com/Yelp/detect-secrets rev: v1.5.0