Skip to content

Add ghostel (libghostty) terminal backend#134

Open
dakra wants to merge 1 commit intostevemolitor:mainfrom
dakra:ghostel-support
Open

Add ghostel (libghostty) terminal backend#134
dakra wants to merge 1 commit intostevemolitor:mainfrom
dakra:ghostel-support

Conversation

@dakra
Copy link
Copy Markdown

@dakra dakra commented Apr 3, 2026

  • Add ghostel as a third terminal backend alongside eat and vterm, using libghostty-vt for terminal emulation
  • Implement all 10 cl-defmethod specializations for the ghostel backend (make, send-string, kill-process, read-only/interactive mode, configure, faces, keymap, window resize)

Notes

  • Cannot reuse ghostel--start-process since it hardcodes the user's shell and sends stty commands as process input.
    Instead calls make-process directly with ghostel's filter/sentinel.
  • Bell notifications work via buffer-local ring-bell-function (ghostel's native module calls ding on BEL)
  • Title inhibitor uses :around advice so standalone ghostel buffers are unaffected
  • No pop-to-buffer/delete-window needed unlike vterm — ghostel doesn't require a displayed window for initial dimensions

Depends on ghostel.

Implement all 10 cl-defmethod specializations for the ghostel terminal
emulator, providing a third backend option alongside eat and vterm.

Key design decisions:
- Cannot reuse ghostel--start-process (sends stty as input, hardcodes
  shell command), so we call make-process directly with ghostel's filter
  and sentinel
- Bell notification via buffer-local ring-bell-function (ghostel's native
  module calls ding on BEL)
- Title changes inhibited in claude-code buffers via :around advice on
  ghostel--set-title (safe for concurrent standalone ghostel usage)
- Buffer cleanup on process exit via ghostel-exit-functions hook
- No pop-to-buffer/delete-window needed (unlike vterm, ghostel doesn't
  require a displayed window for dimensions)

Also respect claude-code-toggle-auto-select during initial buffer
creation, not just in the toggle command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant