From ab6f891d44fa7a4cb74aee3814b055d17f027c91 Mon Sep 17 00:00:00 2001 From: Harzo Date: Tue, 30 May 2023 23:03:21 +0200 Subject: [PATCH] random-wallpaper: Add .current-wallpaper It resides in the user's runtime directory. --- .scripts/system/random-wallpaper | 1 + 1 file changed, 1 insertion(+) diff --git a/.scripts/system/random-wallpaper b/.scripts/system/random-wallpaper index 5d0f2e0..cc14d00 100755 --- a/.scripts/system/random-wallpaper +++ b/.scripts/system/random-wallpaper @@ -11,6 +11,7 @@ interval_secs="$(echo "60 * ${INTERVAL}" | bc)" while true; do wallpaper="$(fd '\.(png|jpe?g|gif)$' "$WALLPAPER_DIR" --type f --type l -L | shuf | head -1)" + ln -sf "$wallpaper" "/run/user/$(id -u)/.current-wallpaper" swww img "$wallpaper" sleep "$interval_secs" done