-
Couldn't load subscription status.
- Fork 434
Description
Is your feature request related to a problem? Please describe.
The new wlr-gamma-control protocol (used by wlroots based wayland compositors like sway, and implemented in https://github.com/minus7/redshift/tree/wayland ) has a "feature" that the gamma adjustment resets when the client exits like Quartz.
I'm exclusively using redshift manually with a script that lets me bump the temperature up/down on key bindings, like brightness, and while it is easy to make redshift not exit until it is killed there is a small flicker when I replace an instance of redshift with another.
Describe the solution you'd like
I'd like to be able to implement a trivial "stdin" or "manual control" provider - something simple that would just read from stdin continuously (blocking), try to convert each line of input to a temperature and if it could just apply it.
The problem is that providers aren't meant to provide a temperature directly, but a location that will let the main loop compute where the sun is and what temperature should be used -- the plugin model would need to be adapted to have the provider give either location or temp.
The least bad approach I can think of for that would be to not have the provider return location but something that would be an union of location or temperature, and the available bool could be changed to an enum going unavailable/location/temperature, that the main loop could act on accordingly.
Describe alternatives you've considered
Complain loudly to wlroots folks to have an option to not reset the ramp on exit? But I already did that, not sure it'd have much chance of working :P
I don't think it's possible to backcompute a location that would get the desired temp, that might be another way to go if it were.
A more plausible alternative to both would be to just implement that alongside the other modes, e.g. a PROGRAM_MODE_MANUAL_STDIN that would just do that -- it's trivial to do and doesn't need anything changed, just not as elegant.
Additional context
I'm more than willing to implement whatever direction you prefer - I just don't want the "wayland" fork to drift further apart and would like to submit it here even if there is no real reason to have this mode for X11. It would still be useful for people using Quartz I suppose.
Would this make sense for you?
What solution do you prefer?
Thanks!