Skip to content

Commit f759d8b

Browse files
HO-COOHrashil2000
andauthored
Show multiple GPUs on separate lines (lptstr#127)
* Multi-gpu on separate lines * Change back the default showdisks settings * Restore formatting * Restore formatting2 * Revert back changes in main function, change `info_gpu` instead * Revert more spaces * Apply suggestions from code review Co-authored-by: Rashil Gandhi <[email protected]> Co-authored-by: Rashil Gandhi <[email protected]>
1 parent f19207d commit f759d8b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

winfetch.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,15 @@ function info_cpu {
650650
}
651651

652652
function info_gpu {
653-
return @{
654-
title = "GPU"
655-
content = (Get-CimInstance -ClassName Win32_VideoController -Property Name -CimSession $cimSession).Name
653+
[System.Collections.ArrayList]$lines = @()
654+
#loop through Win32_VideoController
655+
foreach ($gpu in Get-CimInstance -ClassName Win32_VideoController -Property Name -CimSession $cimSession) {
656+
[void]$lines.Add(@{
657+
title = "GPU"
658+
content = $gpu.Name
659+
})
656660
}
661+
return $lines
657662
}
658663

659664

0 commit comments

Comments
 (0)