jonls/redshift — pull request #53 by maandree (2014-03-26 22:30:43+00:00)
Title: [Proof of concept] Interprocess communication support

I have created a small proof of concept for IPC.
I have no experience with D-Bus, so it only uses domain sockets, which I think should be sufficient.

There are eight commands implemented:

```
GET TEMP DAY
GET TEMP NIGHT
GET BRIGHTNESS DAY
GET BRIGHTNESS NIGHT
SET TEMP DAY %i
SET TEMP NIGHT %i
SET BRIGHTNESS DAY %f
SET BRIGHTNESS NIGHT %f
```

Currently, changes are not applied directly when set, rather it will be set
the next time redshift updates the adjustments. To fix this, I propose adding
a signal handler for SIGUSR2 that does nothing. (SIGIGN is probably sufficient),
this would allow the user to send SIGUSR2 at any time to break any sleep.
Than the command `FLUSH` could be added that sends this signal to the
process itself.