feat(WIP): tray

feat(wip): tray

feat(wip): tray

feat(WIP): gdbus

feat(WIP): tray
This commit is contained in:
Alexis
2018-08-29 20:36:39 +02:00
parent 28c65c64e6
commit 0eee8eade7
18 changed files with 888 additions and 15 deletions

26
src/modules/sni/tray.cpp Normal file
View File

@ -0,0 +1,26 @@
#include "modules/sni/tray.hpp"
#include <iostream>
waybar::modules::SNI::Tray::Tray(const Json::Value& config)
: config_(config), watcher_(), host_(dp)
{
}
auto waybar::modules::SNI::Tray::update() -> void
{
for (auto item : host_.items) {
item.image->set_tooltip_text(item.title);
box_.pack_start(*item.image);
}
if (box_.get_children().size() > 0) {
box_.set_name("tray");
box_.show_all();
} else {
box_.set_name("");
}
}
waybar::modules::SNI::Tray::operator Gtk::Widget &() {
return box_;
}