MaxVerevkin / wl-gammarelay-rs

A simple program that provides DBus interface to control display temperature and brightness under wayland without flickering
GNU General Public License v3.0
119 stars 2 forks source link

fix and improve `auto-temperature.py` script #23

Closed zefr0x closed 7 months ago

zefr0x commented 7 months ago

Now it should not suddenly jump to TEMP_DAY when current_time == DUSK_TIME.

Also, I made some performance and portability improvments. Other performance improvments can be made, but it might reduce accuracy and lead to unexpected results.

Also, the WINDOW is now 15m rather than 30m, since 15m are enough for the eyes to not notice.


The bug was here: https://github.com/MaxVerevkin/wl-gammarelay-rs/blob/cf7906769a6260d5a97ead60b40fa0c07c50a12f/scripts/auto-temperature.py#L25 It should be:

 if dusk_time <= curr_time or curr_time < dawn_time: 
MaxVerevkin commented 7 months ago

Nice, thanks!