Add gamma control and night light (#38)

Add configurable night light, smooth gamma transitions, and shell controls. Update documentation and panel tests, and fix portal test startup synchronization.
This commit is contained in:
Samuel Onoja authored and GitHub committed 2026-10-13 14:37:26 +01:00
1 parent 9163374cdb
commit 2a400b26d0
34 files changed
+940 -20

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)]
#[serde(default, deny_unknown_fields)]
pub struct Settings {
pub enabled: bool,
pub temperature: u16,
}
impl Default for Settings {
fn default() -> Self {
Self {
enabled: false,
temperature: 4500,
}
}
}
impl Settings {
pub fn validate(self) -> Result<Self, String> {
if !(1000..=6500).contains(&self.temperature) {
return Err("night-light temperature must be between 1000 and 6500 K".into());
}
Ok(self)
}
}