From 705a79797122b5a5000d1549acd03294597c80f1 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 24 May 2025 09:49:43 +0200 Subject: [PATCH] wallpaper switcher: don't check resolution for videos --- .config/quickshell/scripts/switchwall.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/scripts/switchwall.sh b/.config/quickshell/scripts/switchwall.sh index 4547be416..a72cd46b0 100755 --- a/.config/quickshell/scripts/switchwall.sh +++ b/.config/quickshell/scripts/switchwall.sh @@ -34,8 +34,13 @@ check_and_prompt_upscale() { if command -v identify &>/dev/null && [ -f "$img" ]; then local img_width img_height - img_width=$(identify -format "%w" "$img" 2>/dev/null) - img_height=$(identify -format "%h" "$img" 2>/dev/null) + if is_video "$img"; then # Not check resolution for videos, just let em pass + img_width=$min_width_desired + img_height=$min_height_desired + else + img_width=$(identify -format "%w" "$img" 2>/dev/null) + img_height=$(identify -format "%h" "$img" 2>/dev/null) + fi if [[ "$img_width" -lt "$min_width_desired" || "$img_height" -lt "$min_height_desired" ]]; then action=$(notify-send "Upscale?" \ "Image resolution (${img_width}x${img_height}) is lower than screen resolution (${min_width_desired}x${min_height_desired})" \