From 1bb54facafcaa9dba1fb5b2fadbb1c78267b8039 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Mon, 16 Mar 2026 22:26:17 +0545 Subject: [PATCH] feat(src): add touchpadenable/disable commands Implemented touchpad control to allow enabling and disabling the touchpad via lapctl. - New Features - Add `touchpad` command with `enable` and `disable` subcommands. - Enhancements - Extend CLI parsing and command routing to support touchpad operations. - Bug Fixes - (none) --- src/cli.rs | 13 +++++++++++++ src/main.rs | 1 + 2 files changed, 14 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index d324475..1f848b9 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -41,6 +41,11 @@ pub enum Commands { Status, /// Install udev rules for rootless operation InstallRules, + /// Touchpad management + Touchpad { + #[command(subcommand)] + command: TouchpadCommands, + }, /// Inhibit system sleep/suspend Inhibit { /// The command to run while inhibiting (optional) @@ -131,3 +136,11 @@ pub enum BatteryCommands { /// Show current battery status Status, } + +#[derive(Subcommand, Debug)] +pub enum TouchpadCommands { + /// Enable the touchpad + Enable, + /// Disable the touchpad + Disable, +} diff --git a/src/main.rs b/src/main.rs index b1e9c85..29a775b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,6 +28,7 @@ fn main() { Commands::Cooling { command } => commands::cooling::execute(command), Commands::Status => commands::status::execute(), Commands::InstallRules => commands::install_rules::execute(), + Commands::Touchpad { command } => commands::touchpad::execute(command), Commands::Inhibit { command, why,