allow to override settings with env vars
This commit is contained in:
parent
b087727b70
commit
2efc9be21f
1 changed files with 4 additions and 4 deletions
|
@ -2,16 +2,16 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
#Unsplash API access key: https://unsplash.com/oauth/applications
|
#Unsplash API access key: https://unsplash.com/oauth/applications
|
||||||
ACCESS_KEY=""
|
: ${ACCESS_KEY:=""}
|
||||||
|
|
||||||
#Comma separated collection ids: https://unsplash.com/collections
|
#Comma separated collection ids: https://unsplash.com/collections
|
||||||
COLLECTIONS=""
|
: ${COLLECTIONS:=""}
|
||||||
|
|
||||||
#Name of the jpg file to use
|
#Name of the jpg file to use
|
||||||
WALLPAPER_LOCATION=~/Images/wallpaper.jpg
|
: ${WALLPAPER_LOCATION:=~/Images/wallpaper.jpg}
|
||||||
|
|
||||||
#Name of the info (txt) file
|
#Name of the info (txt) file
|
||||||
INFO_LOCATION=~/Images/wallpaper.txt
|
: ${INFO_LOCATION:=~/Images/wallpaper.txt}
|
||||||
|
|
||||||
#Get new random info
|
#Get new random info
|
||||||
photo=$(curl -sf -H "Accept-Version: v1" -H "Authorization: Client-ID ${ACCESS_KEY}" "https://api.unsplash.com/photos/random?featured&orientation=landscape&collections=${COLLECTIONS}&random=${RANDOM}")
|
photo=$(curl -sf -H "Accept-Version: v1" -H "Authorization: Client-ID ${ACCESS_KEY}" "https://api.unsplash.com/photos/random?featured&orientation=landscape&collections=${COLLECTIONS}&random=${RANDOM}")
|
||||||
|
|
Loading…
Reference in a new issue