From def2d6f3839671e2c5369fcf947066e5d259a1f6 Mon Sep 17 00:00:00 2001 From: obsidrielle <1049617132@qq.com> Date: Wed, 14 May 2025 12:01:51 +0800 Subject: [PATCH] Style: remove unused variables and args --- .config/ags/scripts/color_generation/switchwall.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.config/ags/scripts/color_generation/switchwall.sh b/.config/ags/scripts/color_generation/switchwall.sh index 1d295ff48..e3ab24ded 100755 --- a/.config/ags/scripts/color_generation/switchwall.sh +++ b/.config/ags/scripts/color_generation/switchwall.sh @@ -7,7 +7,6 @@ THUMBNAIL_DIR="/tmp/mpvpaper_thumbnails" CUSTOM_DIR="$XDG_CONFIG_HOME/hypr/custom" RESTORE_SCRIPT_DIR="$CUSTOM_DIR/scripts" RESTORE_SCRIPT="$RESTORE_SCRIPT_DIR/__restore_video_wallpaper.sh" -EXECS_CONF="$CUSTOM_DIR/execs.conf" VIDEO_OPTS="no-audio loop hwdec=auto scale=bilinear interpolation=no video-sync=display-resample panscan=1.0 video-scale-x=1.0 video-scale-y=1.0 video-align-x=0.5 video-align-y=0.5" @@ -40,7 +39,7 @@ for monitor in \$(hyprctl monitors -j | jq -r '.[] | .name'); do done EOF - mv "$RESTORE_SCRIPT.tmp" $RESTORE_SCRIPT + mv "$RESTORE_SCRIPT.tmp" "$RESTORE_SCRIPT" chmod +x "$RESTORE_SCRIPT" } @@ -50,7 +49,7 @@ remove_restore() { # The content of this script will be generated by switchwall.sh - Don't modify it by yourself. EOF - mv "$RESTORE_SCRIPT.tmp" $RESTORE_SCRIPT + mv "$RESTORE_SCRIPT.tmp" "$RESTORE_SCRIPT" } switch() { @@ -96,12 +95,12 @@ switch() { done # We take the first frame of video to colorgen - thumbnail="$THUMBNAIL_DIR/$(basename $"imgpath").jpg" + thumbnail="$THUMBNAIL_DIR/$(basename "$imgpath").jpg" ffmpeg -y -i "$imgpath" -vframes 1 "$thumbnail" 2>/dev/null if [ -f "$thumbnail" ]; then "$CONFIG_DIR"/scripts/color_generation/colorgen.sh "$thumbnail" --apply --smart - create_restore_script "$video_path" "$video_opts" + create_restore_script "$video_path" else echo "Cannot create image to colorgen" fi