Files
dotfiles/modules/home/wallpaper/swww.sh
T
2025-10-29 21:33:39 +09:00

13 lines
296 B
Bash

#!/usr/bin/env bash
WALLPAPERS_DIR="${HOME}/wallpapers"
mapfile -t files < <(find "$WALLPAPERS_DIR" -type f 2>/dev/null)
[ "${#files[@]}" -eq 0 ] && exit 0
file="$(printf '%s\n' "${files[@]}" | shuf -n 1)"
echo file: "$file"
exec swww img "$file" --transition-type grow --transition-step 90