Add aopd to changepaper script
This commit is contained in:
@ -29,3 +29,26 @@ then
|
||||
else
|
||||
echo "No Wallpaper today"
|
||||
fi
|
||||
|
||||
# Then grab our APOD image and store it for now
|
||||
#Change directory to where the script resides.
|
||||
BASEDIR="$HOME/var/inbox/apod_photos"
|
||||
cd $BASEDIR
|
||||
#######################
|
||||
|
||||
#getting the image URL
|
||||
img="$(curl https://api.nasa.gov/planetary/apod\?api_key=AdfgdnmmInYgpDMEq3ShMLKjJ7DZ7jyUcgLHWdgw | jq .hdurl | tr -d \")"
|
||||
|
||||
#check to see if there is any wallpaper to download
|
||||
if [ -n "$img" ]
|
||||
then
|
||||
img_file=`echo $img | cut -d/ -f 7 | tr -d \"`
|
||||
curl $img > $img_file
|
||||
#set the current image as wallpaper
|
||||
#feh --bg-scale $BASEDIR/$img_file
|
||||
##link slim background to new image
|
||||
#rm /usr/share/slim/themes/default/background.jpg
|
||||
#ln -s $BASEDIR/$img_file /usr/share/slim/themes/default/background.jpg
|
||||
else
|
||||
echo "No Wallpaper today"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user