Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading of settings #96

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Reloading of settings #96

wants to merge 9 commits into from

Conversation

maandree
Copy link
Contributor

The patch enables to user to send SIGUSR2
or use redshift-gtk to load new settings from
redshift.conf. It is configurable whether the
new settings should kick in directly or if there
should be a short transition to them.

Currently only adjustment settings are reloaded,
but this could be extended to include location,
monitors and adjustment method.

Signed-off-by: Mattias Andrée <maandree@operamail.com>
Signed-off-by: Mattias Andrée <maandree@operamail.com>
… before existing

Signed-off-by: Mattias Andrée <maandree@operamail.com>
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Signed-off-by: Mattias Andrée <maandree@operamail.com>
…ansition

Signed-off-by: Mattias Andrée <maandree@operamail.com>
@rudolfbyker
Copy link

Any chance to get this merged in 2017? Need any help to get this done?

@mapreri
Copy link

mapreri commented Feb 3, 2018

I'd also love to see this one merged.
Having a signal available to reload the config is completely orthogonal to any switch (or button in redshift-gtk) like the ones mentioned in #194, and would make my life while testing new options and stuff much easier.

Is anything blocking this? There hasn't been even a single comment from a maintainer.

@jonls
Copy link
Owner

jonls commented May 7, 2018

This is a neat feature but I don't think it's useful to most users so I'm not sure if the added complexity is worth merging. It looks like the implementation here doesn't try to handle changes to the adjustment method/location provider. I suspect this is going to lead to confusion if we only reload some parts of the configuration file. In any case, the current PR needs to rebase because the options system has been implemented in the meantime.

@dimaqq
Copy link

dimaqq commented May 8, 2018

@jonls I'd gladly use signal-to-reload config, or even poll-config-file-for-changes.
I'm using redshift without gtk and editing the redshift.conf seems to be the only way to change settings.
Btw., I'd rather expect SIGHUP to reload config than SIGUSR2.

@dbedrenko
Copy link

I'll describe a usecase that makes this a useful feature.

Since Redshift seems to override xrandr settings, e.g. if you change the brightness of your display via xrandr --output eDP-1 --brightness .2 it will momentarily reset the colour temperature that Redshift had set and set the desired brightness, but a split second later Redshift kicks it back to what it was before. Due to this behaviour it's not possible to adjust the brightness of the display without restarting Redshift with a different brightness parameter.

This feature would allow changing brightness seamlessly and on the fly. Currently, to change brightness--like if I moved to another room or the lighting changed--I have to kill redshift and restart it with a different brightness, which is a pain.

@StephenBeirlaen
Copy link

This would be very useful on machines with an OLED display where the brightness slider of the OS is not functioning due the lack of a backlight. I would then be able to add key bindings to these brightness buttons to set the Redshift brightness value, and then make Redshift reload the new settings.
I attempted to rebase this PR but failed, the main codebase has changed a lot over time.

@shanemd
Copy link

shanemd commented Feb 2, 2021

Interested in something like this getting in. Mostly I don't like that terminating redshift spikes my screen color temperature while I'm changing settings. I'd interact with redshift a lot more if I could make changes without blasting myself with blue light.

Any help needed here? I'm happy to lend a quick hand.

@aiguofer
Copy link

aiguofer commented Nov 8, 2021

I'm trying out xidlehooks, which has the ability to run various hooks on timers at different times. I really like the idea of being able to dim my screen after a few minutes, but this is currently not possible with redshift managed by systemd (see @dbedrenko's comment). I would love some way to do this that doesn't involve a hacky script to to sed the config file, change a setting, then restart the systemd service... I'm not a fan of the blue light flash.

I think a socket based client would be ideal. It would allow for easily writing scripts to change color temp, brightness, etc on the fly. That being said, I would be ok with sed scripts to overwrite values if they get automatically picked up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants