def wm_msg(self, module_name, command):
        """
        Execute the message with i3-msg or swaymsg and log its output.
        """
        wm_msg = self.config["wm"]["msg"]
        pipe = Popen([wm_msg, command], stdout=PIPE)
        self.py3_wrapper.log(
            '{} module="{}" command="{}" stdout={}'.format(
                wm_msg, module_name, command, pipe.stdout.read()
            )
        )
Execute the message with i3-msg or swaymsg and log its output.