feat(system): make night light settings-driven - #10
Conversation
Refactored NightLightManager to read from settings and support automatic activation/deactivation based on a configurable time window.
|
Heads up — this rework reads five GSettings keys that do not exist in the schema, which hard-crashes the shell (SIGABRT) the first time the sidebar is opened. `NightLightManager` now reads `night-light-enabled`, `night-light-adaptive`, `night-light-temperature`, `night-light-adaptive-from` and `night-light-adaptive-to`, but none of them are defined in Measured on a CIX Sky1 board (Radxa Orion O6N) 2026-08-17, via systemd-coredump: It then crash-loops, because the supervisor restarts the shell and the next sidebar construction aborts again. I hit this because I merged this branch locally to unblock an unrelated build (singularity-shell Same failure class as the |
|
Hey, I am confused about this report as the schema additions have been merged upstream into singularityos-lab/singularity-desktop@4a69ba2 did your local build have the latest version of that repo? |
Reworks
NightLightManagerfrom a hard-coded 4000 K on/off toggle into a passive, settings-driven state machine backed by thedev.sinty.desktopschema.Adds a master switch, configurable temperature clamped to 1000–6500 K, and an optional adaptive schedule using
HH:MMstart/end times.Effective state is:
enablednow reflects the effective state rather than the raw switch.Every settings change triggers
refresh(), which:changed()on effective-state changes.Timeoutfor the next schedule boundary.from == toas never night.toggle()and the new setters only write settings; propagation happens through thesettings.changedsignal.The
GammaBackendinterface and singleton are unchanged, and no other code calls the removedenable()/disable()methods.Tested on