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)
This commit is contained in:
sankalp committed 2026-03-16 22:26:17 +05:45
1 parent b14f279848
commit 1bb54facaf
2 files changed
+14

No files matched your search

+13
View File
@@ -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,
}
+1
View File
@@ -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,