fix random konachan script not updating wallpaper (#1661)

This commit is contained in:
end-4
2025-07-20 16:28:03 +02:00
committed by GitHub
@@ -15,5 +15,10 @@ response=$(curl "https://konachan.net/post.json?tags=rating%3Asafe&limit=1&page=
link=$(echo "$response" | jq '.[0].file_url' -r);
ext=$(echo "$link" | awk -F. '{print $NF}')
downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image.$ext"
illogicalImpulseConfigPath="$HOME/.config/illogical-impulse/config.json"
currentWallpaperPath=$(jq -r '.background.wallpaperPath' $illogicalImpulseConfigPath)
if [ "$downloadPath" == "$currentWallpaperPath" ]; then
downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image-1.$ext"
fi
curl "$link" -o "$downloadPath"
"$SCRIPT_DIR/switchwall.sh" --image "$downloadPath"