diff --git a/README.md b/README.md index c6a9b27..6686277 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # apod-desktop -Script to set your Linux desktop wallpaper to the Astronomy Picture of the Day. +Script to set your Linux or Windows 10 desktop wallpaper to the Astronomy Picture of the Day. ## Usage Invoke the script on login using a method appropriate to your desktop manager ``` -Usage: apod gnome1|gnome22|gnome24|gnome3|kde|fvwm|fvwm-xv|xfce|xfce4|hsetroot +Usage: apod gnome1|gnome22|gnome24|gnome3|kde|fvwm|fvwm-xv|xfce|xfce4|hsetroot|windows ``` ## How it works @@ -19,6 +19,7 @@ The current supported list is as follows: * XFCE * Enlightenment * Generic X11 using hsetroot +* Windows 10 ## Temporary transition image I found that for some desktops, resetting the wallpaper to a new file with the same name did not always refresh. For those desktop managers, I switch to a default temporary image first, then back to the new APOD image. I have provided a sample image with this repository which is a copy of the classic RCA "Indian Head" TV test pattern [Source](https://en.wikipedia.org/wiki/File:RCA_Indian_Head_test_pattern.JPG). This is of course highly insensitive, so feel free to change it to something else you prefer. diff --git a/apod b/apod index 05f0192..28edcc2 100755 --- a/apod +++ b/apod @@ -9,11 +9,11 @@ ########################################### # CHANGE THE FOLLOWING TO SUIT YOUR NEEDS -imgdir=$HOME/pics +imgdir=$HOME/Pictures tmpimg=$imgdir/rca_indian_head_test_pattern.jpg # base URL for the APOD website -baseurl=http://apod.nasa.gov/apod/ +baseurl=https://apod.nasa.gov/apod/ # base URL plus name of the page where the current picture can be found sourceurl=${baseurl}astropix.html tmpfile=/tmp/astropix.html @@ -21,7 +21,7 @@ imgfile=$imgdir/apod.jpg # attempt to retrieve the astropix page echo getting page ${sourceurl} -wget ${sourceurl} -T 10 -q -O $tmpfile +curl ${sourceurl} -s -o "$tmpfile" if [ $? -ne 0 ]; then echo "Unable to retrieve page"; @@ -29,11 +29,11 @@ if [ $? -ne 0 ]; then else # extract the image url from the astropix page echo getting image url - imgurl=`cat $tmpfile | grep -i "img src" | sed -e 's/.*