maximbaz / wluma

Automatic brightness adjustment based on screen contents and ALS
ISC License
665 stars 28 forks source link

[Feature request]: Add gamma control #94

Open pyt0xic opened 10 months ago

pyt0xic commented 10 months ago

Please describe your feature request

Add the ability to set screen temperature based on sunset/sundown and manually specified times.

See #91

maximbaz commented 10 months ago

One of the biggest questions is to figure out what we can do differently and better than gammastep. I don't think we should reimplement and compete with it just for the sake of it.

Our competitive advantage is that we have access to screen content, and optionally als. Is it enough to predict the best possible screen temperature?

pyt0xic commented 10 months ago

Hmm, I think adjusting the gamma based on light levels would be quite cool. In terms of screen content, it could maybe adjust it based on the amount of dark/light content. I'm not sure how beneficial that would be. 😅

maximbaz commented 10 months ago

Maybe... On the other hand, isn't it in some sense preferable to "force" warm colors in the evening, to prepare your brain for sleep in advance, rather than keeping your screen blue just because you keep bright lights on, thereby feeding the vicious cycle that leads to staying awake until much too late? 😅😆

pyt0xic commented 10 months ago

Very true. 😂 One thing that I would like and I believe @name-snrl would be interested in as well is the ability to specify temperatures for certain times.

The sun rises very early here, but it becomes significantly brighter around 10am, so it would be nice to have more control over the "transitional" periods. I hope that makes sense...

maximbaz commented 10 months ago

To continue playing the devil's advocate, wouldn't configuring the curve be better suited for gammastep project? They already have all the code ready and battle-tested, and it should be a small adjustment to teach it how to have a better transition curves?

By the way, there's lots of project doing that, most recently I was using wlsunset instead of gammastep (my current hardware does not support wlr-gamma-control-unstable-v1 :sob: )

name-snrl commented 10 months ago

Our competitive advantage is that we have access to screen content, and optionally als. Is it enough to predict the best possible screen temperature?

I'm not sure of the prediction, but I think that by adding gamma functionality to wluma we will be able to adjust brightness more finely. e.g. with warm colors, white is less annoying at the same brightness level

I mean, it would be great to have two trainable models, one for warm colors and one for normal colors.

maximbaz commented 10 months ago

Now that is a very interesting and tempting idea to explore, that a screen color would allow for a finer tuning and therefore better predictions. Do you think you would want warmer colors during the day? You lose potentially correctness of colors...

name-snrl commented 10 months ago

Do you think you would want warmer colors during the day?

Nah, I don't need this. All I want I've described here https://github.com/maximbaz/wluma/pull/91#issuecomment-1912023531

pyt0xic commented 9 months ago

Now that is a very interesting and tempting idea to explore, that a screen color would allow for a finer tuning and therefore better predictions.

I really like this idea!

Do you think you would want warmer colors during the day? You lose potentially correctness of colors...

I use slightly warmer colors during the day, I stare at a terminal most of the time and I find it helps prevent eye strain.

I think I've worked out how to use the Wayland gamma control protocol, I'll add it to my fork as soon as I am able to set the gamma :laughing: