feat: add idle protocol to avoid update workspace when idle

This commit is contained in:
Alexis
2018-08-09 01:10:07 +02:00
parent 193bd8a79a
commit c1e2735314
4 changed files with 43 additions and 6 deletions

View File

@ -12,16 +12,18 @@ namespace waybar::modules {
public:
WorkspaceSelector(waybar::Bar &bar);
auto update() -> void;
void updateThread();
operator Gtk::Widget &();
util::SleeperThread *thread;
private:
void _addWorkspace(Json::Value node);
Json::Value _getWorkspaces();
Bar &_bar;
Gtk::Box *_box;
std::unordered_map<int, Gtk::Button> _buttons;
util::SleeperThread _thread;
int _ipcSocketfd;
int _ipcEventSocketfd;
struct org_kde_kwin_idle_timeout *_idle_timer;
};
}