Merge pull request #819 from dylanaraps/gpu_driver
info: Add support for GPU Driver [Linux]
This commit is contained in:
commit
d077d7ab32
|
@ -26,6 +26,7 @@ print_info() {
|
|||
info "GPU" gpu
|
||||
info "Memory" memory
|
||||
|
||||
# info "GPU Driver" gpu_driver # Linux only
|
||||
# info "CPU Usage" cpu_usage
|
||||
# info "Disk" disk
|
||||
# info "Battery" battery
|
||||
|
|
|
@ -21,6 +21,7 @@ print_info() {
|
|||
info "Terminal Font" term_font
|
||||
info "CPU" cpu
|
||||
info "GPU" gpu
|
||||
info "GPU Driver" gpu_driver
|
||||
info "Memory" memory
|
||||
|
||||
info "CPU Usage" cpu_usage
|
||||
|
|
10
neofetch
10
neofetch
|
@ -2258,6 +2258,16 @@ get_locale() {
|
|||
locale="$sys_locale"
|
||||
}
|
||||
|
||||
get_gpu_driver() {
|
||||
case "$os" in
|
||||
"Linux")
|
||||
gpu_driver="$(lspci -nnk | awk -F ': ' \
|
||||
'/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')"
|
||||
gpu_driver="${gpu_driver%, }"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_cols() {
|
||||
if [[ "$color_blocks" == "on" ]]; then
|
||||
# Convert the width to space chars.
|
||||
|
|
Reference in New Issue