diff --git a/dist/icons/1024.png b/dist/icons/1024.png new file mode 100644 index 0000000..8accee3 Binary files /dev/null and b/dist/icons/1024.png differ diff --git a/dist/icons/128.png b/dist/icons/128.png new file mode 100644 index 0000000..cab4dcf Binary files /dev/null and b/dist/icons/128.png differ diff --git a/dist/icons/16.png b/dist/icons/16.png new file mode 100644 index 0000000..0212014 Binary files /dev/null and b/dist/icons/16.png differ diff --git a/dist/icons/256.png b/dist/icons/256.png new file mode 100644 index 0000000..423465c Binary files /dev/null and b/dist/icons/256.png differ diff --git a/dist/icons/32.png b/dist/icons/32.png new file mode 100644 index 0000000..2889131 Binary files /dev/null and b/dist/icons/32.png differ diff --git a/dist/icons/512.png b/dist/icons/512.png new file mode 100644 index 0000000..2045204 Binary files /dev/null and b/dist/icons/512.png differ diff --git a/dist/icons/64.png b/dist/icons/64.png new file mode 100644 index 0000000..fae92b4 Binary files /dev/null and b/dist/icons/64.png differ diff --git a/dist/linux/app.desktop.in b/dist/linux/app.desktop.in new file mode 100644 index 0000000..e05c47b --- /dev/null +++ b/dist/linux/app.desktop.in @@ -0,0 +1,26 @@ +[Desktop Entry] +Version=1.0 +Name=@NAME@ +Type=Application +Comment=A terminal emulator +TryExec=@GHOSTTY@ +Exec=@GHOSTTY@ --gtk-single-instance=true +Icon=com.mitchellh.ghostty +Categories=System;TerminalEmulator; +Keywords=terminal;tty;pty; +StartupNotify=true +StartupWMClass=@APPID@ +Terminal=false +Actions=new-window; +X-GNOME-UsesNotifications=true +X-TerminalArgExec=-e +X-TerminalArgTitle=--title= +X-TerminalArgAppId=--class= +X-TerminalArgDir=--working-directory= +X-TerminalArgHold=--wait-after-command +DBusActivatable=true +X-KDE-Shortcuts=Ctrl+Alt+T + +[Desktop Action new-window] +Name=New Window +Exec=@GHOSTTY@ --gtk-single-instance=true diff --git a/dist/linux/com.mitchellh.ghostty.metainfo.xml.in b/dist/linux/com.mitchellh.ghostty.metainfo.xml.in new file mode 100644 index 0000000..4f23c35 --- /dev/null +++ b/dist/linux/com.mitchellh.ghostty.metainfo.xml.in @@ -0,0 +1,65 @@ + + + @APPID@ + @APPID@.desktop + @NAME@ + https://ghostty.org + https://ghostty.org/docs + https://github.com/ghostty-org/ghostty/discussions + https://ghostty.org/docs/help + https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md + https://github.com/ghostty-org/ghostty/blob/main/po/README_TRANSLATORS.md + https://github.com/ghostty-org/ghostty + Ghostty is a fast, feature-rich, and cross-platform terminal emulator + MIT + MIT + + + Mitchell Hashimoto + + m@mitchellh.com + +

+ Ghostty is a terminal emulator that differentiates itself by being fast, + feature-rich, and native. While there are many excellent terminal + emulators available, they all force you to choose between speed, + features, or native UIs. Ghostty provides all three. +

+
+ + keyboard + pointing + + + + 360 + + com.mitchellh.ghostty + + + + + + + https://ghostty.org/docs/install/release-notes/1-3-1 + + + https://ghostty.org/docs/install/release-notes/1-3-0 + + + https://ghostty.org/docs/install/release-notes/1-0-1 + + +
diff --git a/dist/linux/dbus.service.flatpak.in b/dist/linux/dbus.service.flatpak.in new file mode 100644 index 0000000..873f8dc --- /dev/null +++ b/dist/linux/dbus.service.flatpak.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=@APPID@ +Exec=@GHOSTTY@ --gtk-single-instance=true --initial-window=false diff --git a/dist/linux/dbus.service.in b/dist/linux/dbus.service.in new file mode 100644 index 0000000..8758a34 --- /dev/null +++ b/dist/linux/dbus.service.in @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=@APPID@ +SystemdService=app-@APPID@.service +Exec=@GHOSTTY@ --gtk-single-instance=true --initial-window=false diff --git a/dist/linux/ghostty_dolphin.desktop b/dist/linux/ghostty_dolphin.desktop new file mode 100755 index 0000000..5e83513 --- /dev/null +++ b/dist/linux/ghostty_dolphin.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=KonqPopupMenu/Plugin +MimeType=inode/directory +Actions=RunGhosttyDir + +[Desktop Action RunGhosttyDir] +Name=Open Ghostty Here +Icon=com.mitchellh.ghostty +Exec=ghostty --working-directory=%F --gtk-single-instance=false + diff --git a/dist/linux/ghostty_nautilus.py b/dist/linux/ghostty_nautilus.py new file mode 100644 index 0000000..02bbe3f --- /dev/null +++ b/dist/linux/ghostty_nautilus.py @@ -0,0 +1,66 @@ +# Adapted from wezterm: https://github.com/wez/wezterm/blob/main/assets/wezterm-nautilus.py +# original copyright notice: +# +# Copyright (C) 2022 Sebastian Wiesner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +from pathlib import Path +import gettext +from gi.repository import Nautilus, GObject, Gio + +DOMAIN = "com.mitchellh.ghostty" +locale_dir = Path(__file__).absolute().parents[2] / "locale" +_ = gettext.translation(DOMAIN, locale_dir, fallback=True).gettext + +def open_in_ghostty_activated(_menu, paths): + for path in paths: + cmd = ['ghostty', f'--working-directory={path}', '--gtk-single-instance=false'] + Gio.Subprocess.new(cmd, Gio.SubprocessFlags.NONE) + + +def get_paths_to_open(files): + paths = [] + for file in files: + location = file.get_location() if file.is_directory() else file.get_parent_location() + path = location.get_path() + if path and path not in paths: + paths.append(path) + if 10 < len(paths): + # Let's not open anything if the user selected a lot of directories, + # to avoid accidentally spamming their desktop with dozends of + # new windows or tabs. Ten is a totally arbitrary limit :) + return [] + else: + return paths + + +def get_items_for_files(name, files): + paths = get_paths_to_open(files) + if paths: + item = Nautilus.MenuItem(name=name, label=_('Open in Ghostty'), + icon='com.mitchellh.ghostty') + item.connect('activate', open_in_ghostty_activated, paths) + return [item] + else: + return [] + + +class GhosttyMenuProvider(GObject.GObject, Nautilus.MenuProvider): + def get_file_items(self, files): + return get_items_for_files('GhosttyNautilus::open_in_ghostty', files) + + def get_background_items(self, file): + return get_items_for_files('GhosttyNautilus::open_folder_in_ghostty', [file]) diff --git a/dist/linux/systemd.service.in b/dist/linux/systemd.service.in new file mode 100644 index 0000000..17589f0 --- /dev/null +++ b/dist/linux/systemd.service.in @@ -0,0 +1,14 @@ +[Unit] +Description=@NAME@ +After=graphical-session.target +After=dbus.socket +Requires=dbus.socket + +[Service] +Type=notify-reload +ReloadSignal=SIGUSR2 +BusName=@APPID@ +ExecStart=@GHOSTTY@ --gtk-single-instance=true --initial-window=false + +[Install] +WantedBy=graphical-session.target