From 8334fba31338bd3ac1bf5c1a7575ad418944c4e9 Mon Sep 17 00:00:00 2001 From: Vincent Aranega Date: Fri, 10 Jun 2016 16:47:06 +0200 Subject: [PATCH] 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 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 8781466a..d5d44c92 100755 --- a/neofetch +++ b/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