gpu_driver: Add version to NVIDIA output
This commit is contained in:
parent
39cda4f29f
commit
1e8f12dd4a
8
neofetch
8
neofetch
|
@ -2293,10 +2293,16 @@ get_gpu_driver() {
|
||||||
gpu_driver="$(lspci -nnk | awk -F ': ' \
|
gpu_driver="$(lspci -nnk | awk -F ': ' \
|
||||||
'/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')"
|
'/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')"
|
||||||
gpu_driver="${gpu_driver%, }"
|
gpu_driver="${gpu_driver%, }"
|
||||||
|
|
||||||
|
if [[ "$gpu_driver" == *"nvidia"* ]]; then
|
||||||
|
gpu_driver="$(< /proc/driver/nvidia/version)"
|
||||||
|
gpu_driver="${gpu_driver/*Module }"
|
||||||
|
gpu_driver="NVIDIA ${gpu_driver/ *}"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
|
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
|
||||||
gpu_driver="Nvidia Web Driver"
|
gpu_driver="NVIDIA Web Driver"
|
||||||
else
|
else
|
||||||
gpu_driver="macOS Default Graphics Driver"
|
gpu_driver="macOS Default Graphics Driver"
|
||||||
fi
|
fi
|
||||||
|
|
Reference in New Issue