2017-10-09 10:04:34 +02:00
|
|
|
#!/bin/bash
|
|
|
|
NASA_APOD_BASE_URL="https://apod.nasa.gov/apod"
|
|
|
|
IMAGE_URL=`curl -s $NASA_APOD_BASE_URL/astropix.html | grep -oh 'href="image/.*"' | grep -oh 'image/.*jpg' | head -1`
|
2017-12-14 10:48:10 +01:00
|
|
|
if [ -z "$IMAGE_URL" ]; then
|
2018-03-25 03:48:29 +02:00
|
|
|
# gsettings set org.gnome.desktop.background picture-uri "file:///home/pi2/Pictures/wallpapers/blue_galaxy_wallpaper.png"
|
2019-04-29 19:02:02 +02:00
|
|
|
xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitoreDP-1/workspace0/last-image --set /home/pi2/Pictures/wallpapers/blue_galaxy_wallpaper.png
|
|
|
|
xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitorHDMI-2/workspace0/last-image --set /home/pi2/Pictures/wallpapers/blue_galaxy_wallpaper.png
|
|
|
|
# feh --randomize --bg-fill /home/pi2/Pictures/wallpapers/*
|
2017-12-13 15:45:44 +01:00
|
|
|
else
|
2017-12-15 23:37:23 +01:00
|
|
|
curl -s "$NASA_APOD_BASE_URL/$IMAGE_URL" > image.jpg
|
2018-03-25 03:48:29 +02:00
|
|
|
# gsettings set org.gnome.desktop.background picture-uri "file:///$(pwd)/image.jpg"
|
2019-04-29 19:02:02 +02:00
|
|
|
xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitoreDP-1/workspace0/last-image --set "$(pwd)/image.jpg"
|
|
|
|
xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitorHDMI-2/workspace0/last-image --set "$(pwd)/image.jpg"
|
|
|
|
# feh --bg-fill "$(pwd)/image.jpg"
|
2017-12-13 15:45:44 +01:00
|
|
|
fi
|