diff --git a/.local/bin/setbg b/.local/bin/setbg index ea5bc14..728df4c 100755 --- a/.local/bin/setbg +++ b/.local/bin/setbg @@ -10,7 +10,7 @@ [ -f "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." -[ -d "$1" ] && mv "$(find "$1" -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen." +[ -d "$1" ] && mv "$(find "$1"/*.{jpg,jpeg,png} -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen." # If pywal is installed, use it. type wal >/dev/null 2>&1 && { wal -c ;