aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdamani <kdamani@kdamani-art.hitronhub.home>2020-10-23 16:31:38 +0000
committerkdamani <kdamani@kdamani-art.hitronhub.home>2020-10-23 16:31:38 +0000
commit93b14ebb1f15c27ccc391a703055f2c6e7788296 (patch)
tree86e13d989200991d0bc4fbea1e5212e3ccf7976c
parentc64a9857d3521c882c84ac334384f2558d8536b4 (diff)
setbg bugfix for crons
-rwxr-xr-xScripts/.config/Scripts/setbg3
1 files changed, 2 insertions, 1 deletions
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"