Avoid setting the wrong wallpaper if there's no IP

* Addresses issue #90
This commit is contained in:
2Shirt 2019-05-13 17:00:25 -06:00
parent 1269d1fa87
commit 54cfa39b77
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -85,10 +85,10 @@ _ip="$(ip a show scope global \
| grep inet \
| head -1 \
| sed -r 's#.*inet ([0-9]+.[0-9]+.[0-9]+.[0-9]+.)/.*#\1#')"
if [[ -e "$TEST_STATION_WALLPAPERS/$_hostname" ]]; then
feh --bg-fill "$TEST_STATION_WALLPAPERS/$_hostname"
elif [[ -e "$TEST_STATION_WALLPAPERS/$_ip" ]]; then
feh --bg-fill "$TEST_STATION_WALLPAPERS/$_ip"
if [[ -e "$TEST_STATION_WALLPAPERS/${_hostname:+x}" ]]; then
feh --bg-fill "$TEST_STATION_WALLPAPERS/${_hostname:+x}"
elif [[ -e "$TEST_STATION_WALLPAPERS/${_ip:+x}" ]]; then
feh --bg-fill "$TEST_STATION_WALLPAPERS/${_ip:+x}"
else
feh --bg-fill "$HOME/.wallpaper"
fi