aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperRandom.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/UserScripts/WallpaperRandom.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperRandom.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh
index 70f051f7..aae80426 100755
--- a/config/hypr/UserScripts/WallpaperRandom.sh
+++ b/config/hypr/UserScripts/WallpaperRandom.sh
@@ -25,20 +25,23 @@ TYPE="random"
DURATION=1
BEZIER=".43,1.19,1,.4"
if [[ "$WWW_CMD" == "swww" || "$WWW_CMD" == "awww" ]]; then
- SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION --transition-bezier $BEZIER"
+ SWWW_PARAMS=(--transition-fps "$FPS" --transition-type "$TYPE" --transition-duration "$DURATION" --transition-bezier "$BEZIER")
else
- SWWW_PARAMS=""
+ SWWW_PARAMS=()
fi
if ! "$WWW_CMD" query >/dev/null 2>&1; then
"$WWW_DAEMON" "${WWW_DAEMON_ARGS[@]}" &
fi
-
-"$WWW_CMD" img -o "$focused_monitor" "$RANDOMPICS" $SWWW_PARAMS
+resize_mode="$(wallpaper_resize_mode "$RANDOMPICS" "$focused_monitor")"
+"$WWW_CMD" img -o "$focused_monitor" --resize "$resize_mode" "$RANDOMPICS" "${SWWW_PARAMS[@]}"
wait $!
-"$SCRIPTSDIR/WallustSwww.sh" "$RANDOMPICS" &&
+if ! "$SCRIPTSDIR/WallustSwww.sh" "$RANDOMPICS"; then
+ notify-send -u critical "Wallust failed" "Wallpaper theme not refreshed"
+ exit 1
+fi
wait $!
-sleep 2
+sleep 0.5
"$SCRIPTSDIR/Refresh.sh"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage