chore(dist): add Linux desktop integration files for installation
Desktop entry, AppStream metainfo, D-Bus service and systemd user unit templates plus icons, adapted from ZIG/dist/linux and used by `just install`.
No files matched your search
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 572 B |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
@@ -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
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<component type="desktop-application">
|
||||||
|
<id>@APPID@</id>
|
||||||
|
<launchable type="desktop-id">@APPID@.desktop</launchable>
|
||||||
|
<name>@NAME@</name>
|
||||||
|
<url type="homepage">https://ghostty.org</url>
|
||||||
|
<url type="help">https://ghostty.org/docs</url>
|
||||||
|
<url type="bugtracker">https://github.com/ghostty-org/ghostty/discussions</url>
|
||||||
|
<url type="contact">https://ghostty.org/docs/help</url>
|
||||||
|
<url type="contribute">https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md</url>
|
||||||
|
<url type="translate">https://github.com/ghostty-org/ghostty/blob/main/po/README_TRANSLATORS.md</url>
|
||||||
|
<url type="vcs-browser">https://github.com/ghostty-org/ghostty</url>
|
||||||
|
<summary>Ghostty is a fast, feature-rich, and cross-platform terminal emulator</summary>
|
||||||
|
<metadata_license>MIT</metadata_license>
|
||||||
|
<project_license>MIT</project_license>
|
||||||
|
<content_rating type="oars-1.1" />
|
||||||
|
<developer id="com.mitchellh">
|
||||||
|
<name>Mitchell Hashimoto</name>
|
||||||
|
</developer>
|
||||||
|
<update_contact>m@mitchellh.com</update_contact>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
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.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<recommends>
|
||||||
|
<control>keyboard</control>
|
||||||
|
<control>pointing</control>
|
||||||
|
</recommends>
|
||||||
|
<requires>
|
||||||
|
<!--
|
||||||
|
Mobile/tablet AND desktop supported
|
||||||
|
|
||||||
|
Ref: https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines#display-size
|
||||||
|
-->
|
||||||
|
<display_length compare="ge">360</display_length>
|
||||||
|
</requires>
|
||||||
|
<translation type="gettext">com.mitchellh.ghostty</translation>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
TODO: Generate manifest location data.
|
||||||
|
|
||||||
|
Ref: https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines#manifest-location
|
||||||
|
|
||||||
|
<custom>
|
||||||
|
<value key="flathub::manifest">https://github.com/ghostty-org/ghostty/blob/<hash>/flatpak/com.mitchellh.ghostty.yml</value>
|
||||||
|
</custom>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<releases>
|
||||||
|
<!-- TODO: Generate this automatically -->
|
||||||
|
<release version="1.3.1" date="2026-03-13">
|
||||||
|
<url type="details">https://ghostty.org/docs/install/release-notes/1-3-1</url>
|
||||||
|
</release>
|
||||||
|
<release version="1.3.0" date="2026-03-09">
|
||||||
|
<url type="details">https://ghostty.org/docs/install/release-notes/1-3-0</url>
|
||||||
|
</release>
|
||||||
|
<release version="1.0.1" date="2024-12-31">
|
||||||
|
<url type="details">https://ghostty.org/docs/install/release-notes/1-0-1</url>
|
||||||
|
</release>
|
||||||
|
</releases>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[D-BUS Service]
|
||||||
|
Name=@APPID@
|
||||||
|
Exec=@GHOSTTY@ --gtk-single-instance=true --initial-window=false
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
[D-BUS Service]
|
||||||
|
Name=@APPID@
|
||||||
|
SystemdService=app-@APPID@.service
|
||||||
|
Exec=@GHOSTTY@ --gtk-single-instance=true --initial-window=false
|
||||||
@@ -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
|
||||||
|
|
||||||
@@ -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 <sebastian@swsnr.de>
|
||||||
|
#
|
||||||
|
# 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])
|
||||||
@@ -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
|
||||||