fix: wallpaper set script

This commit is contained in:
Jan Meyer
2026-04-14 13:19:58 +02:00
parent 1ec31f95a2
commit 4cdaec4088

View File

@@ -7,7 +7,6 @@ WALLPAPER_HOME=$(realpath "${WALLPAPER_HOME/#~/$HOME}")
selected_file=$( selected_file=$(
( (
while IFS= read -r file; do while IFS= read -r file; do
<<<<<<< HEAD
# Pass the image path as an icon # Pass the image path as an icon
printf "%s\0icon\x1f%s\n" "$(basename "$file")" "$file" printf "%s\0icon\x1f%s\n" "$(basename "$file")" "$file"
done < <(find "$WALLPAPER_HOME" -maxdepth 1 -name '*.jpg') done < <(find "$WALLPAPER_HOME" -maxdepth 1 -name '*.jpg')
@@ -33,27 +32,6 @@ echo "$selected" > "$WALLPAPER_HOME/current/selected"
magick "$selected" -scale 10% -blur 0x2.5 -resize 1000% "$WALLPAPER_HOME/current/blurred.jpg" magick "$selected" -scale 10% -blur 0x2.5 -resize 1000% "$WALLPAPER_HOME/current/blurred.jpg"
cp "$selected" "$WALLPAPER_HOME/current/current.jpg" cp "$selected" "$WALLPAPER_HOME/current/current.jpg"
export WALLPAPER=$(cat "$WALLPAPER_HOME/current/selected") export WALLPAPER=$(cat "$WALLPAPER_HOME/current/selected")
magick "$(WALLPAPER_HOME)wallpapers/current/current.jpg" -gravity Center -crop 40x40%+0+0 +repage /tmp/matugen_target.jpg
hyprctl hyprpaper wallpaper ", $WALLPAPER" hyprctl hyprpaper wallpaper ", $WALLPAPER"
matugen -t scheme-content image "$WALLPAPER_HOME/current/current.jpg" matugen -t scheme-fidelity -m dark --source-color-index 0 image "/tmp/matugen_target.jpg"
=======
echo "$(basename "$file")"
done < <(find $WALLPAPER_HOME -maxdepth 1 -name '*.jpg')
) | sort | rofi -dmenu -i -p "Wallpapers"
)
if [ -z $selected_file ]; then
exit 1
fi
if [ ! -d $WALLPAPER_HOME/current ]; then
mkdir $WALLPAPER_HOME/current/
fi
selected="$WALLPAPER_HOME/$selected_file"
echo $selected > $WALLPAPER_HOME/current/selected
magick $selected -scale 10% -blur 0x2.5 -resize 1000% $WALLPAPER_HOME/current/blurred.jpg
cp $selected $WALLPAPER_HOME/current/current.jpg
export WALLPAPER=$(cat $WALLPAPER_HOME/current/selected)
hyprctl hyprpaper wallpaper ", $WALLPAPER"
matugen -t scheme-content image $WALLPAPER_HOME/current/current.jpg
>>>>>>> 912aac4 (chore: add thinkpad wallpapers)