Network detect (#26)

This commit is contained in:
Alex
2018-08-17 14:24:00 +02:00
committed by GitHub
parent 0603b99714
commit d280f5e8bd
8 changed files with 274 additions and 20 deletions

View File

@ -27,7 +27,7 @@ waybar::modules::Battery::Battery(Json::Value config)
Glib::signal_idle().connect_once(sigc::mem_fun(*this, &Battery::update));
label_.set_name("battery");
thread_ = [this, fd] {
struct inotify_event event = {};
struct inotify_event event = {0};
int nbytes = read(fd, &event, sizeof(event));
if (nbytes != sizeof(event)) {
return;