Clean C-state display to show only CX format
All checks were successful
Build and Release / build-and-release (push) Successful in 1m18s
All checks were successful
Build and Release / build-and-release (push) Successful in 1m18s
- Strip suffixes like "_ACPI" from C-state names - Display changes from "C3_ACPI:51%" to "C3:51%" - Cleaner, more concise presentation Bump version to v0.1.211 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard"
|
||||
version = "0.1.210"
|
||||
version = "0.1.211"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -144,9 +144,13 @@ impl SystemWidget {
|
||||
}
|
||||
|
||||
// Format top 3 C-states with percentages: "C10:79% C8:10% C6:8%"
|
||||
// Strip suffixes like "_ACPI" from state names
|
||||
self.cpu_cstates
|
||||
.iter()
|
||||
.map(|cs| format!("{}:{:.0}%", cs.name, cs.percent))
|
||||
.map(|cs| {
|
||||
let clean_name = cs.name.split('_').next().unwrap_or(&cs.name);
|
||||
format!("{}:{:.0}%", clean_name, cs.percent)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join(" ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user