1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-27 17:07:44 +00:00

cli: pad output to prevent misaligned text

This commit is contained in:
NotAShelf 2025-05-17 11:48:09 +03:00
parent 7a708c60d7
commit 1b31dd9e1e
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF
2 changed files with 10 additions and 8 deletions

View file

@ -117,7 +117,9 @@ pub fn determine_and_apply_settings(
debug!("Managing turbo in auto mode based on system conditions"); debug!("Managing turbo in auto mode based on system conditions");
manage_auto_turbo(report, selected_profile_config)?; manage_auto_turbo(report, selected_profile_config)?;
} else { } else {
debug!("Auto turbo management disabled by configuration, using system default behavior"); debug!(
"Auto turbo management disabled by configuration, using system default behavior"
);
try_apply_feature("Turbo boost", "system default (Auto)", || { try_apply_feature("Turbo boost", "system default (Auto)", || {
cpu::set_turbo(turbo_setting) cpu::set_turbo(turbo_setting)
})?; })?;

View file

@ -140,7 +140,7 @@ fn main() -> Result<(), AppError> {
format_section("CPU Global Info"); format_section("CPU Global Info");
println!( println!(
"Current Governor: {}", "Current Governor: {}",
report report
.cpu_global .cpu_global
.current_governor .current_governor
@ -148,11 +148,11 @@ fn main() -> Result<(), AppError> {
.unwrap_or("N/A") .unwrap_or("N/A")
); );
println!( println!(
"Available Governors: {}", "Available Governors: {}", // 21 length baseline
report.cpu_global.available_governors.join(", ") report.cpu_global.available_governors.join(", ")
); );
println!( println!(
"Turbo Status: {}", "Turbo Status: {}",
match report.cpu_global.turbo_status { match report.cpu_global.turbo_status {
Some(true) => "Enabled", Some(true) => "Enabled",
Some(false) => "Disabled", Some(false) => "Disabled",
@ -161,15 +161,15 @@ fn main() -> Result<(), AppError> {
); );
println!( println!(
"EPP: {}", "EPP: {}",
report.cpu_global.epp.as_deref().unwrap_or("N/A") report.cpu_global.epp.as_deref().unwrap_or("N/A")
); );
println!( println!(
"EPB: {}", "EPB: {}",
report.cpu_global.epb.as_deref().unwrap_or("N/A") report.cpu_global.epb.as_deref().unwrap_or("N/A")
); );
println!( println!(
"Platform Profile: {}", "Platform Profile: {}",
report report
.cpu_global .cpu_global
.platform_profile .platform_profile
@ -177,7 +177,7 @@ fn main() -> Result<(), AppError> {
.unwrap_or("N/A") .unwrap_or("N/A")
); );
println!( println!(
"CPU Temperature: {}", "CPU Temperature: {}",
report.cpu_global.average_temperature_celsius.map_or_else( report.cpu_global.average_temperature_celsius.map_or_else(
|| "N/A (No sensor detected)".to_string(), || "N/A (No sensor detected)".to_string(),
|t| format!("{t:.1}°C") |t| format!("{t:.1}°C")