random-wallpaper: Add .current-wallpaper

It resides in the user's runtime directory.
This commit is contained in:
Harzo 2023-05-30 23:03:21 +02:00
parent 471a567e40
commit ab6f891d44
1 changed files with 1 additions and 0 deletions

View File

@ -11,6 +11,7 @@ interval_secs="$(echo "60 * ${INTERVAL}" | bc)"
while true; do while true; do
wallpaper="$(fd '\.(png|jpe?g|gif)$' "$WALLPAPER_DIR" --type f --type l -L | shuf | head -1)" 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" swww img "$wallpaper"
sleep "$interval_secs" sleep "$interval_secs"
done done