sysinfo: fix gpu name

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-09-27 21:04:54 +02:00
parent c1bdea0e57
commit f3f2a0bce5

View File

@ -1158,12 +1158,12 @@ function sysinfo() {
TEXT+="\n CPU: \Zb${CPU}\Zn"
if [ $(lspci -d ::300 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::300 | awk '{print $1}'); do
GPUNAME=$(lspci -s "${PCI}" | sed "s/\ .*://" | awk '{$1=""}1' | awk '{$1=$1};1')
GPUNAME=$(sudo lspci -s ${PCI} | sed "s/\ .*://" | awk '{$1=""}1' | awk '{$1=$1};1')
TEXT+="\n iGPU: \Zb${GPUNAME}\Zn"
done
elif [ $(lspci -d ::380 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::380 | awk '{print $1}'); do
GPUNAME=$(lspci -s "${PCI}" | sed "s/\ .*://" | awk '{$1=""}1' | awk '{$1=$1};1')
GPUNAME=$(sudo lspci -s ${PCI} | sed "s/\ .*://" | awk '{$1=""}1' | awk '{$1=$1};1')
TEXT+="\n GPU: \Zb${GPUNAME}\Zn"
done
fi