mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat(custom): update on click/scroll
This commit is contained in:
@ -79,6 +79,18 @@ void waybar::modules::Custom::refresh(int sig /*signal*/) {
|
||||
}
|
||||
}
|
||||
|
||||
bool waybar::modules::Custom::handleScroll(GdkEventScroll* e) {
|
||||
auto ret = ALabel::handleScroll(e);
|
||||
thread_.wake_up();
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool waybar::modules::Custom::handleToggle(GdkEventButton* const& e) {
|
||||
auto ret = ALabel::handleToggle(e);
|
||||
thread_.wake_up();
|
||||
return ret;
|
||||
}
|
||||
|
||||
auto waybar::modules::Custom::update() -> void {
|
||||
// Hide label if output is empty
|
||||
if (config_["exec"].isString() && (output_.out.empty() || output_.exit_code != 0)) {
|
||||
|
Reference in New Issue
Block a user