Adjust the physical monitor brightness directly instead of multiplying gamma
There is no open issue for this, but I needed this feature regardless. If you feel it can be merged, or needs some extra work, I am happy to help get it into a mergeable state, otherwise I'll just maintain it in my fork.
It's great that this app already supports adjustable brightness, but the current implementation just multiplies the gamma which I think is effectively useless. The monitor backlight will still be running at full power, and the result on my monitor (and presumably many others) is a dim, hard to see, but still bright display.
This PR adjusts the monitor brightness directly so the backlight will dim per the configured values.
This feature could be possibly be improved in a couple ways (but it was not needed for my case so I didn't bother for now)
- There could be a setting which falls back to using gamma multiplication (e.g. if the user's display or OS does not support this)
- The physical screen brightness could have a fallback using
DeviceIoControlwhich may offer compatibility with a wider variety of screens.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.35%. Comparing base (
137b7c7) to head (fba62c2).
Additional details and impacted files
@@ Coverage Diff @@
## master #387 +/- ##
=======================================
Coverage 96.35% 96.35%
=======================================
Files 7 7
Lines 192 192
Branches 15 15
=======================================
Hits 185 185
Misses 6 6
Partials 1 1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Have you tested how it works on devices with adaptive brightness control? I.e. where the brightness adjusts based on the amount of light in the surrounding environment?
Oh man, this is an exciting pull request to see...
For a while I've been thinking about joining this project (LightBulb) with one of my other favorite tools: emoacht/Monitorian. It lets you control DDC/CI monitors from the Windows taskbar.
I'd love if I could use LightBulb to not only control the color temperature of my screens, but control the actual brightness of the backlights on a schedule as well. (e.g. 100% backlight during the day, but as the color temperature dims so would the actual monitor backlight.)
This pull request is another step closer to that dream becoming realized 😃