diff --git a/neofetch b/neofetch index cb5046b8..f9077387 100755 --- a/neofetch +++ b/neofetch @@ -1923,7 +1923,8 @@ getimage () { "ascii") getascii; return ;; *) if [ "${image: -1}" == "/" ]; then - img="$(find "$image" -type f \( -name '*.jpg' -o -name '*.png' \) -print0 | shuf -n1 -z)" + files=("$image"*.png "$image"*.jpg) + img="$(printf "%s" "${files[RANDOM % ${#files[@]}]}")" else img="$image" fi