feat(terminal): Kitty only — drop Ghostty (#95)
Some checks failed
Check / eval (push) Has been cancelled
Some checks failed
Check / eval (push) Has been cancelled
Ghostty's OpenGL 4.3 floor broke the Acer (HD 4000 / 4.2). Dual-terminal support (default Ghostty + install-time Kitty fallback) was more complexity than it was worth. - Remove ghostty.nix / nomarchy.ghostty.enable - Kitty always installed and themed from theme-state - Default nomarchy.terminal = kitty; SUPER+Return, doctor, calendar, what-changed use kitty --class=com.nomarchy.* - Drop install-time glxinfo probe and mesa-demos on the installer - Docs/REQUIREMENTS no longer list OpenGL 4.3 as a terminal floor Verified: V0 flake check; option-docs; installer-safety; template HM has kitty, no ghostty; menu/calendar emit classed kitty launches.
This commit is contained in:
@@ -625,47 +625,6 @@ python3 "$SHARE/patch-template.py" "$FLAKE_DIR" <<PYJSON
|
||||
}
|
||||
PYJSON
|
||||
|
||||
# Ghostty requires OpenGL 4.3 (docs/REQUIREMENTS.md). On older GPUs (Intel
|
||||
# HD 4000 / Ivy Bridge tops at 4.2) it cannot map a surface. Prefer Kitty
|
||||
# as the default terminal when we can prove the floor is missing — written
|
||||
# into theme-state.json so SUPER+Return works after first boot without a
|
||||
# hand edit. Unknown probe → leave Ghostty (do not guess on headless VMs).
|
||||
gl_ver=""
|
||||
if command -v glxinfo >/dev/null 2>&1; then
|
||||
gl_ver=$(
|
||||
{ DISPLAY="${DISPLAY:-:0}" WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-}" \
|
||||
glxinfo -B 2>/dev/null || glxinfo -B 2>/dev/null || true; } \
|
||||
| sed -n 's/.*OpenGL version string: \([0-9][0-9]*\.[0-9][0-9]*\).*/\1/p' \
|
||||
| head -1
|
||||
)
|
||||
fi
|
||||
if [[ -n "$gl_ver" ]]; then
|
||||
gl_major=${gl_ver%%.*}
|
||||
gl_minor=${gl_ver#*.}
|
||||
gl_minor=${gl_minor%%.*}
|
||||
if (( gl_major < 4 || (gl_major == 4 && gl_minor < 3) )); then
|
||||
info "OpenGL $gl_ver < 4.3 — default terminal → kitty (Ghostty needs 4.3)"
|
||||
python3 - "$FLAKE_DIR/theme-state.json" <<'PY'
|
||||
import json, sys
|
||||
path = sys.argv[1]
|
||||
with open(path, encoding="utf-8") as f:
|
||||
state = json.load(f)
|
||||
settings = state.setdefault("settings", {})
|
||||
# Do not clobber an explicit user/template choice.
|
||||
if not settings.get("terminal"):
|
||||
settings["terminal"] = "kitty"
|
||||
settings["terminalReason"] = "opengl-below-4.3"
|
||||
with open(path, "w", encoding="utf-8") as f:
|
||||
json.dump(state, f, indent=2)
|
||||
f.write("\n")
|
||||
PY
|
||||
else
|
||||
info "OpenGL $gl_ver ≥ 4.3 — keeping Ghostty as the default terminal"
|
||||
fi
|
||||
else
|
||||
info "OpenGL version not probed (glxinfo unavailable or no display) — Ghostty stays default"
|
||||
fi
|
||||
|
||||
# The flake.lock: composed offline — nomarchy is path-locked to the very
|
||||
# source the ISO carries (original stays the forge URL, so a later
|
||||
# `nix flake update` on the installed machine re-resolves normally).
|
||||
|
||||
Reference in New Issue
Block a user