feat(ALabel): Toggleable labels

This commit is contained in:
Alexis
2018-08-27 01:36:25 +02:00
parent e9478f548e
commit 53956d9d18
13 changed files with 75 additions and 63 deletions

View File

@ -1,7 +1,7 @@
#include "modules/sway/window.hpp"
waybar::modules::sway::Window::Window(Bar &bar, const Json::Value& config)
: ALabel(config), bar_(bar)
: ALabel(config, "{}"), bar_(bar)
{
label_.set_name("window");
ipc_.connect();
@ -30,7 +30,7 @@ void waybar::modules::sway::Window::worker()
auto waybar::modules::sway::Window::update() -> void
{
label_.set_text(window_);
label_.set_text(fmt::format(format_, window_));
label_.set_tooltip_text(window_);
}