Swap shuf for a more universal alternative
This commit is contained in:
parent
c69a2397a0
commit
b829a1a5e5
1 changed files with 2 additions and 1 deletions
3
neofetch
3
neofetch
|
@ -1923,7 +1923,8 @@ getimage () {
|
||||||
"ascii") getascii; return ;;
|
"ascii") getascii; return ;;
|
||||||
*)
|
*)
|
||||||
if [ "${image: -1}" == "/" ]; then
|
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
|
else
|
||||||
img="$image"
|
img="$image"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue