Image: [Shuffle] Fixed issues with shuffle mode
This commit is contained in:
parent
cbd6dfb899
commit
a4fec94cc7
4
neofetch
4
neofetch
|
@ -2058,8 +2058,10 @@ get_image_source() {
|
||||||
|
|
||||||
*)
|
*)
|
||||||
if [[ -d "$image_source" ]]; then
|
if [[ -d "$image_source" ]]; then
|
||||||
|
shopt -s nullglob
|
||||||
files=("${image_source%/}"/*.{png,jpg,jpeg,jpe,gif})
|
files=("${image_source%/}"/*.{png,jpg,jpeg,jpe,gif})
|
||||||
printf -v image "%s" "${files[RANDOM % (${#files[@]} - 1)]}"
|
shopt -u nullglob
|
||||||
|
image="${files[RANDOM % ${#files[@]}]}"
|
||||||
|
|
||||||
else
|
else
|
||||||
image="$image_source"
|
image="$image_source"
|
||||||
|
|
Reference in New Issue