cpu module: Reuse getLoad of load module

This commit is contained in:
Mann mit Hut
2023-07-29 16:02:36 +02:00
parent d1602e383c
commit 8d7341da6e
4 changed files with 7 additions and 14 deletions

View File

@ -19,7 +19,7 @@ waybar::modules::Load::Load(const std::string& id, const Json::Value& config)
auto waybar::modules::Load::update() -> void {
// TODO: as creating dynamic fmt::arg arrays is buggy we have to calc both
auto [load1, load5, load15] = getLoad();
auto [load1, load5, load15] = Load::getLoad();
if (tooltipEnabled()) {
auto tooltip = fmt::format("Load 1: {}\nLoad 5: {}\nLoad 15: {}", load1, load5, load15);
label_.set_tooltip_text(tooltip);