mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 09:08:38 +00:00
GPU: [Linux] Hide duplicate lines
This commit is contained in:
2
neofetch
2
neofetch
@@ -1064,7 +1064,7 @@ get_gpu() {
|
||||
"Linux")
|
||||
# Read GPUs into array.
|
||||
IFS=$'\n'
|
||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
|
||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '!a[$0]++ && /"Display|"3D|"VGA/ {print $3 " " $4}'))
|
||||
IFS="$old_ifs"
|
||||
|
||||
# Number the GPUs if more than one exists.
|
||||
|
Reference in New Issue
Block a user