Skip to content

Commit

Permalink
external_script: add composite placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
lasers committed Oct 14, 2024
1 parent 49d51e3 commit a9a5c34
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 a9a5c34

Please sign in to comment.