From 5718d8d7727c726f4d0f9f6bedf03b5a80a4813f Mon Sep 17 00:00:00 2001 From: stephen Date: Thu, 2 Jan 2025 00:44:43 +0000 Subject: [PATCH] docs --- src/config.rs | 3 +++ src/lid.rs | 3 +++ 2 files changed, 6 insertions(+) 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)