Skip to content

Commit

Permalink
Added support for Ghostty
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lucas-yotsui committed Jan 8, 2025
1 parent f50f9ea commit d17645d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bottles/backend/utils/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class TerminalUtils:
# Third party
["foot", "%s"],
["kitty", "%s"],
["ghostty", "-e %s"]
["tilix", "-- %s"],
# Desktop environments
["xfce4-terminal", "-e %s"],
Expand Down Expand Up @@ -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"]:
Expand Down

0 comments on commit d17645d

Please sign in to comment.