0

Seeking darker screen, and redshifted, combined,
how can the effect of (e.g.)
xrandr --output eDP --brightness 0.3 --verbose
and
redshift -r -P -O 3800
be merged, so both xrandr's --brightness 0.3, and redshift's 3800 are both in effect?

Running either command obliterates the effect of the other. So re-running redshift obliterates the darkening effect, and re-running xrandr obliterates the redshift effect.

  • Is there an option available for either command to not affect the effects of the other?
  • Or perhaps some way of nesting one into the other?
  • Or get xrandr to do the colour tweaking instead of redshift? (Not ideal, if wanting use redshift's automation).
  • Or a way to configure/command redshift to darken?
  • Or are there other ways to achieve a combined effect of redshift and darkened screen?

FYI,

  • xrandr's --brightness <1 darkens the screen more than can be achieved with default settings and controls.
  • redshift adjusts the colour temperature output, and can do so based on latitude and time of year and all kinds of nice settings to configure, useful for sparing you the circadian rhythm disruption from blue light at night.
1
  • 1
    Try something like this pipe: xrandr --output eDP-1 --brightness 0.3 | redshift -O 3800. Or perhaps redshift -O 3800 -g 0.3 or redshift -O 3800 -b 0.3.
    – harrymc
    Commented Apr 25 at 20:30

1 Answer 1

0

Confirmed, from @harrymc's comment, a simple pipe works (depending on options applied to redshift), much to my astonishment. I just presumed piping it wouldn't work, with such graphics things.

Commands such as xrandr --output eDP --brightness 0.5 --verbose | redshift -r -O 3800 has the satisfactory combined effect, so long as it's not re-run in too quick succession.

An example of an option that appears to prevent it working, is the -P option on redshift, which makes sense as it does: " -P Reset existing gamma ramps before applying new color effect." which was what was scuppering and confusing my attempts.

Thus, merely running the commands in sequence, xrandr, then redshift (without -P), has the desired effect too. xrandr after redshift resets the redshift. Impressive that it works as a pipe too.

Interesting compounding effect from the -g and -b on subsequent re-runs of redshift -O 3800 -g 0.3 or redshift -O 3800 -b 0.3. Also useful to know about. Thanks for that too.

Thanks for the comment answer, harrymc https://superuser.com/users/8672/harrymc .

1
  • 1
    "Impressive that it works as a pipe too" – Nothing gets piped here and the parts of the pipe work concurrently. If xrandr before reshift works, but not the other way around, then with the pipe it may or may not work, depending on what tool does its job first by chance. This is a race condition. Dropping -P and executing in the right sequence seems the right solution. The pipe itself is voodoo. Commented Apr 27 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .