commit 462c624b4a9617741c535f170654ae53f89abcf6 Author: Daniel Tsvetkov Date: Mon Oct 9 11:04:34 2017 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c6e766 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +image.jpg diff --git a/apod.sh b/apod.sh new file mode 100755 index 0000000..ca2eaf0 --- /dev/null +++ b/apod.sh @@ -0,0 +1,5 @@ +#!/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` +curl -s "$NASA_APOD_BASE_URL/$IMAGE_URL" > image.jpg +gsettings set org.gnome.desktop.background picture-uri "file:///$(pwd)/image.jpg"