Skip to content

Commit

Permalink
external_script module: add composite placeholder (#2263)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasers authored Oct 22, 2024
1 parent e8f259f commit a306d4c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions py3status/modules/external_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
Format placeholders:
{lines} number of lines in the output
{output} output of script given by "script_path"
{composite} composite output of script given by "script_path"
Examples:
```
Expand Down Expand Up @@ -104,9 +105,12 @@ def external_script(self):
else:
output = ""

response["full_text"] = self.py3.safe_format(
self.format, {"output": self.py3.safe_format(output), "lines": len(output_lines)}
)
script_data = {
"output": output,
"lines": len(output_lines),
"composite": self.py3.safe_format(output),
}
response["full_text"] = self.py3.safe_format(self.format, script_data)
return response

def on_click(self, event):
Expand Down

0 comments on commit a306d4c

Please sign in to comment.