From 23b9eaf40c70667ad62e3593c75a39b04e165280 Mon Sep 17 00:00:00 2001 From: Mohammed Abdulrazeg Date: Wed, 16 Jun 2021 11:30:57 +0100 Subject: [PATCH] updating to work with Nvidia GPU --- neofetch | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/neofetch b/neofetch index f1b2d633d..a1edb0b85 100755 --- a/neofetch +++ b/neofetch @@ -2482,17 +2482,7 @@ get_gpu() { case $os in "Linux") # Read GPUs into array. - gpu_cmd="$(lspci -mm | - awk -F '\"|\" \"|\\(' \ - '/"Display|"3D|"VGA/ { - a[$0] = $1 " " $3 " " ($7 ~ /^$|^Device [[:xdigit:]]+$/ ? $4 : $7) - } - END { for (i in a) { - if (!seen[a[i]]++) { - sub("^[^ ]+ ", "", a[i]); - print a[i] - } - }}')" + gpu_cmd="$(glxinfo -B | grep -Po '(?<=^OpenGL renderer string: ).*')" IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd" # Remove duplicate Intel Graphics outputs.