-
Notifications
You must be signed in to change notification settings - Fork 428
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
run hooks on startup/exit, enable/disable #335
Comments
In addition to startup, a hook when enabling/disabling (SIGUSR1) and a hook at exit would also be great. This way the display brightness hooks I'm using can be accurately correlated with the redshift of the screen. |
Thanks, those are great suggestions! I would definitely merge a pull request with these additions. |
Hooks seem to run correctly for me, transitioning from "none" to "night" or "daytime" immediately when I start redshift. |
It seems that Redshift correctly runs hooks on start and exit. The only thing not implemented is the hook when enabling/disabling as suggested by @infernix. |
I can take a quick look at this one. When redshift is disabled, should the hooks be called with a new "Disabled" state, or should be just use the existing None state? I feel like it would be nice to have the semantic difference between the two, for maximum flexibility. |
@mwstobo None is fine i think. None signifies redshift is not doing anything, which is the case both when exiting and when it's disabled. I can't come up with a use case where you'd want to do something different between exiting redfish and disabling redfish. |
Fix #335: Set period to none when disabled
This allows for hooks to be run when redshift is disabled
currently, hooks are only executed when the period changes, eg transition>night, etc.
it would be nice if the hooks are also executed when redshift starts
Example use case:
If hooks are executed at startup, redshift does not know about the previous period, so 'none' would be an acceptable value.
The text was updated successfully, but these errors were encountered: