From a7583a97862f3ab334ba0428250ce2000e4f0c18 Mon Sep 17 00:00:00 2001 From: enkore Date: Wed, 27 Jan 2016 19:31:12 +0100 Subject: [PATCH] Implement #300 --- i3pystatus/core/modules.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: