b9f0b8e3c0
calc_sun reported sun trajectory in seconds since the start of a UTC day, as they would occur for the specified UTC day. The caller would then add the UTC timestamp for the start of a UTC day to these numbers. This lead to complications, as e.g. a sunrise in China would be a negative value, as it occurred in the last UTC day. Futhermore, the start of a UTC day was used to signal the need for new sun calculations. This would lead to recalculations to possibly occur after its results were needed, such as after sunrise when the target longitude deviated significantly from the prime meridian. To fix this, we apply longitude time correction to the start of day calculation. This way recalculation will occur on the start of the longitude local day, close midnight for the observer. We also remove the longitude time correction from calc_sun, so that it simply returning the number of seconds since the start of the local day of the observer. The caller then adds the start of the longitude local day to get the final numbers. |
||
---|---|---|
.build.yml | ||
LICENSE | ||
README.md | ||
color_math.c | ||
color_math.h | ||
main.c | ||
meson.build | ||
wlr-gamma-control-unstable-v1.xml |
README.md
wlsunset
Day/night gamma adjustments for Wayland compositors supporting wlr-gamma-control-unstable-v1.
How to build and install
meson build
ninja -C build
sudo ninja -C build install
How to use
See the helptext (wlsunset -h
)
Example
# Beijing lat/long.
wlsunset -l 39.9 -L 116.3
Greater precision than one decimal place serves no purpose other than padding the command-line.
Help
Go to #kennylevinsen @ chat.freenode.net to discuss, or use ~kennylevinsen/public-inbox@lists.sr.ht