Created
August 22, 2021 00:08
-
-
Save lukejjh/c22c712c31cffb9a80ca2b9989345a1b to your computer and use it in GitHub Desktop.
PowerShell script that toggles dark mode in Windows 10/11, for both apps and system.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$k = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" | |
$v = (Get-ItemProperty -Path $k).SystemUsesLightTheme -bxor 1 | |
Set-ItemProperty -Path $k -Name "SystemUsesLightTheme" -Value $v | |
Set-ItemProperty -Path $k -Name "AppsUseLightTheme" -Value $v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment