Allow displaying multiple framebuffers in one line

In case the `/proc/fb` file is
    0 svgadrmfb
    1 VESA VGA
screenfetch might display as
       `/ossssso+/:-        -:/+osssso+-   GPU: svgadrmfb
    VESA
      `+sso+:-`                 `.-/+oso:
This commit is contained in:
SainoNamkho
2018-11-29 03:11:19 +08:00
committed by GitHub
parent 901d67ac3b
commit 75099939a7

View File

@@ -1605,7 +1605,7 @@ detectgpu () {
# Run it only on Intel Processors if GPU is unknown
DetectIntelGPU() {
if [ -r /proc/fb ]; then
gpu=$(awk '{print $2}' /proc/fb)
gpu=$(awk 'BEGIN {ORS = " &"} {$1="";print}' /proc/fb | sed -r s/'^\s+|\s*&$'//g)
fi
case $gpu in