feat(workspaces): icons

This commit is contained in:
Alexis
2018-08-15 14:48:08 +02:00
parent 767d9dd5b4
commit e3e099f836
12 changed files with 53 additions and 28 deletions

View File

@ -34,10 +34,10 @@ auto waybar::modules::Custom::update() -> void
// Hide label if output is empty
if (output.empty()) {
_label.get_style_context()->remove_class("custom-" + _name);
_label.set_name("");
_label.hide();
} else {
_label.get_style_context()->add_class("custom-" + _name);
_label.set_name("custom-" + _name);
auto format = _config["format"] ? _config["format"].asString() : "{}";
_label.set_text(fmt::format(format, output));
_label.show();