My goal is to make a script to apply a certain bundle of settings all at once to my computer if something specific happens. I am currently stuck, at how to change the Windows color theme. I could figure out how to change the theme from light to dark and reverse using this code:
import subprocess
command = ['reg.exe', 'add', 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize',
'/v', 'AppsUseLightTheme', '/t', 'REG_DWORD', '/d', '0', '/f']
subprocess.run(command)
This code works, and I can use it to change from light to dark theme. But there are also other settings in this settingsboundle:
I want to be able to change color accent, like in this image there is blue selected, to another color (for example red). I could not find any way to do this, nor how to universally change Windows settings.
Do you know any way of changing the Windows color accent using Python?
Do you know of any way to change any Windows setting (such as the background, mouse cursor size, font, font size), perhaps is there even a module to it which can be used like in the following mock example:
import example
setting2 = windows.CURSOR_SIZE
setting2v = 15
example.change.setting(setting2, setting2v)
print("succesfully changed setting " + str(setting2) + " to value " + str(setting2v))
