Use Option for time, and set DPMS on start

This commit is contained in:
Ian Douglas Scott 2024-10-22 13:45:41 -07:00
parent f2c83714c0
commit 90249780a5
2 changed files with 16 additions and 14 deletions

View file

@ -4,13 +4,13 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize, Clone, CosmicConfigEntry)]
pub struct CosmicIdleConfig {
/// Screen off idle time, in ms
pub screen_off_time: u32,
pub screen_off_time: Option<u32>,
}
impl Default for CosmicIdleConfig {
fn default() -> Self {
Self {
screen_off_time: 10 * 60 * 1000,
screen_off_time: Some(10 * 60 * 1000),
}
}
}