Add more flexible bg setting script

This commit is contained in:
Colin Powell
2020-02-06 13:27:56 -05:00
parent db25d1fa2a
commit c9452242de

View File

@ -10,7 +10,7 @@ export DISPLAY=:0.0
export XAUTHORITY=/home/powellc/.Xauthority
# Choices: astrobin,natgeo,nasa
BASEDIR="$HOME/var/backgrounds/astrobin/"
BASEDIR="$HOME/var/backgrounds/natgeo/"
# Get daily NatGeo POTD
python3 ~/.bin/get_natgeo_potd.py
@ -20,9 +20,22 @@ date=$(date '+%Y-%m-%d')
#set the current image as wallpaper
hsetroot -cover $BASEDIR/$date.jpg
#link slim background to new image
rm /usr/share/slim/themes/default/background.jpg
ln -s $BASEDIR/$date.jpg /usr/share/slim/themes/default/background.jpg
SLIM_BG_FILE=/usr/share/slim/themes/default/background.jpg
if test -f "$SLIM_BG_FILE"; then
echo "Setting Slim background image"
rm $SLIM_BG_FILE
ln -s $BASEDIR/$date.jpg $SLIM_BG_FILE
fi
SEARX_BG_FILE=/usr/local/lib/python2.7/site-packages/searx/static/themes/courgette/img/bg-body-index.jpg
if test -f "$SEARX_BG_FILE"; then
echo "Setting Searx background image"
rm $SEARX_BG_FILE
ln -s $BASEDIR/$date.jpg $SEARX_BG_FILE
fi
echo "Background and slim wallpaper set using Astrobin PotD"