From c5f3f7626a9b1d9b663cd19c994245f8674c77f1 Mon Sep 17 00:00:00 2001 From: Ciriaco Garcia de Celis Date: Fri, 26 Apr 2019 01:47:05 +0200 Subject: [PATCH] give precedence to "Hardware" entry in /proc/cpuinfo --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 55e53238..bb4dd2a4 100755 --- a/neofetch +++ b/neofetch @@ -1816,9 +1816,9 @@ get_cpu() { ;; *) - cpu="$(awk -F ': | @' \ + cpu="$(awk -F '\\s*: | @' \ '/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ { - printf $2; exit}' "$cpu_file")" + cpu=$2; if ($1 == "Hardware") exit } END { print cpu }' "$cpu_file")" ;; esac