From 84fe65001b0ac391dc479da4d02473e43b9903b0 Mon Sep 17 00:00:00 2001 From: Marterich Date: Wed, 26 Jun 2024 13:30:26 +0000 Subject: [PATCH 1/3] Compile Winutil --- winutil.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index 682c746b..e714945e 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -8,7 +8,7 @@ Author : Chris Titus @christitustech Runspace Author: @DeveloperDurp GitHub : https://github.com/ChrisTitusTech - Version : 24.06.25 + Version : 24.06.26 #> param ( [switch]$Debug, @@ -45,7 +45,7 @@ Add-Type -AssemblyName System.Windows.Forms # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) $sync.PSScriptRoot = $PSScriptRoot -$sync.version = "24.06.25" +$sync.version = "24.06.26" $sync.configs = @{} $sync.ProcessRunning = $false From e91937c9d901f171051356106e68eb2754214168 Mon Sep 17 00:00:00 2001 From: Martin Wiethan <47688561+Marterich@users.noreply.github.com> Date: Thu, 27 Jun 2024 18:55:20 +0200 Subject: [PATCH 2/3] Refactor @blueswills changes --- functions/private/Invoke-WinUtilGPU.ps1 | 36 ++++++++++--------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/functions/private/Invoke-WinUtilGPU.ps1 b/functions/private/Invoke-WinUtilGPU.ps1 index e5436f82..13e4fb76 100644 --- a/functions/private/Invoke-WinUtilGPU.ps1 +++ b/functions/private/Invoke-WinUtilGPU.ps1 @@ -1,29 +1,21 @@ function Invoke-WinUtilGPU { $gpuInfo = Get-CimInstance Win32_VideoController - - foreach ($gpu in $gpuInfo) { - $gpuName = $gpu.Name - if ($gpuName -like "*NVIDIA*") { - return $true # NVIDIA GPU found - } - } + + # GPUs to blacklist from using Demanding Theming + $lowPowerGPUs = ( + "*NVIDIA GeForce*M*", + "*NVIDIA GeForce*Laptop*", + "*NVIDIA GeForce*GT*", + "*AMD Radeon(TM)*", + "*UHD*" + ) foreach ($gpu in $gpuInfo) { - $gpuName = $gpu.Name - if ($gpuName -like "*AMD Radeon RX*") { - return $true # AMD GPU Found - } - } - foreach ($gpu in $gpuInfo) { - $gpuName = $gpu.Name - if ($gpuName -like "*UHD*") { - return $false # Intel Intergrated GPU Found - } - } - foreach ($gpu in $gpuInfo) { - $gpuName = $gpu.Name - if ($gpuName -like "*AMD Radeon(TM)*") { - return $false # AMD Intergrated GPU Found + foreach ($gpuPattern in $lowPowerGPUs){ + if ($gpu.Name -like $gpuPattern) { + return $false + } } } + return $true } \ No newline at end of file From 8b3d2274d3fc5457f1a017da106e00af34010bd5 Mon Sep 17 00:00:00 2001 From: Martin Wiethan <47688561+Marterich@users.noreply.github.com> Date: Thu, 27 Jun 2024 18:56:49 +0200 Subject: [PATCH 3/3] Change Date to allow for easy merge --- winutil.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index e714945e..682c746b 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -8,7 +8,7 @@ Author : Chris Titus @christitustech Runspace Author: @DeveloperDurp GitHub : https://github.com/ChrisTitusTech - Version : 24.06.26 + Version : 24.06.25 #> param ( [switch]$Debug, @@ -45,7 +45,7 @@ Add-Type -AssemblyName System.Windows.Forms # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) $sync.PSScriptRoot = $PSScriptRoot -$sync.version = "24.06.26" +$sync.version = "24.06.25" $sync.configs = @{} $sync.ProcessRunning = $false