diff --git a/i3pystatus/core/modules.py b/i3pystatus/core/modules.py index d26c266..700af3e 100644 --- a/i3pystatus/core/modules.py +++ b/i3pystatus/core/modules.py @@ -91,21 +91,23 @@ class Module(SettingsBase): cb = self.on_downscroll else: self.logger.info("Button '%d' not handled yet." % (button)) - return + return False if not cb: self.logger.info("no cb attached") - return + return False else: cb, args = split_callback_and_args(cb) self.logger.debug("cb=%s args=%s" % (cb, args)) if callable(cb): - return cb(self) + cb(self) elif hasattr(self, cb): - return getattr(self, cb)(*args) + if cb is not "run": + getattr(self, cb)(*args) else: - return run_through_shell(cb, *args) + run_through_shell(cb, *args) + return True def move(self, position): self.position = position