Skip to content

Commit 9842ee3

Browse files
author
psadi
committed
docs: added docs and pre-commit hook
1 parent 8b7353c commit 9842ee3

File tree

9 files changed

+126
-12
lines changed

9 files changed

+126
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
release_appimage:
4141
name: "Upload binaries to current release"
4242
runs-on: ubuntu-latest
43-
# if: ${{ github.event_name == 'release' }}
43+
if: ${{ github.event_name == 'release' }}
4444
needs: "build_appimage"
4545
steps:
4646
- uses: actions/download-artifact@v4

.pre-commit-config.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v5.0.0
5+
hooks:
6+
- id: check-executables-have-shebangs
7+
- id: check-merge-conflict
8+
- id: check-shebang-scripts-are-executable
9+
- id: fix-byte-order-marker
10+
- id: mixed-line-ending
11+
- id: end-of-file-fixer
12+
- id: trailing-whitespace
13+
args: [--markdown-linebreak-ext=md]
14+
- id: check-yaml
15+
- id: no-commit-to-branch
16+
17+
- repo: https://github.com/shellcheck-py/shellcheck-py
18+
rev: v0.10.0.1
19+
hooks:
20+
- id: shellcheck
21+
args: ["--severity=error"]
22+
23+
- repo: https://github.com/scop/pre-commit-shfmt
24+
rev: v3.10.0-2
25+
hooks:
26+
- id: shfmt
27+
args: ["-w", "-s"]
28+
29+
- repo: https://github.com/rhysd/actionlint
30+
rev: v1.7.6
31+
hooks:
32+
- id: actionlint-system

README.md

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,78 @@
1-
# ghostty-appimage
2-
AppImage(s) for Ghostty
1+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/psadi/ghostty-appimage/blob/main/LICENSE)
2+
[![Build Status](https://github.com/psadi/ghostty-appimage/actions/workflows/ci.yaml/badge.svg)](https://github.com/psadi/ghostty-appimage/actions/workflows/ci.yaml)
3+
4+
<h1><p align="center">
5+
<img src="./assets/ghostty.png" alt="Ghostty Logo" width="128">
6+
<img src="./assets/appimage.png" alt="AppImage Logo" width="128">
7+
<br>Ghostty AppImage
8+
</p></h1>
9+
10+
This repository provides build scripts to create a Universal AppImage for [Ghostty](https://ghostty.org/). This unofficial build offers an executable AppImage compatible with any Linux distribution following the **x86_64 architecture**.
11+
12+
13+
**Ghostty Source Code:** [Click Here](https://github.com/ghostty-org/ghostty)
14+
15+
16+
## 🚀 Quick Start
17+
18+
1. Download the latest AppImage from the [releases](https://github.com/psadi/ghostty-appimage/releases) section.
19+
2. Follow the installation instructions below to run the AppImage.
20+
21+
## ⚙️ Installation
22+
23+
### Command Line
24+
25+
Run the following commands in your terminal:
26+
27+
```bash
28+
# Download the latest AppImage package
29+
wget https://github.com/psadi/ghostty-appimage/releases/download/[TAG]/Ghostty-x86_64.AppImage
30+
# Provide executable permissions
31+
chmod +x Ghostty-x86_64.AppImage
32+
# Execute the AppImage
33+
./Ghostty-x86_64.AppImage
34+
```
35+
36+
### Graphical
37+
38+
1. Download the latest AppImage package from the [releases](https://github.com/psadi/ghostty-appimage/releases) section.
39+
2. Locate the downloaded file in your file explorer (e.g., Nautilus, Thunar, PCManFM).
40+
3. Right-click the downloaded file and select **Properties**.
41+
4. Navigate to the **Permissions** tab and check the box that says **Allow executing file as program/Executable as Program**.
42+
5. Close the properties window and double-click the AppImage file to run it.
43+
44+
<p align="center">
45+
<img src="./assets/1.png" alt="Step 1" width="384" style="margin-right: 10px;">
46+
<img src="./assets/2.png" alt="Step 2" width="384">
47+
</p>
48+
49+
## ⏫ Updating
50+
51+
Since AppImages are self-contained executables, there is no formal installation process beyond setting executable permissions.
52+
53+
**To update:**
54+
55+
1. Download the latest AppImage package from the [releases](https://github.com/psadi/ghostty-appimage/releases) section.
56+
2. Follow the same steps as in the [Installation](#installation) section to make it executable and run it.
57+
58+
## ❓ What's Next?
59+
60+
1. Submit AppImage(s) to [AppImageHub](https://appimage.github.io/).
61+
2. Provide AppImages for other supported architectures.
62+
63+
| **Architecture** | **Support** |
64+
|------------------|-------------|
65+
| x86_64 ||
66+
| i386 ||
67+
| ARM ||
68+
69+
### 🛠️ Troubleshooting
70+
71+
- If the AppImage does not run, ensure that you have provided executable permissions.
72+
- If you encounter any errors, check the terminal for error messages that may indicate missing dependencies or other issues.
73+
74+
## 🤝 Contributing
75+
76+
Contributions & Bugfixes are welcome. If you like to contribute, please feel free to fork the repository and submit a pull request.
77+
78+
For any questions or discussions, please open an issue in the repository.

assets/1.png

27.6 KB
Loading

assets/2.png

39.1 KB
Loading

assets/appimage.png

30 KB
Loading

assets/ghostty.png

216 KB
Loading

build.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,25 @@ ZIG_GLOBAL_CACHE_DIR=/tmp/offline-cache ./nix/build-support/fetch-zig-cache.sh
3333

3434
# Build Ghostty with zig
3535
zig build \
36-
--summary all \
37-
--prefix "${APP_DIR}/usr" \
38-
--system /tmp/offline-cache/p \
39-
-Doptimize=ReleaseFast \
40-
-Dcpu=baseline \
41-
-Dpie=true \
42-
-Demit-docs \
43-
-Dversion-string="${GHOSTTY_VERSION}"
36+
--summary all \
37+
--prefix "${APP_DIR}/usr" \
38+
--system /tmp/offline-cache/p \
39+
-Doptimize=ReleaseFast \
40+
-Dcpu=baseline \
41+
-Dpie=true \
42+
-Demit-docs \
43+
-Dversion-string="${GHOSTTY_VERSION}"
4444

4545
cd "${APP_DIR}"
4646

4747
# prep appimage
48-
printf '#!/bin/sh\n\nexec "$(dirname "$(readlink -f "$0")")/usr/bin/ghostty"\n' | tee AppRun > /dev/null
48+
printf '#!/bin/sh\n\nexec "$(dirname "$(readlink -f "$0")")/usr/bin/ghostty"\n' | tee AppRun >/dev/null
4949
chmod +x AppRun
5050
ln -s usr/share/applications/com.mitchellh.ghostty.desktop
5151
ln -s usr/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png
5252

5353
cd "${TMP_DIR}"
5454
# create app image
5555
ARCH=x8_64 appimagetool "${APP_DIR}"
56+
57+
appimagelint "${TMP_DIR}/Ghostty-x86_64.AppImage" || true

setup.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/a
1717
install appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
1818
rm appimagetool-x86_64.AppImage
1919

20+
wget -q "https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage"
21+
install appimagelint-x86_64.AppImage /usr/local/bin/appimagelint
22+
rm appimagelint-x86_64.AppImage
23+
2024
# minisign: https://github.com/jedisct1/minisign
2125
wget -q "https://github.com/jedisct1/minisign/releases/download/0.11/minisign-0.11-linux.tar.gz"
2226
tar -xzf minisign-0.11-linux.tar.gz

0 commit comments

Comments
 (0)