From 229d8cd2046fc1fef78e1d5e49d7380390ff904e Mon Sep 17 00:00:00 2001 From: 8manz <96984685+8manz@users.noreply.github.com> Date: Sun, 23 Jun 2024 14:08:15 -0400 Subject: [PATCH] Fix simple terminal (st) run command in external window (#1514) --- porcupine/plugins/run/terminal.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/porcupine/plugins/run/terminal.py b/porcupine/plugins/run/terminal.py index 0bb4b6145..456a5d2c9 100644 --- a/porcupine/plugins/run/terminal.py +++ b/porcupine/plugins/run/terminal.py @@ -129,7 +129,10 @@ def _run_in_x11_like_terminal(command: str | None, cwd: Path, env: dict[str, str if command: real_command = [str(run_script), str(cwd), command] - subprocess.Popen([terminal, "-e", " ".join(map(shlex.quote, real_command))], env=env) + if terminal == "st": + subprocess.Popen([terminal, "-e", *real_command], env=env) + else: + subprocess.Popen([terminal, "-e", " ".join(map(shlex.quote, real_command))], env=env) else: subprocess.Popen(terminal, cwd=cwd, env=env)