win10-toggle-theme
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
# Python3 | |
# Double click this file to change app mode theme in Windows 10 | |
# Dark theme is 0 and light theme is 1 | |
import os | |
import subprocess | |
themecolour = int(os.popen("reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /v AppsUseLightTheme").read().rstrip()[-1]) | |
changedtheme = str(int(not bool(themecolour))) | |
command = ['reg.exe', 'add', 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize', | |
'/v', 'AppsUseLightTheme', '/t', 'REG_DWORD', '/d', changedtheme, '/f'] | |
subprocess.call(command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment