Fix for terminology: does not fallback on ascii when no wallpaper is found
When no image is set and there is no background image (or a `.xml` is detected) and the image option is set to `wall` (default), neofetch does not fallback on ascii mode. The issue comes from the line 2310: if [ ! -f "$img" ] || [ ${#term_size} -le 5 ] && [ "$image_backend" != "tycat" ]; then as `||` and `&&` have the same priority, bash does not evaluate `[ ${#term_size} -le 5 ] && [ "$image_backend" != "tycat" ]` first. Solution is simply this if [ ! -f "$img" ] || ([ ${#term_size} -le 5 ] && [ "$image_backend" != "tycat" ]); then
This commit is contained in:
parent
913321752d
commit
8334fba313
2
neofetch
2
neofetch
|
@ -2307,7 +2307,7 @@ getimage () {
|
||||||
|
|
||||||
# If $img isn't a file or the terminal doesn't support xterm escape sequences,
|
# If $img isn't a file or the terminal doesn't support xterm escape sequences,
|
||||||
# fallback to ascii mode.
|
# fallback to ascii mode.
|
||||||
if [ ! -f "$img" ] || [ ${#term_size} -le 5 ] && [ "$image_backend" != "tycat" ]; then
|
if [ ! -f "$img" ] || ([ ${#term_size} -le 5 ] && [ "$image_backend" != "tycat" ]); then
|
||||||
image="ascii"
|
image="ascii"
|
||||||
getascii
|
getascii
|
||||||
|
|
||||||
|
|
Reference in New Issue