Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save erbanku/eac274bc41baf6fd100013020a8de151 to your computer and use it in GitHub Desktop.
Save erbanku/eac274bc41baf6fd100013020a8de151 to your computer and use it in GitHub Desktop.
Switch between Light & Dark Mode on Windows 11 using AHK
;Switch between Light & Dark Mode on Windows 11
;IN THIS CASE, APPS ON WINDOWS 11 WILL USE LIGHT/DARK MODE
^#!A::
; read current theme
RegRead, CurrentTheme, % "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", % "AppsUseLightTheme"
; toggle between themes
RegWrite, REG_DWORD, % "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", % "AppsUseLightTheme", % 1 - CurrentTheme
Return
;IN THIS CASE, SYSTEMS ON WINDOWS 11 WILL USE LIGHT/DARK MODE
^#!L::
; read current theme
RegRead, CurrentTheme, % "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", % "SystemUsesLightTheme"
; toggle between themes
RegWrite, REG_DWORD, % "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", % "SystemUsesLightTheme", % 1 - CurrentTheme
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment