jonls/redshift — pull request #44 by maandree (2014-03-17 09:21:55+00:00)
Title: Support for using any number of CRTC:s in any number of screens

This pull request continues #42 (Support for running Redshift outside X) by
adding support for using any number of CRTC:s in any number of screens with
individual gamma correction for each monitor.

The configurations are backwards compatible but are extended so that you
can select any monitor and apply gamma corrections individually by specifying
one section in the configuration file per monitor with the same name as the
adjustment method. For example:

```ini
[redshift]
adjustment-method=randr
gamma=1:1:1
; this gamma setting will be used if not specified otherwise

[randr]
screen=0
crtc=0
gamma=1.1:1.1:1.1

[randr]
screen=0
crtc=1
gamma=1.2:1.2:1.2
; screen=1 with crtc=0 will also work, although I cannot say
; for sure because I only have one screen, with two outputs.
```

The reason the sections are named as the adjustment method is
so that it is simple to have adjustment method dependent settings.
For example, if I use DRM the CRTC:s will be swapped so a can
extend the example above with:

```ini
[drm]
card=0
crtc=1
gamma=1.1:1.1:1.1

[drm]
card=0
crtc=0
gamma=1.2:1.2:1.2
```