mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-25 04:44:56 +00:00
Simplified image shuffle, thanks @aranega
This commit is contained in:
4
neofetch
4
neofetch
@@ -2264,8 +2264,8 @@ getimage () {
|
||||
"wall") getwallpaper ;;
|
||||
"ascii") getascii; return ;;
|
||||
*)
|
||||
if [ "${image: -1}" == "/" ]; then
|
||||
files=("$image"*.png "$image"*.jpg)
|
||||
if [ -d "$image" ]; then
|
||||
files=("$image"*.{png,jpg,jpeg})
|
||||
img="$(printf "%s" "${files[RANDOM % (${#files[@]} - 1)]}")"
|
||||
else
|
||||
img="$image"
|
||||
|
||||
Reference in New Issue
Block a user