mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-03 16:51:29 +00:00
Compare commits
4 Commits
ae4e484d65
...
gpu_more
Author | SHA1 | Date | |
---|---|---|---|
|
c902c2d69e | ||
|
efa9ff6726 | ||
|
0e59d6c041 | ||
|
8e29cd00b3 |
9
neofetch
9
neofetch
@@ -1212,7 +1212,7 @@ get_gpu() {
|
||||
# Read GPUs into array.
|
||||
IFS=$'\n'
|
||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
|
||||
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a)
|
||||
'/"Display|"3D|"VGA/ {a[$0] = $1 $3 " " $4} END{for(i in a)
|
||||
{if(!seen[a[i]]++) print a[i]}}'))
|
||||
IFS="$old_ifs"
|
||||
|
||||
@@ -1244,6 +1244,10 @@ get_gpu() {
|
||||
;;
|
||||
|
||||
*"intel"*)
|
||||
# (sorry)
|
||||
freq="$(< /sys/devices/pci0000:00/0000:\
|
||||
"${gpu/ *}"/drm/card0/gt_cur_freq_mhz)"
|
||||
|
||||
type -p glxinfo >/dev/null && \
|
||||
gpu="$(glxinfo | grep "Device:.*Intel")"
|
||||
|
||||
@@ -1266,7 +1270,8 @@ get_gpu() {
|
||||
gpu="${gpu/Intel }"
|
||||
fi
|
||||
|
||||
prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu"
|
||||
prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu ${freq:+@ ${freq}Mhz}"
|
||||
|
||||
((++gpu_num))
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user