bluetooth module handles rfkill events instantly

This commit is contained in:
Marc
2020-01-23 17:17:29 +01:00
parent d85f0e1060
commit e3bf6b968c
6 changed files with 97 additions and 17 deletions

View File

@ -5,6 +5,7 @@
#include <fmt/chrono.h>
#include "util/sleeper_thread.hpp"
#include "util/rfkill.hpp"
namespace waybar::modules {
@ -15,8 +16,10 @@ class Bluetooth : public ALabel {
auto update() -> void;
private:
std::string status_;
util::SleeperThread thread_;
std::string status_;
util::SleeperThread thread_;
util::Rfkill rfkill_;
};
} // namespace waybar::modules

View File

@ -11,6 +11,7 @@
#include <sys/epoll.h>
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"
#include "util/rfkill.hpp"
namespace waybar::modules {
@ -71,6 +72,8 @@ class Network : public ALabel {
util::SleeperThread thread_;
util::SleeperThread thread_timer_;
util::Rfkill rfkill_;
};
} // namespace waybar::modules