From 8f3f6c0ab8292d6638610f4f8f34f5f9a42a45cf Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Thu, 12 Mar 2026 19:02:32 +0545 Subject: [PATCH] feat(root): add sleep inhibitor command and daemon support Introduce inhibit subcommand to prevent system sleep while tasks run, offering flexible daemon and why options. - New Features - Added inhibit.rs module with `lapctl inhibit`, `lapctl inhibit --daemon`, and `lapctl inhibit --why "..."`. - Updated README.md with detailed Sleep Inhibitor description and usage examples. - Enhancements - Added Sleep inhibitor entry to the project checklist under Tool configuration saving. - Included inhibit.rs in the project structure listing. - Improved CLI help context for power and cooling sections. - Bug Fixes - No bug fixes included in this change. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index df48c9c..1d5a3ec 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,10 @@ Change power profiles and set CPU power limits to save energy when you need it. Control the cooling fans for laptops like Lenovo or ASUS to keep your computer quiet or cool. +**Sleep Inhibitor** + +Prevent your system from sleeping or suspending while running a task or indefinitely. + **Hardware Status** Check the status of your battery, graphics, and power all in one place. @@ -59,6 +63,11 @@ lapctl cooling performance lapctl cooling balanced lapctl cooling quiet +# Sleep inhibitor +lapctl inhibit +lapctl inhibit --daemon +lapctl inhibit -- why "Building project" cargo build + # Check everything lapctl status ``` @@ -86,6 +95,7 @@ lapctl │ │ ├── battery.rs │ │ ├── power.rs │ │ ├── cooling.rs +│ │ ├── inhibit.rs │ │ ├── install_rules.rs │ │ └── status.rs │ │ @@ -112,6 +122,7 @@ lapctl - [x] Tool configuration saving - [x] Cooling fan setup - [x] CPU power limit setup +- [x] Sleep inhibitor (systemd-inhibit wrapper) ---