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, Status,
/// Install udev rules for rootless operation /// Install udev rules for rootless operation
InstallRules, InstallRules,
/// Touchpad management
Touchpad {
#[command(subcommand)]
command: TouchpadCommands,
},
/// Inhibit system sleep/suspend /// Inhibit system sleep/suspend
Inhibit { Inhibit {
/// The command to run while inhibiting (optional) /// The command to run while inhibiting (optional)
@@ -131,3 +136,11 @@ pub enum BatteryCommands {
/// Show current battery status /// Show current battery status
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::Cooling { command } => commands::cooling::execute(command),
Commands::Status => commands::status::execute(), Commands::Status => commands::status::execute(),
Commands::InstallRules => commands::install_rules::execute(), Commands::InstallRules => commands::install_rules::execute(),
Commands::Touchpad { command } => commands::touchpad::execute(command),
Commands::Inhibit { Commands::Inhibit {
command, command,
why, why,