diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-06-28 18:11:51 +0200 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-06-28 18:11:51 +0200 |
commit | 3db5b1dac4411ce7587ab012ffa3d8fc41be3479 (patch) | |
tree | 725fb070adbc4e766f6a57b758c9a6459d0342e7 | |
download | smart-wallpaper-3db5b1dac4411ce7587ab012ffa3d8fc41be3479.tar.gz smart-wallpaper-3db5b1dac4411ce7587ab012ffa3d8fc41be3479.tar.bz2 smart-wallpaper-3db5b1dac4411ce7587ab012ffa3d8fc41be3479.zip |
Initial Release
-rwxr-xr-x | smart-wallpaper | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/smart-wallpaper b/smart-wallpaper new file mode 100755 index 0000000..2815408 --- /dev/null +++ b/smart-wallpaper @@ -0,0 +1,32 @@ +#!/bin/bash + +daytimewallpaper=~/Images/wave.jpg +nightimewallpaper=~/Images/city.jpg + +while true +do + + if [ -f /usr/share/geolocate/.location ]; then + string=$(redshift -l $(cat /usr/share/geolocate/.location) -p) + if [[ $string == *"Daytime"* ]]; then + feh --randomize --bg-fill $daytimewallpaper + echo "geolocate found. DAYTIME" + else + feh --randomize --bg-fill $nightimewallpaper + echo "geolocate found. NIGHTTIME" + fi + else + string=$(redshift -p) + if [[ $string == *"Daytime"* ]]; then + feh --randomize --bg-fill $daytimewallpaper + echo "geolocate NOT found. DAYTIME" + else + feh --randomize --bg-fill $nightimewallpaper + echo "geolocate NOT found. NIGHTTIME" + fi + fi + + sleep 500 +done + +#DO TRANSITION SMOOTH |