From 8faccc117a20af09da75f495256bbf81591da0c8 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Fri, 29 May 2026 16:35:26 +0545 Subject: [PATCH] feat(src): add temperature, fan, power commands handling - New Features - Added `temperature` subcommand to display system temperatures. - Added `fan` subcommand to display fan speeds. - Added `power` subcommand under GPU commands to show GPU power state and consumption. - Enhancements - Integrated new subcommands into the command dispatcher. - Bug Fixes - None --- src/cli.rs | 6 ++++++ src/main.rs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index 0b73936..1dbcdac 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -44,6 +44,10 @@ pub enum Commands { }, /// Hardware status Status, + /// Show system temperatures + Temperature, + /// Show fan speeds + Fan, /// Install udev rules for rootless operation InstallRules, /// Touchpad management @@ -114,6 +118,8 @@ pub enum GpuCommands { #[arg(trailing_var_arg = true, allow_hyphen_values = true)] command: Vec, }, + /// Show GPU power state and consumption + Power, } #[derive(Subcommand, Debug)] diff --git a/src/main.rs b/src/main.rs index 7033274..0b2a790 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,6 +28,8 @@ fn main() { Commands::Cooling { command } => commands::cooling::execute(command), Commands::Display { command } => commands::display::execute(command), Commands::Status => commands::status::execute(), + Commands::Temperature => commands::temperature::execute(), + Commands::Fan => commands::fan::execute(), Commands::InstallRules => commands::install_rules::execute(), Commands::Touchpad { command } => commands::touchpad::execute(command), Commands::Daemon => {