mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-24 20:34:57 +00:00
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:
2
neofetch
2
neofetch
@@ -2307,7 +2307,7 @@ getimage () {
|
||||
|
||||
# If $img isn't a file or the terminal doesn't support xterm escape sequences,
|
||||
# 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"
|
||||
getascii
|
||||
|
||||
|
||||
Reference in New Issue
Block a user