diff --git a/src/config.rs b/src/config.rs index 8a84dff..33b4951 100644 --- a/src/config.rs +++ b/src/config.rs @@ -13,8 +13,11 @@ pub struct Config { pub layouts: Vec, } +/// A configured layout pub struct Layout { + /// Layout name pub name: String, + /// If true, automatically enableable pub automatic: bool, /// Map of monitor name to OutputConfig pub outputs: HashMap, diff --git a/src/lid.rs b/src/lid.rs index 2830979..ddf7bc5 100644 --- a/src/lid.rs +++ b/src/lid.rs @@ -3,6 +3,9 @@ use std::io::Read; use std::path::PathBuf; use crate::config::Monitor; +// Determine if the lid id closed. +// Returns true if the lid is known to be closed. +// Returns false if the lid is known to be open, or if the lid state is not known. pub fn is_lid_closed(monitor: &Monitor) -> bool { if let Some(lid) = &monitor.lid { is_acpi_closed(lid)