Image: [Shuffle] Fixed issues with shuffle mode
This commit is contained in:
parent
cbd6dfb899
commit
a4fec94cc7
1 changed files with 3 additions and 1 deletions
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"
|
||||||
|
|
Loading…
Reference in a new issue