This commit is contained in:
2025-08-17 06:11:01 +02:00
parent 272d7b12b2
commit f68a8428f2
17 changed files with 451 additions and 51 deletions

View File

@@ -9,9 +9,17 @@ fi
[ -z "$image" ] && exit 1
ext=${image##*.}
image_copied="$HOME/.config/hypr/wallpaper.$ext"
current_dir="$HOME/.config/wallpaper_chooser/current"
image_copied="$current_dir/wallpaper.$ext"
cp -f "$image" "$image_copied" || exit 1
temp_img=$(mktemp --suffix=.$ext) || exit 1
cp "$image" "$temp_img" || exit 1
rm -f "$current_dir"/wallpaper.*
cp -f "$temp_img" "$image_copied" || (
rm -f "$temp_img"
exit 1
)
rm -f "$temp_img"
hyprctl hyprpaper reload ,"$image_copied" || exit 1
echo "preload = $image_copied" >"$HOME/.config/hypr/hyprpaper.conf"