Skip to content

draft: workspace: add automatic brightness adjustment

I tested this on my Framework 13 laptop. By just translating lux/100 -> brightness, I have

  • the exact brightness I want when the light is on full brightness in my room
  • 100% brightness when the sun shines in my room (it's dark rn, emulated with a flashlight)
  • way too dark when I dim the lights a bunch. I haven't found a nice function to make it work like I want to yet

Draft because

  • this needs an animation, ideally a very slow one. You should usually not notice the automatic brightness kicking in
  • this needs a way to turn it off (or on), possibly per display
  • different users have different brightness preferences, displays have a different max. brightness and some even brightness curves, which we usually don't know. I see a few possible ways to deal with that:
    • make the brightness slider act as an offset of sorts. Easy to implement, and at least in a small range of environmental brightness it should work relatively well. It doesn't handle differences in max. display brightness well though, and afaik Android also did that in the past, and it was known to not work that well...
    • allow the user to configure this with two parameters, offset + scaling. I don't know if that's enough though.
    • leave the brightness slider as a way to configure the brightness, and do something smart like Android does nowadays to detect the user's intention. The easiest implementation would be to have a lookup table for lux -> brightness / a modifier for a predefined function, and adjust the table when the user manually changes the brightness

Depends on !5842 and the powerdevil counterpart

Merge request reports