mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
support format-icon for cpu und memory
This commit is contained in:
@ -26,9 +26,11 @@ auto waybar::modules::Cpu::update() -> void {
|
||||
event_box_.hide();
|
||||
} else {
|
||||
event_box_.show();
|
||||
auto icons = std::vector<std::string>{state};
|
||||
label_.set_markup(fmt::format(format,
|
||||
fmt::arg("load", cpu_load),
|
||||
fmt::arg("usage", cpu_usage),
|
||||
fmt::arg("icon", getIcon(cpu_usage, icons)),
|
||||
fmt::arg("max_frequency", max_frequency),
|
||||
fmt::arg("min_frequency", min_frequency),
|
||||
fmt::arg("avg_frequency", avg_frequency)));
|
||||
|
@ -38,8 +38,10 @@ auto waybar::modules::Memory::update() -> void {
|
||||
event_box_.hide();
|
||||
} else {
|
||||
event_box_.show();
|
||||
auto icons = std::vector<std::string>{state};
|
||||
label_.set_markup(fmt::format(format,
|
||||
used_ram_percentage,
|
||||
fmt::arg("icon", getIcon(used_ram_percentage, icons)),
|
||||
fmt::arg("total", total_ram_gigabytes),
|
||||
fmt::arg("percentage", used_ram_percentage),
|
||||
fmt::arg("used", used_ram_gigabytes),
|
||||
|
Reference in New Issue
Block a user