refactor: resolve cross-crate integration TODOs and resources discovery
Cleanup pass over items collected in docs/rewrite/INTEGRATION_TODO.md: - OSC 133 printf-q / percent decoders live once in ghostty_vt::string_encoding; ghostty-os re-exports them. - CursorStyle and clipboard codepoint map entries have one definition (ghostty-terminal); ghostty-config now depends on ghostty-terminal. - ActionKey::docs() trailing blank lines fixed at the source; cli's workaround removed (+list-actions --docs still byte-identical). - x11_color exposes names in original case; cli no longer re-parses rgb.txt. - One cgroup scope wait loop (ghostty_os::cgroup::wait_for_scope). - Flatpak passwd lookup implemented in ghostty-os via a local pty. - +version shows the rustc version captured at build time. Resources: dev builds find <workspace>/resources automatically (keeping Ghostty's sentinel-file detection and GHOSTTY_RESOURCES_DIR); scripts/gen-terminfo.sh (just terminfo) regenerates the compiled terminfo; `just install [PREFIX]` installs binary, share/ghostty, terminfo, desktop/D-Bus/systemd/metainfo files and icons. Test Plan: - cargo test for vt, os, config, input, cli - diff `+list-keybinds`, `+list-actions --docs`, `+show-config --default` against /usr/bin/ghostty
This commit is contained in:
1 parent
062c643ea8
commit
7868e56273
24 files changed
+656
-513
No files matched your search
@@ -33,3 +33,39 @@ test:
|
||||
|
||||
clean:
|
||||
cargo clean
|
||||
|
||||
# Install bin + share/ghostty (shell-integration, themes) + share/terminfo +
|
||||
# desktop file, D-Bus/systemd/metainfo and icons, mirroring Ghostty's
|
||||
# GhosttyResources.zig. Usage: `just install /usr/local` (default PREFIX
|
||||
# /usr/local; honours DESTDIR). Builds the release profile.
|
||||
install PREFIX="/usr/local": build-release
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
P="${DESTDIR:-}{{ PREFIX }}"
|
||||
install -Dm755 target/release/ghostty "$P/bin/ghostty"
|
||||
mkdir -p "$P/share/ghostty" "$P/share/terminfo"
|
||||
cp -R resources/shell-integration resources/themes "$P/share/ghostty/"
|
||||
find "$P/share/ghostty/shell-integration" -name '*.md' -delete
|
||||
find "$P/share/ghostty/themes" -name '*.md' -delete
|
||||
cp -R resources/terminfo/. "$P/share/terminfo/"
|
||||
gen() { # template out
|
||||
mkdir -p "$(dirname "$2")"
|
||||
sed -e 's|@NAME@|Ghostty|g' -e 's|@APPID@|com.mitchellh.ghostty|g' \
|
||||
-e "s|@GHOSTTY@|{{ PREFIX }}/bin/ghostty|g" "$1" > "$2"
|
||||
}
|
||||
gen dist/linux/app.desktop.in "$P/share/applications/com.mitchellh.ghostty.desktop"
|
||||
gen dist/linux/dbus.service.in "$P/share/dbus-1/services/com.mitchellh.ghostty.service"
|
||||
gen dist/linux/systemd.service.in "$P/share/systemd/user/app-com.mitchellh.ghostty.service"
|
||||
gen dist/linux/com.mitchellh.ghostty.metainfo.xml.in "$P/share/metainfo/com.mitchellh.ghostty.metainfo.xml"
|
||||
install -Dm644 dist/linux/ghostty_dolphin.desktop "$P/share/kio/servicemenus/com.mitchellh.ghostty.desktop"
|
||||
install -Dm755 dist/linux/ghostty_nautilus.py "$P/share/nautilus-python/extensions/ghostty.py"
|
||||
ic="$P/share/icons/hicolor"
|
||||
for pair in 16:16x16 32:32x32 128:128x128 256:256x256 512:512x512 1024:1024x1024 \
|
||||
32:16x16@2 64:32x32@2 256:128x128@2 512:256x256@2; do
|
||||
install -Dm644 "dist/icons/${pair%%:*}.png" "$ic/${pair##*:}/apps/com.mitchellh.ghostty.png"
|
||||
done
|
||||
echo "installed to $P"
|
||||
|
||||
# Regenerate resources/terminfo from the terminfo source in ghostty-termio.
|
||||
terminfo:
|
||||
scripts/gen-terminfo.sh
|
||||
Reference in new issue
Block a user