Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 23b9eaf

Browse files
committed
updating to work with Nvidia GPU
1 parent a980dc8 commit 23b9eaf

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

neofetch

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,17 +2482,7 @@ get_gpu() {
24822482
case $os in
24832483
"Linux")
24842484
# Read GPUs into array.
2485-
gpu_cmd="$(lspci -mm |
2486-
awk -F '\"|\" \"|\\(' \
2487-
'/"Display|"3D|"VGA/ {
2488-
a[$0] = $1 " " $3 " " ($7 ~ /^$|^Device [[:xdigit:]]+$/ ? $4 : $7)
2489-
}
2490-
END { for (i in a) {
2491-
if (!seen[a[i]]++) {
2492-
sub("^[^ ]+ ", "", a[i]);
2493-
print a[i]
2494-
}
2495-
}}')"
2485+
gpu_cmd="$(glxinfo -B | grep -Po '(?<=^OpenGL renderer string: ).*')"
24962486
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
24972487

24982488
# Remove duplicate Intel Graphics outputs.

0 commit comments

Comments
 (0)