Commit 067c200b authored by Dylan Araps's avatar Dylan Araps

Simplified image shuffle, thanks @aranega

parent 05274696
...@@ -2264,8 +2264,8 @@ getimage () { ...@@ -2264,8 +2264,8 @@ getimage () {
"wall") getwallpaper ;; "wall") getwallpaper ;;
"ascii") getascii; return ;; "ascii") getascii; return ;;
*) *)
if [ "${image: -1}" == "/" ]; then if [ -d "$image" ]; then
files=("$image"*.png "$image"*.jpg) files=("$image"*.{png,jpg,jpeg})
img="$(printf "%s" "${files[RANDOM % (${#files[@]} - 1)]}")" img="$(printf "%s" "${files[RANDOM % (${#files[@]} - 1)]}")"
else else
img="$image" img="$image"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment