From 0307f2b4ebbb3708bc22ca2ae0cfd7b201643a92 Mon Sep 17 00:00:00 2001 From: mnerv <24420859+mnerv@users.noreply.github.com> Date: Tue, 3 Feb 2026 23:54:43 +0100 Subject: [PATCH] Fetch correct GPU info --- windows/winfetch.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/windows/winfetch.ps1 b/windows/winfetch.ps1 index c6a75f4..ebc12fa 100644 --- a/windows/winfetch.ps1 +++ b/windows/winfetch.ps1 @@ -65,7 +65,14 @@ $asciiLogo = switch ($Logo) { $computerSystem = Get-CimInstance Win32_ComputerSystem $os = Get-CimInstance Win32_OperatingSystem $cpu = Get-CimInstance Win32_Processor | Select-Object -First 1 -$gpu = Get-CimInstance Win32_VideoController | Select-Object -First 1 +# Get GPU - prefer discrete GPU over integrated +$gpuList = Get-CimInstance Win32_VideoController | Where-Object { $_.Status -eq 'OK' -or $_.Availability -eq 3 } +$gpu = $gpuList | Where-Object { + $_.Name -match 'NVIDIA|AMD|Radeon|GeForce|RTX|GTX|RX\s*\d' +} | Select-Object -First 1 +if (-not $gpu) { + $gpu = $gpuList | Select-Object -First 1 +} $disk = Get-PSDrive -PSProvider FileSystem | Where-Object { $_.Name -eq 'C' } # Calculate uptime