Avoid setting the wrong wallpaper if there's no IP
* Addresses issue #90
This commit is contained in:
parent
1269d1fa87
commit
54cfa39b77
1 changed files with 4 additions and 4 deletions
|
|
@ -85,10 +85,10 @@ _ip="$(ip a show scope global \
|
||||||
| grep inet \
|
| grep inet \
|
||||||
| head -1 \
|
| head -1 \
|
||||||
| sed -r 's#.*inet ([0-9]+.[0-9]+.[0-9]+.[0-9]+.)/.*#\1#')"
|
| sed -r 's#.*inet ([0-9]+.[0-9]+.[0-9]+.[0-9]+.)/.*#\1#')"
|
||||||
if [[ -e "$TEST_STATION_WALLPAPERS/$_hostname" ]]; then
|
if [[ -e "$TEST_STATION_WALLPAPERS/${_hostname:+x}" ]]; then
|
||||||
feh --bg-fill "$TEST_STATION_WALLPAPERS/$_hostname"
|
feh --bg-fill "$TEST_STATION_WALLPAPERS/${_hostname:+x}"
|
||||||
elif [[ -e "$TEST_STATION_WALLPAPERS/$_ip" ]]; then
|
elif [[ -e "$TEST_STATION_WALLPAPERS/${_ip:+x}" ]]; then
|
||||||
feh --bg-fill "$TEST_STATION_WALLPAPERS/$_ip"
|
feh --bg-fill "$TEST_STATION_WALLPAPERS/${_ip:+x}"
|
||||||
else
|
else
|
||||||
feh --bg-fill "$HOME/.wallpaper"
|
feh --bg-fill "$HOME/.wallpaper"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue