add swww interface script

This commit is contained in:
Emile Clark-Boman 2025-08-02 12:46:19 +10:00
parent b303ffb3cc
commit fe8db21616

17
scripts/set-wallpaper Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# THIS PROGRAM RELIES SOLELY ON `SWWW`
transition=$1
wallpaper_path=$2
if [[ "$transition" == "wipe" ]]; then
swww img --transition-type wipe --transition-angle 30 --transition-step 90 --transition-fps 60 $wallpaper_path
elif [[ "$transition" == "preview" ]]; then
swww img --transition-type wipe --transition-angle 45 --transition-step 90 --transition-bezier .27,.98,.78,0 --transition-fps 60 $wallpaper_path
elif [[ "$transition" == "circle" ]]; then
swww img --transition-type grow --transition-pos "$(hyprctl cursorpos)" --transition-duration 3 --transition-fps 60 --invert-y $wallpaper_path
else
echo "[!] Unknown transition type \"$transition\""
exit 1
fi