Files
arch-system-hyprland/03-user/27-wallpapers.sh
T
2026-07-06 12:31:29 +02:00

18 lines
672 B
Bash

# Deploy wallpapers to ~/wallpapers/ — the path hyprpaper.conf preloads from
# (.config/hypr/hyprpaper.conf references /home/<user>/wallpapers/*.jpg).
SRC="$REPO_ROOT/03-user/wallpapers"
DEST="$HOME/wallpapers"
find_wp() { find "$SRC" -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.webp' \) "$@"; }
if [ -z "$(find_wp -print -quit 2>/dev/null)" ]; then
echo " no wallpapers in 03-user/wallpapers — skipping"
return 0 2>/dev/null || exit 0
fi
count=0
while IFS= read -r -d '' img; do
install -Dm644 "$img" "$DEST/$(basename "$img")" && count=$((count + 1))
done < <(find_wp -print0)
info "deployed $count wallpaper(s) → $DEST"