LightBulb icon indicating copy to clipboard operation
LightBulb copied to clipboard

Adjust the physical monitor brightness directly instead of multiplying gamma

Open caesay opened this issue 5 months ago • 3 comments

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 DeviceIoControl which may offer compatibility with a wider variety of screens.

caesay avatar Jun 26 '25 20:06 caesay

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.

codecov[bot] avatar Jun 27 '25 18:06 codecov[bot]

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?

Tyrrrz avatar Jun 28 '25 14:06 Tyrrrz

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 😃

ad08fee3 avatar Jun 30 '25 04:06 ad08fee3