From 93b14ebb1f15c27ccc391a703055f2c6e7788296 Mon Sep 17 00:00:00 2001 From: kdamani Date: Fri, 23 Oct 2020 12:31:38 -0400 Subject: setbg bugfix for crons --- Scripts/.config/Scripts/setbg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Scripts') diff --git a/Scripts/.config/Scripts/setbg b/Scripts/.config/Scripts/setbg index 5d7e920..47f0087 100755 --- a/Scripts/.config/Scripts/setbg +++ b/Scripts/.config/Scripts/setbg @@ -15,4 +15,5 @@ WALLPAPER_HOME="$HOME/.config/wall.png" [ -d "$1" ] && cp -f "$(find "$1" -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -type f | shuf -n 1)" "$WALLPAPER_HOME" && notify-send -i "$WALLPAPER_HOME" "Random Wallpaper chosen." # wal is installed, use it. -$(which wal) -c && $(which wal) -o $HOME/.config/Scripts/done.sh -i "$WALLPAPER_HOME" +WALPATH=$( ([[ -f /usr/bin/wal ]] && echo "/usr/bin/wal") || ([[ -f /usr/local/bin/wal ]] && echo "/usr/local/bin/wal") ) +"$WALPATH" -c && "$WALPATH" -o $HOME/.config/Scripts/done.sh -i "$WALLPAPER_HOME" -- cgit v1.2.3