add signalhandler for module update

This commit is contained in:
hoellen
2019-03-18 18:46:44 +01:00
parent 3257968a28
commit 38fa7ceab1
7 changed files with 46 additions and 5 deletions

View File

@ -78,6 +78,13 @@ void waybar::modules::Custom::continuousWorker()
};
}
void waybar::modules::Custom::refresh(int sig /*signal*/)
{
if(sig == SIGRTMIN + config_["signal"].asInt()) {
thread_.wake_up();
}
}
auto waybar::modules::Custom::update() -> void
{
// Hide label if output is empty