Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.
1) I have Redshift set to run at boot and to load its settings from a configuration file.
2) I have a shell script that turns Redshift off (for when I want it off).
3) I have a shell script that turns Redshift on (for when I want redshift back on).
I found it hard to code 1 and 2, at least without ending up with (i) multiple instances of Redshift and indeed sometimes (ii) multiple coats of redness, to speak. In order to avoid those problems, I have had to make liberal use of redshift -x and sudo killall redshift. So doing does avoid problems i and ii but it does cause (iii) severe temporary flickering. How is one meant to toggle between Redshift working from a configuration file, on the one hand, and not doing anything (and undoing everything that it has done), on the other?
To Reproduce
Well, for one thing, consider the following.
redshift -c <pathToConfig> (or rather - because that command hangs for a while - redshift -c <pathToConfig> >/dev/null 2>&1 &)).
redshift -c -O -P -r -x (or redshift -c -P -r -x, i.e. without the -O flag).
After the second command, redshift continues to operate according to its configuration file (well, except for a hiatus of approximately one second).
Expected behavior
It should be easy to turn redshift on and off.
Software versions (please complete the following information):
Describe the bug
1) I have Redshift set to run at boot and to load its settings from a configuration file. 2) I have a shell script that turns Redshift off (for when I want it off). 3) I have a shell script that turns Redshift on (for when I want redshift back on).
I found it hard to code 1 and 2, at least without ending up with (i) multiple instances of Redshift and indeed sometimes (ii) multiple coats of redness, to speak. In order to avoid those problems, I have had to make liberal use of
redshift -x
andsudo killall redshift
. So doing does avoid problems i and ii but it does cause (iii) severe temporary flickering. How is one meant to toggle between Redshift working from a configuration file, on the one hand, and not doing anything (and undoing everything that it has done), on the other?To Reproduce Well, for one thing, consider the following.
redshift -c <pathToConfig>
(or rather - because that command hangs for a while -redshift -c <pathToConfig> >/dev/null 2>&1 &)
).redshift -c -O -P -r -x
(orredshift -c -P -r -x
, i.e. without the-O
flag).After the second command, redshift continues to operate according to its configuration file (well, except for a hiatus of approximately one second).
Expected behavior It should be easy to turn redshift on and off.
Software versions (please complete the following information):