-
-
Save anonymous1184/9761e07daeb9e7dd2ac169eb4024f065 to your computer and use it in GitHub Desktop.
| |
; Version: 2022.11.17.1 | |
; Usage and examples: https://redd.it/owgn3j | |
Brightness(Offset) { | |
static last := "" | |
wmi := ComObjGet("winmgmts:\\.\root\WMI") | |
if (last = "") { | |
last := wmi.ExecQuery("SELECT * FROM WmiMonitorBrightness") | |
.ItemIndex(0) | |
.CurrentBrightness | |
} | |
DetectHiddenWindows On | |
hWnd := DllCall("FindWindowA", "AStr","NativeHWNDHost", "Ptr",0, "Ptr") | |
PostMessage 0xC028, 0x037,,, % "ahk_id" hWnd | |
brightness := Min(100, Max(0, last + Offset)) | |
if (brightness = last) | |
return | |
last := brightness | |
wmi.ExecQuery("SELECT * FROM WmiMonitorBrightnessMethods") | |
.ItemIndex(0) | |
.WmiSetBrightness(0, brightness) | |
ObjRelease(wmi) | |
} |
automatically regulate
Is completely out of the scope (this is for manual adjustment). Most likely there should be tools for that, and others that overlap with HDR stuff.
Thanks so much, you were right and now I no longer need to bother with the javascript bookmark!
There is one chrome extension that does this: "Sites Dimmer - sharp brightness reduction". Paired with "Dark Reader" it does an amazing job.
I'm now using "Dark Reader" to affect only several websites that I've configured it for and I made sure that "Sites Dimmer - sharp brightness reduction" wasn't affecting those, but any other website with bright colors will be set to 85% brightness automatically.
Why I'm still using "Dark Reader" is b/c I quite like the custom dark theme that I have for some websites. So using both is really nice.
Is completely out of the scope (this is for manual adjustment). Most likely there should be tools for that, and others that overlap with HDR stuff.