From d17645d302281f1140a4b0b4f78f15d1df31314e Mon Sep 17 00:00:00 2001 From: Lucas Yotsui Date: Wed, 8 Jan 2025 13:03:42 -0300 Subject: [PATCH] Added support for Ghostty Simple change, worked fine. Small note: I don't know why the other terminals require the 'sh -c' or 'bash -c', but Ghostty calls that already when passing the option '-e'. worked fine in my machine without that, but it would be nice if someone else tested it just to make sure. --- bottles/backend/utils/terminal.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bottles/backend/utils/terminal.py b/bottles/backend/utils/terminal.py index 4acd1a5c11..3febdcfaee 100644 --- a/bottles/backend/utils/terminal.py +++ b/bottles/backend/utils/terminal.py @@ -43,6 +43,7 @@ class TerminalUtils: # Third party ["foot", "%s"], ["kitty", "%s"], + ["ghostty", "-e %s"] ["tilix", "-- %s"], # Desktop environments ["xfce4-terminal", "-e %s"], @@ -102,6 +103,8 @@ def execute(self, command, env=None, colors="default", cwd=None): ) if "ENABLE_BASH" in os.environ: command = " ".join(self.terminal) % (colors, f"bash") + elif self.terminal[0] in ["ghostty"]: + command = " ".join(self.terminal) % f"{command}" elif self.terminal[0] in ["xfce4-terminal"]: command = " ".join(self.terminal) % "'sh -c %s'" % f"{command}" elif self.terminal[0] in ["kitty", "foot", "konsole", "gnome-terminal"]: