From 4b91c94360e4981ef36a96eb3266c616dc000ba3 Mon Sep 17 00:00:00 2001 From: gitfib Date: Fri, 24 Sep 2021 08:35:23 +0300 Subject: [PATCH] Improve GPU Reading on Linux (#1916) GPUs that have subsystem name but no revision number can be processed correctly by using $(NF-1) instead of $7 in the awk --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 268b10aa..db47a471 100755 --- a/neofetch +++ b/neofetch @@ -2491,7 +2491,7 @@ get_gpu() { gpu_cmd="$(lspci -mm | awk -F '\"|\" \"|\\(' \ '/"Display|"3D|"VGA/ { - a[$0] = $1 " " $3 " " ($7 ~ /^$|^Device [[:xdigit:]]+$/ ? $4 : $7) + a[$0] = $1 " " $3 " " ($(NF-1) ~ /^$|^Device [[:xdigit:]]+$/ ? $4 : $(NF-1)) } END { for (i in a) { if (!seen[a[i]]++) {