cuth / unsplash-wallpaper

Use an image from unsplash.com as your background image from a simple command.
MIT License
265 stars 24 forks source link

The response was not an image. #50

Open celevra opened 2 months ago

celevra commented 2 months ago

hi,

thanks for this project. i got following error:

$ unsplash-wallpaper -r Request https://source.unsplash.com/random ✗ The response was not an image.

anything i can provide?

g-ongenae commented 2 months ago

Same problem here.

It seems source has been deleted after being deprecated since November 2021: https://changelog.unsplash.com/deprecations/2021/11/25/source-deprecation.html

celevra commented 2 months ago

i've created for me a simple script:

#!/bin/bash
# export DBUS_SESSION_BUS_ADDRESS environment variable
PID=$(pgrep -o gnome-shell)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)

/usr/bin/gsettings set org.gnome.desktop.background picture-uri `/usr/bin/curl -s 'https://api.unsplash.com/photos/random?client_id=xxx&query=wallpaper&orientation=landscape&count=1' | /usr/bin/jq '.[].urls.full'`

just request an client_id from usplash https://unsplash.com/developers