forked from Shinonome/dots-hyprland
Style: remove unused variables and args
This commit is contained in:
@@ -7,7 +7,6 @@ THUMBNAIL_DIR="/tmp/mpvpaper_thumbnails"
|
|||||||
CUSTOM_DIR="$XDG_CONFIG_HOME/hypr/custom"
|
CUSTOM_DIR="$XDG_CONFIG_HOME/hypr/custom"
|
||||||
RESTORE_SCRIPT_DIR="$CUSTOM_DIR/scripts"
|
RESTORE_SCRIPT_DIR="$CUSTOM_DIR/scripts"
|
||||||
RESTORE_SCRIPT="$RESTORE_SCRIPT_DIR/__restore_video_wallpaper.sh"
|
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"
|
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
|
done
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mv "$RESTORE_SCRIPT.tmp" $RESTORE_SCRIPT
|
mv "$RESTORE_SCRIPT.tmp" "$RESTORE_SCRIPT"
|
||||||
chmod +x "$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.
|
# The content of this script will be generated by switchwall.sh - Don't modify it by yourself.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mv "$RESTORE_SCRIPT.tmp" $RESTORE_SCRIPT
|
mv "$RESTORE_SCRIPT.tmp" "$RESTORE_SCRIPT"
|
||||||
}
|
}
|
||||||
|
|
||||||
switch() {
|
switch() {
|
||||||
@@ -96,12 +95,12 @@ switch() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# We take the first frame of video to colorgen
|
# 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
|
ffmpeg -y -i "$imgpath" -vframes 1 "$thumbnail" 2>/dev/null
|
||||||
|
|
||||||
if [ -f "$thumbnail" ]; then
|
if [ -f "$thumbnail" ]; then
|
||||||
"$CONFIG_DIR"/scripts/color_generation/colorgen.sh "$thumbnail" --apply --smart
|
"$CONFIG_DIR"/scripts/color_generation/colorgen.sh "$thumbnail" --apply --smart
|
||||||
create_restore_script "$video_path" "$video_opts"
|
create_restore_script "$video_path"
|
||||||
else
|
else
|
||||||
echo "Cannot create image to colorgen"
|
echo "Cannot create image to colorgen"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user