Skip to content

Commit 3914f8c

Browse files
author
psadi
committed
fix: fallback to x11 gdk backend on error
1 parent ef94ea8 commit 3914f8c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ repos:
2929
- repo: https://github.com/rhysd/actionlint
3030
rev: v1.7.6
3131
hooks:
32-
- id: actionlint-system
32+
- id: actionlint
3333

3434
- repo: https://github.com/woodruffw/zizmor
35-
rev: v0.5.0
35+
rev: v0.8.0
3636
hooks:
3737
- id: zizmor
3838
files: ^\.github/workflows/.*\.ya?ml$

build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@ HERE="$(dirname "$(readlink -f "$0")")"
7575
export TERM=xterm-256color
7676
export GHOSTTY_RESOURCES_DIR="${HERE}/usr/share/ghostty"
7777
78-
exec "${HERE}"/ld-linux-x86-64.so.2 --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
78+
79+
exec_command='exec "${HERE}"/ld-linux-x86-64.so.2 --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"'
80+
81+
# Attempt to run normally or fallback GDK_BACKEND to x11
82+
if ! eval "$exec_command"; then
83+
GDK_BACKEND=x11 eval "$exec_command"
84+
fi
85+
7986
EOF
8087

8188
chmod +x AppRun

0 commit comments

Comments
 (0)