mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat(modules): call user on-update if configured
This commit is contained in:
@ -26,6 +26,11 @@ waybar::modules::IdleInhibitor::~IdleInhibitor() {
|
||||
}
|
||||
|
||||
auto waybar::modules::IdleInhibitor::update() -> void {
|
||||
// Run user-provided update handler if configured
|
||||
if (config_["on-update"].isString()) {
|
||||
AModule::update();
|
||||
}
|
||||
|
||||
label_.set_markup(
|
||||
fmt::format(format_, fmt::arg("status", status_), fmt::arg("icon", getIcon(0, status_))));
|
||||
label_.get_style_context()->add_class(status_);
|
||||
|
Reference in New Issue
Block a user