~kennylevinsen/wlsunset

ci: Build on archlinux
Negate longitude_time_offset

Instead of negating at every single point of use, just negate the
calculation.
Use timezone as time offset for manual time

When entering manual time, the timezone was adjusted in the time input
instead of storing the time offset. The time offset is necessary to
calculate the correct day boundaries.

Remove the timezone correction of time input and instead adjust the time
offset accordingly.
Move feature defines to C files
Ensure step time is at least 1 second

When configured to perform a very quick transition, the step time for 25
kelvin may end up being less than 1 second, rounding to zero. A zero
step time does not make any sense.
Store enabled state on output

This allows us to check the name just once when we receive the
xdg_output::name event instead of every time we set the temperature.
Only set up xdg-output once
Refactor RGB & XYZ colors into structs
Support running only for specific outputs (displays)

Useful for laptops with external displays connected. External displays
usually have an ability to adjust color temperature via built-in menu,
so you can run `wlsunset` exclusively for laptop's internal display.

Also different screens happen to look differently after setting the same
color temperature. Possibly has to do with the technology which
display is based on (TN or IPS).
e18ab2cb — Artur Sinila 6 months ago
Add .gitignore

`.cache` is for `clangd` cache
Add .editorconfig
601dfc87 — Evgeniy Khramtsov 8 months ago
main.c: define timezone to tm.tm_gmtoff on FreeBSD

FreeBSD has BSD extension timezone, which conflicts with XSI extension
with the same name, according to time.h:

char *timezone(int, int);	/* XXX XSI conflict */
...

FreeBSD also has long tm_gmtoff member of struct tm, which is offset
from UTC in seconds, according to time.h:

struct tm {
...
long    tm_gmtoff;	/* offset from UTC in seconds */
char	*tm_zone;	/* timezone abbreviation */
}

which is the same as XSI extension timezone.

Co-authored-by: Jan Beich <jbeich@FreeBSD.org> (downstream patch)
Reviewed by: Kenny Levinsen <kl@kl.wtf>
readme: Update discuss section
meson: Copy seatd's scdoc handling

This fixes cross-compiling, and avoids unnecessary search for a shell.
readme: Update mailing list
Add version command line flag
Add support for manual sunset/sunrise

The new -S/-s/-d flags allow for manually specifying the time of sunset,
ssunrise in the format of HH:MM, and the transitional animation duration
in seconds, respectively.

This is implemented by sidestepping the calc_sun call in manual mode.
The rest of wlsunset operates as usual.
Give config gamma as double to set_temperature

The gamma argument to set_temperature was incorrectly typed as an int,
causing unfortunate rounding.
Use illuminant D for the majority of temperatures

D65, the natural whitepoint that wlsunset assumes, is defined on
illuminant D, which simulates daylight with atmospheric effects.
However, we used planckian locus for all values under 6500 K, which
meant that there was a significant jump in color - specifically, a
sudden reduction in green and blue - as we started reducing the color
temperature.

Instead, we purely use illuminant D down to 4000 K where it is well
defined. Below 4000 K, illuminant D starts unintentionally approaching
the planckian locus, before finally breaking completely at 2000 K. We
extend the boundary of illuminant D to 2500 K and perform a
sine-smoothed transition to planckian locus from 4000 K to 2500 K to
extend the range of wlsunset down to 1667 K, where planckian locus ends
and we finally give up.

The end-result is a smooth transition along all valid temperature
values, with no sudden jumps as we had before. However, we do end up
with slightly greener/bluer colors than earlier. We'll have to see how
that holds up.
Next