Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
*.AppImage
*.tar.gz

# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
Binary file modified assets/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/appimage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions assets/ghostty.appdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<content_rating type="oars-1.0" />
<id>com.mitchellh.ghostty</id>
<metadata_license>MIT</metadata_license>
<project_license>MIT</project_license>
<name>Ghostty</name>
<icon type="remote">https://raw.githubusercontent.com/ghostty-org/ghostty/refs/heads/main/images/icons/icon_256.png</icon>
<summary>Fast, native, feature-rich terminal emulator pushing modern features</summary>
<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>

<p>
In all categories, I am not trying to claim that Ghostty is the best
(i.e. the fastest, most feature-rich, or most native). But Ghostty is
competitive in all three categories and Ghostty doesn't make you choose
between them.
</p>

<p>
Ghostty also intends to push the boundaries of what is possible with a
terminal emulator by exposing modern, opt-in features that enable CLI
tool developers to build more feature rich, interactive applications.
</p>

<p>
While aiming for this ambitious goal, our first step is to make Ghostty
one of the best fully standards compliant terminal emulator, remaining
compatible with all existing shells and software while supporting all of
the latest terminal innovations in the ecosystem. You can use Ghostty as
a drop-in replacement for your existing terminal emulator.
</p>
</description>

<launchable type="desktop-id">com.mitchellh.ghostty.desktop</launchable>

<url type="homepage">https://ghostty.org/</url>
<url type="help">https://ghostty.org/docs/about</url>
<url type="bugtracker">https://github.com/ghostty-org/ghostty/issues</url>

<!-- tbd
<screenshots>
<screenshot type="default">
<caption>Use background image attachments</caption>
<image>https://ghostty.org/tbd-screenshot.png</image>
</screenshot>
</screenshots>
-->

<developer id="com.mitchellh">
<name>Mitchell Hashimoto</name>
</developer>

<releases>
<release version="v1.0.1+1" date="2025-01-09">
<description>
<p>
Initial AppImage build.
</p>
</description>
</release>
</releases>
</component>
22 changes: 22 additions & 0 deletions assets/ghostty.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[Desktop Entry]
Name=Ghostty
Type=Application
Comment=A terminal emulator
Exec=ghostty
Icon=com.mitchellh.ghostty
StartupWMClass=com.mitchellh.ghostty
Categories=System;TerminalEmulator;Utility;
Keywords=terminal;tty;pty;
StartupNotify=true
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

[Desktop Action new-window]
Name=New Window
Exec=ghostty
56 changes: 26 additions & 30 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,25 @@
set -e

export ARCH="$(uname -m)"

GHOSTTY_VERSION="1.0.1"

# Detect latest version numbers when jq is available.
if command -v jq >/dev/null 2>&1; then
if [ "$1" = "latest" ]; then
GHOSTTY_VERSION="$(
curl -s https://api.github.com/repos/ghostty-org/ghostty/tags |
jq '[.[] | select(.name != "tip") | .name | ltrimstr("v")] | sort_by(split(".") | map(tonumber)) | last'
)"
fi
fi

TMP_DIR="/tmp/ghostty-build"
APP_DIR="${TMP_DIR}/ghostty.AppDir"
PUB_KEY="RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV"
UPINFO="gh-releases-zsync|$(echo "$GITHUB_REPOSITORY" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY:-no-user/no-repo}" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
APPDATA_FILE="${PWD}/assets/ghostty.appdata.xml"
DESKTOP_FILE="${PWD}/assets/ghostty.desktop"

rm -rf "${TMP_DIR}"

Expand All @@ -20,7 +34,7 @@ wget -q "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_

minisign -V -m "ghostty-${GHOSTTY_VERSION}.tar.gz" -P "${PUB_KEY}" -s "ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"

rm ghostty-${GHOSTTY_VERSION}.tar.gz.minisig
rm "ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"

tar -xzmf "ghostty-${GHOSTTY_VERSION}.tar.gz"

Expand Down Expand Up @@ -52,7 +66,7 @@ if ! mv ./usr/lib/ld-linux-x86-64.so.2 ./; then
cp -v /lib64/ld-linux-x86-64.so.2 ./
fi

# prep appimage
# Prepare AppImage -- Configure launcher script, metainfo and desktop file with icon.
cat <<'EOF' >./AppRun
#!/usr/bin/env sh

Expand All @@ -66,33 +80,15 @@ EOF

chmod +x AppRun

ln -s usr/share/applications/com.mitchellh.ghostty.desktop .
ln -s usr/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png .

sed -i 's/;TerminalEmulator;/;TerminalEmulator;Utility;/' com.mitchellh.ghostty.desktop

cat <<'EOF' >./usr/share/metainfo/com.mitchellh.ghostty.appdata.xml
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<content_rating type="oars-1.0" />
<description>
<p>
👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.
</p>
</description>
<developer id="com.mitchellh">
<name>Mitchell Hashimoto</name>
</developer>
<icon type="remote">https://raw.githubusercontent.com/ghostty-org/ghostty/refs/heads/main/images/icons/icon_256.png</icon>
<id>com.mitchellh.ghostty</id>
<launchable type="desktop-id">com.mitchellh.ghostty.desktop</launchable>
<metadata_license>MIT</metadata_license>
<name>Ghostty</name>
<project_license>MIT</project_license>
<summary>A terminal emulator</summary>
<url type="homepage">https://ghostty.org</url>
</component>
EOF
cp "${APPDATA_FILE}" "usr/share/metainfo/com.mitchellh.ghostty.appdata.xml"

# Fix Gnome dock issues -- StartupWMClass attribute needs to be present.
cp "${DESKTOP_FILE}" "usr/share/applications/com.mitchellh.ghostty.desktop"
# WezTerm has this, it might be useful.
ln -s "com.mitchellh.ghostty.desktop" "usr/share/applications/ghostty.desktop"

ln -s "usr/share/applications/com.mitchellh.ghostty.desktop" .
ln -s "usr/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png" .

cd "${TMP_DIR}"

Expand Down
22 changes: 19 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ set -e
export DEBIAN_FRONTEND="noninteractive"

ZIG_VERSION="0.13.0"
MINISIGN_URL="https://github.com/jedisct1/minisign/releases/download/0.11/minisign-0.11-linux.tar.gz"

# Detect latest version numbers when jq is available.
if command -v jq >/dev/null 2>&1; then
if [ "$1" = "latest" ]; then
ZIG_VERSION="$(
curl -s "https://ziglang.org/download/index.json" |
jq -r '[keys[] | select(. != "master" and contains("."))] | sort_by(split(".") | map(tonumber)) | last'
)"
MINISIGN_URL="$(
curl -s "https://api.github.com/repos/jedisct1/minisign/releases/latest" |
jq -r --arg prefix "minisign" --arg suffix "linux.tar.gz" \
'.assets[] | select(.name | startswith($prefix) and endswith($suffix)) | .browser_download_url'
)"
fi
fi

# update & install os base dependencies
buildPkgs="build-essential libonig-dev libbz2-dev pandoc wget fuse libfuse2t64 file zsync appstream"
Expand All @@ -17,8 +33,8 @@ wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/a
install appimagetool-x86_64.AppImage /usr/local/bin/appimagetool

# minisign: https://github.com/jedisct1/minisign
wget -q "https://github.com/jedisct1/minisign/releases/download/0.11/minisign-0.11-linux.tar.gz"
tar -xzf minisign-0.11-linux.tar.gz
wget -q "${MINISIGN_URL}" -O "minisign-linux.tar.gz"
tar -xzf "minisign-linux.tar.gz"
mv minisign-linux/x86_64/minisign /usr/local/bin

# zig: https://ziglang.org
Expand All @@ -29,6 +45,6 @@ ln -s "/opt/zig-linux-x86_64-${ZIG_VERSION}/zig" /usr/local/bin/zig
# cleanup
rm -r \
"appimagetool-x86_64.AppImage" \
"minisign-0.11-linux.tar.gz" \
"minisign-linux.tar.gz" \
"minisign-linux" \
"zig-linux-x86_64-${ZIG_VERSION}.tar.xz"