Skip to content
Open
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
24 changes: 24 additions & 0 deletions guest/native-overlay/usr/local/bin/alacritty
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Alacritty's OpenGL path paints an empty transparent surface on Try Omarchy's
# VirGL guest. Force Mesa llvmpipe so Install → Terminal → Alacritty is usable.
# Prefer the pacman binary so this PATH shim never recurses on itself.

real=/usr/bin/alacritty
if [[ ! -x $real ]]; then
echo "alacritty is not installed" >&2
exit 127
fi

cmdline_file=${OMARCHY_ALACRITTY_CMDLINE:-/proc/cmdline}
if [[ -r $cmdline_file ]]; then
read -r -a kernel_options <"$cmdline_file" || true
for kernel_option in "${kernel_options[@]}"; do
if [[ $kernel_option == omarchy.qemu_virgl=1 ]]; then
export LIBGL_ALWAYS_SOFTWARE=1
break
fi
done
fi

exec "$real" "$@"
1 change: 1 addition & 0 deletions guest/scripts/configure-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ chmod 0755 \
"$root/usr/bin/omarchy-audio-input-set-default" \
"$root/usr/bin/omarchy-screensaver" \
"$root/usr/bin/omarchy-theme-bg-switcher" \
"$root/usr/local/bin/alacritty" \
"$root/usr/local/bin/omarchy-native-audio-bridge" \
"$root/usr/local/bin/omarchy-native-camera-bridge" \
"$root/usr/local/bin/omarchy-native-clipboard-bridge" \
Expand Down
12 changes: 12 additions & 0 deletions guest/tests/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,17 @@ def main() -> None:
"native background picker override is executable",
)
check(cursor_restore.stat().st_mode & stat.S_IXUSR != 0, "native cursor restore helper is executable")
alacritty_wrapper = GUEST / "native-overlay/usr/local/bin/alacritty"
alacritty_wrapper_text = read(alacritty_wrapper)
check(alacritty_wrapper.stat().st_mode & stat.S_IXUSR != 0, "Alacritty VirGL wrapper is executable")
check(
'real=/usr/bin/alacritty' in alacritty_wrapper_text
and "export LIBGL_ALWAYS_SOFTWARE=1" in alacritty_wrapper_text
and "omarchy.qemu_virgl=1" in alacritty_wrapper_text
and 'exec "$real" "$@"' in alacritty_wrapper_text
and '"$root/usr/local/bin/alacritty"' in configure,
"Alacritty VirGL wrapper forces software GL onto the pacman binary",
)
check(
"/usr/local/bin/omarchy-native-cursor-restore 2>/dev/null || true"
in read(screensaver_override),
Expand Down Expand Up @@ -1183,6 +1194,7 @@ def main() -> None:
screensaver_override,
background_switcher_override,
cursor_restore,
alacritty_wrapper,
display_sync,
mac_share,
*GUEST.glob("*.sh"),
Expand Down
Loading