aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"