From a41cdbd9f1b7f38ff0a787cf617a3e6d698e554a Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 13 May 2020 09:12:51 +0200 Subject: [PATCH] Add "Set Light Mode for System" - reimplements and closes #296 (thx @michalsieron) --- Default.preset | 1 + Win10.psm1 | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/Default.preset b/Default.preset index b2fa6ec..9a8255e 100644 --- a/Default.preset +++ b/Default.preset @@ -132,6 +132,7 @@ DisableShortcutInName # EnableShortcutInName SetVisualFXPerformance # SetVisualFXAppearance # EnableTitleBarColor # DisableTitleBarColor # SetAppsDarkMode # SetAppsLightMode +# SetSystemLightMode # SetSystemDarkMode # AddENKeyboard # RemoveENKeyboard # EnableNumlock # DisableNumlock # DisableEnhPointerPrecision # EnableEnhPointerPrecision diff --git a/Win10.psm1 b/Win10.psm1 index 5271e1b..2d81287 100644 --- a/Win10.psm1 +++ b/Win10.psm1 @@ -2009,6 +2009,18 @@ Function SetAppsLightMode { Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "AppsUseLightTheme" -Type DWord -Value 1 } +# Set Light Mode for System - Applicable since 1903 +Function SetSystemLightMode { + Write-Output "Setting Light Mode for System..." + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "SystemUsesLightTheme" -Type DWord -Value 1 +} + +# Set Dark Mode for System - Applicable since 1903 +Function SetSystemDarkMode { + Write-Output "Setting Dark Mode for System..." + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "SystemUsesLightTheme" -Type DWord -Value 0 +} + # Add secondary en-US keyboard Function AddENKeyboard { Write-Output "Adding secondary en-US keyboard..."