josie / alder-tools

Fix: TUI pkg power never matched domain name (package vs package-0)

3b726d93427c2facf234795ad171840c0f16f3cb
josie <administrator@josie-c.com> · 2026-08-29T12:26 · browse files at this commit

parents: 1cdfc93

diff --git a/src/ui.rs b/src/ui.rs
index 43bf05d..4891f2d 100644
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -102,7 +102,7 @@ impl App {
         // interval; no extra sleep like the dump's fixed 500 ms window).
         if let Some(d) = sensors::rapl_domains()
             .iter()
-            .find(|d| d.name == "package")
+            .find(|d| d.name.starts_with("package"))
         {
             if let Some(e) = sensors::rapl_energy_uj(&d.id) {
                 self.last_pkg_energy = match self.last_pkg_energy {