From 2d8739d1e8568eaac2b5a68a22b6051684d83f51 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Thu, 20 Feb 2020 13:57:55 -0500 Subject: [PATCH] Add parameters to changepaper.sh script --- bin/.bin/changepaper.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/.bin/changepaper.sh b/bin/.bin/changepaper.sh index efc446e..bfc0514 100755 --- a/bin/.bin/changepaper.sh +++ b/bin/.bin/changepaper.sh @@ -9,9 +9,15 @@ export DISPLAY=:0.0 export XAUTHORITY=/home/powellc/.Xauthority -# Choices: astrobin,natgeo,nasa,unsplash -BASEDIR="$HOME/var/backgrounds/bing/" -SEARX_BASEDIR="$HOME/var/backgrounds/natgeo/" +if [ -n "$1" ]; then + SOURCE=$1 +else + SOURCE='astrobin' +fi + +# Choices: astrobin,natgeo,nasa,unsplash,bing +BASEDIR="$HOME/var/backgrounds/$SOURCE/" +SEARX_BASEDIR="$HOME/var/backgrounds/bing/" # Get daily NatGeo POTD python3 ~/.bin/get_natgeo_potd.py