GPU: Rename index to gpu_num
This commit is contained in:
parent
7069410ef2
commit
988c0b29a7
1 changed files with 3 additions and 3 deletions
6
neofetch
6
neofetch
|
@ -969,7 +969,7 @@ get_gpu() {
|
||||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
|
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
|
||||||
|
|
||||||
# Number the GPUs if more than one exists.
|
# Number the GPUs if more than one exists.
|
||||||
[[ "${#gpus[@]}" > 1 ]] && index=0
|
[[ "${#gpus[@]}" > 1 ]] && gpu_num=0
|
||||||
|
|
||||||
for gpu in "${gpus[@]}"; do
|
for gpu in "${gpus[@]}"; do
|
||||||
case "$gpu" in
|
case "$gpu" in
|
||||||
|
@ -1005,8 +1005,8 @@ get_gpu() {
|
||||||
gpu="${gpu/Intel }"
|
gpu="${gpu/Intel }"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
prin "GPU${index}" "$gpu"
|
prin "GPU${gpu_num}" "$gpu"
|
||||||
index="$((index+=1))"
|
gpu_num="$((gpu_num+=1))"
|
||||||
done
|
done
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue