Commit Graph
13 Commits
Author SHA1 Message Date
Alex 8dbba448ce refactor(modules): migrate state modules to ALabel tooltip helper
Migrate cpu, cpu_usage, cpu_frequency and memory to the generic
updateLabelAndTooltip/ForState helper so label and tooltip rendering go
through the dedup-aware setters and shared tooltip-format resolution.

Add store-accepting overloads of the helper to ALabel for modules that
build a dynamic fmt argument store (per-core cpu stats). cpu keeps its
tooltip-format-<state> selection via the state overload; the others keep
their existing tooltip-format-only behavior.
2026-07-04 00:05:17 +02:00
Nico Schlömer 5af324f375 two more toctou bugs 2026-04-27 11:41:09 +02:00
Austin Horstman fe03dfaa3b perf(memory): eliminate deep copies in range-based for loops and lambdas
This commit addresses memory churn caused by implicit deep copies during traversal and allocation of complex structures:

- Replaced pass-by-value 'Json::Value' in std::ranges and range-based for loops with 'const auto&' or 'const Json::Value&' in Hyprland modules, preventing large JSON tree duplications on every update.

- Fixed implicit string and pair copies in UPower and CPU Frequency loops by converting 'auto' to 'const auto&' where possible.

- Added 'std::vector::reserve' calls before 'push_back' loops in MPRIS, Niri, and CFFI modules to prevent exponential vector reallocation during initialization.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 22:54:07 -06:00
Prakhar Chhalotre 4ac539206f feat: add tooltip-format config option in cpu module 2026-02-13 02:00:17 +05:30
bilaliscarioth d808c00324 avoid useless vars on cpu_frequency, mimic sigrtmin/sigrtmax 2025-07-08 02:21:48 +02:00
bilaliscarioth 0cb605b529 start openbsd ports 2025-07-08 02:13:33 +02:00
Aleksei Bavshin 99c48bca36 fix: formatting 2024-02-24 00:30:44 -08:00
aokblast 514d00803c feat: implement cpufreq for bsd by sysctl 2024-02-22 04:47:09 +08:00
Mann mit Hut 80a34eec81 Fixed formatting again 2023-09-13 23:25:39 +02:00
Mann mit Hut d5203e5b37 Fixed cpu module: Provide stub implementation for parseCpuFrequencies 2023-09-13 23:12:35 +02:00
Mann mit Hut c45f6681b3 cpu module: Reuse getCpuFrequency of cpu_frequency module 2023-09-13 21:56:35 +02:00
Mann mit Hut 982ffde002 Use labels instead of buttons 2023-09-13 21:56:33 +02:00
Mann mit Hut c36fe3a004 Introduce cpu_frequency module 2023-09-13 21:56:31 +02:00