diff --git a/i3pystatus/core/modules.py b/i3pystatus/core/modules.py index ab61442..2d6d9e4 100644 --- a/i3pystatus/core/modules.py +++ b/i3pystatus/core/modules.py @@ -102,7 +102,9 @@ class Module(SettingsBase): getattr(self, cb)(*args) else: self.__log_button_event(button, cb, args, "External command") - execute(cb, detach=True) + if hasattr(self, "data"): + args = [arg.format(**self.data) for arg in args] + execute(cb + " " + " ".join(args), detach=True) # Notify status handler try: