From 6d71999d09d1f32fc699653ebb54520b38872ff8 Mon Sep 17 00:00:00 2001 From: Guaxinim5573 Date: Sun, 14 Mar 2021 18:51:25 -0300 Subject: [PATCH] Add GPUWU support --- uwufetch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uwufetch.c b/uwufetch.c index a8cc502..0d0480f 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -199,9 +199,10 @@ void get_info() { // get all necessary info fclose(meminfo); // gpu - FILE *gpu = popen("lspci -vnn | grep 'VGA\\|DISPLAY\\|3D'", "r"); + FILE *gpu = popen("lspci -mm | grep \"VGA\\|00:02\" | cut --fields=4,6 -d '\"' --output-delimiter=\" \" | sed \"s/ Controller.*//\"", "r"); if (gpu) { - //fscanf(gpu, "%[^\n]", gpu_model); + // Ignore error + if(fscanf(gpu, "%[^\n]", gpu_model) == 3) {}; fclose(gpu); }