set wallpaper

This commit is contained in:
2025-10-29 20:42:17 +09:00
parent 262bb6821a
commit 5a70da2880
4 changed files with 84 additions and 15 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# set-wallpaper.sh
set -euo pipefail
WALLS="${HOME}/wallpapers"
# Pick up wallpaper(jpg/jpeg/png/webp)
mapfile -t files < <(find "$WALLS" -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.webp' \))
[[ ${#files[@]} -gt 0 ]] || exit 0
pick="${files[RANDOM % ${#files[@]}]}"
exec swww img "$pick" --transition-type any --transition-step 90 --transition-fps 60