Added cpu and gpu info

This commit is contained in:
Јован Ђокић-Шумарац 2020-12-14 02:33:42 +01:00
parent 623ff235f0
commit 4f1a36553a
2 changed files with 2 additions and 3 deletions

View file

@ -12,9 +12,8 @@
#+ATTR_HTML: :alt fetchy Screenshot :title fetchy Screenshot :align left
[[https://gitlab.com/vojjvoda/fetchy/-/raw/master/screenshot.png]]
fetchy is a minimal command line system information tool written in C.
fetchy - simple cli system information tool written in C.
It displays the os, kernel, uptime, number of installed packages, shell, CPU and GPU info.
* Install

2
info.h
View file

@ -16,7 +16,7 @@ void getCPU(){
void getGPU(){
FILE *gpuName = popen("lspci -v | rg VGA -m 1 | awk -F'[' '{ print $2 }' | awk -F']' '{ print $1 }' ", "r");
FILE *gpuName = popen("lspci -v | grep VGA -m 1 | awk -F'[' '{ print $2 }' | awk -F']' '{ print $1 }' ", "r");
fscanf(gpuName, "%[^\n]%s", &gpu);
fclose(gpuName);