feat(src): add install-rules command for udev rule installation
New Features - Introduced `InstallRules` subcommand to install udev rules for rootless operation. Enhancements - Streamlined `LimitTdp` and `Limit` enum variants by removing unnecessary wrapper structs. - Updated command dispatch in `main` to handle the new `InstallRules` variant.
This commit is contained in:
2 files changed
+5
-6
No files matched your search
+4
-6
@@ -39,6 +39,8 @@ pub enum Commands {
|
||||
},
|
||||
/// Hardware status
|
||||
Status,
|
||||
/// Install udev rules for rootless operation
|
||||
InstallRules,
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
@@ -95,9 +97,7 @@ pub enum PowerCommands {
|
||||
/// Set power profile to battery saver
|
||||
BatterySave,
|
||||
/// Set CPU TDP limit (in Watts)
|
||||
LimitTdp {
|
||||
watts: u32,
|
||||
},
|
||||
LimitTdp { watts: u32 },
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
@@ -113,9 +113,7 @@ pub enum CoolingCommands {
|
||||
#[derive(Subcommand, Debug)]
|
||||
pub enum BatteryCommands {
|
||||
/// Set the battery charging limit (e.g., 80)
|
||||
Limit {
|
||||
percent: u8,
|
||||
},
|
||||
Limit { percent: u8 },
|
||||
/// Show current battery status
|
||||
Status,
|
||||
}
|
||||
@@ -31,5 +31,6 @@ fn main() {
|
||||
Commands::Power { command } => commands::power::execute(command),
|
||||
Commands::Cooling { command } => commands::cooling::execute(command),
|
||||
Commands::Status => commands::status::execute(),
|
||||
Commands::InstallRules => commands::install_rules::execute(),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user