4k wallpapers ftw

This commit is contained in:
Adithya 2023-07-08 14:10:55 +05:30
parent 40e4209e7a
commit 259c8bb5a0
Signed by: adtya
GPG key ID: 48FC9915FFD326D0

View file

@ -6,7 +6,7 @@ DIR="${1:-/tmp}"
mkdir -p "$DIR" mkdir -p "$DIR"
notify-send -r 9897 -i information -t 1000 "Wallpapers" "Downloading..." notify-send -r 9897 -i information -t 1000 "Wallpapers" "Downloading..."
URL="https://wallhaven.cc/api/v1/search?categories=100&purity=100&atleast=1920x1080&ratios=16x9&sorting=random" URL="https://wallhaven.cc/api/v1/search?categories=100&purity=100&atleast=3840x2160&ratios=16x9&sorting=random"
ID="$(curl --silent "$URL" | jq -r '.data[0].id')" ID="$(curl --silent "$URL" | jq -r '.data[0].id')"
IMAGE_META=$(curl --silent "https://wallhaven.cc/api/v1/w/$ID") IMAGE_META=$(curl --silent "https://wallhaven.cc/api/v1/w/$ID")
IMAGE_URL="$(echo "$IMAGE_META" | jq -r '.data.path')" IMAGE_URL="$(echo "$IMAGE_META" | jq -r '.data.path')"