From 566c8096dad0c2eb8bc8bfba58ff031cd20b928e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 4 Oct 2020 14:44:04 +0300 Subject: [PATCH] term_font: Fix st font2 issue. Closes #1446 --- neofetch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index e336c53c..4a900135 100755 --- a/neofetch +++ b/neofetch @@ -3409,15 +3409,16 @@ END # like a font definition. NOTE: There is a slight limitation in this approach. # Technically "Font Name" is a valid font. As it doesn't specify any font options # though it is hard to match it correctly amongst the rest of the noise. - [[ -n "$binary" ]] && \ - term_font="$(strings "$binary" | grep -F -m 1 \ - -e "pixelsize=" \ - -e "size=" \ - -e "antialias=" \ - -e "autohint=")" + [[ -n "$binary" ]] && + term_font=$( + strings "$binary" | + + grep -m 1 "*font[^2]" + ) fi term_font="${term_font/xft:}" + term_font="${term_font#*=}" term_font="${term_font/:*}" ;;