From 54cfa39b7752a32116bd69f502440df91a27c2e5 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 13 May 2019 17:00:25 -0600 Subject: [PATCH] Avoid setting the wrong wallpaper if there's no IP * Addresses issue #90 --- .linux_items/include_x/airootfs/etc/skel/.update_x | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.linux_items/include_x/airootfs/etc/skel/.update_x b/.linux_items/include_x/airootfs/etc/skel/.update_x index 7b83a19e..06611081 100755 --- a/.linux_items/include_x/airootfs/etc/skel/.update_x +++ b/.linux_items/include_x/airootfs/etc/skel/.update_x @@ -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