Skip to content

Disable kitty graphics in terminal frames - #751

Merged
dakra merged 1 commit into
mainfrom
fix/tty-no-kitty-graphics
Oct 19, 2026
Merged

dakra merged 1 commit into
mainfrom
fix/tty-no-kitty-graphics

Conversation

@dakra

@dakra dakra commented Oct 19, 2026

Copy link
Copy Markdown
Owner

In emacs -nw ghostel never renders images: both display callbacks skip non-graphic frames. But libghostty still answered the kitty graphics probe with OK, so timg, kitten icat, broot and friends sent images into a void instead of using their own text fallback. That is the "not even a chafa-style fallback" in #533.

libghostty treats the protocol as unsupported, including staying silent on probes, only when the storage limit is 0. This passes 0 at terminal creation when the buffer's frame is a text terminal. The daemon's dummy initial frame is exempt: a buffer created there (desktop restore, emacsclient -e) may be shown in a graphical frame later, and disabling it would regress that case.

Verified live:

Case Result
emacs -nw, kitty probe from a shell in ghostel no answer
GUI Emacs, same probe OK
emacsclient -t frame limit 0
frameless daemon, ghostel-create configured limit

Known gap, inherent to deciding at creation: a buffer created in a GUI frame or a frameless daemon and later viewed only from emacsclient -t still advertises the protocol. libghostty has a runtime setter for the limit, so a display-time switch is possible as a follow-up.

Related to #533.

A TTY frame cannot show images, but libghostty still answered the
kitty graphics probe, so timg, icat and similar tools sent images
into a void instead of using their own text fallback.  Pass a zero
storage limit when the buffer's frame is a text terminal.  The
daemon's dummy initial frame is exempt, since a buffer created there
may be shown in a graphical frame later.

Related to #533.
@dakra
dakra merged commit 020a730 into main Oct 19, 2026
33 checks passed
@dakra
dakra deleted the fix/tty-no-kitty-graphics branch October 19, 2026 12:29

This branch was successfully deployed

1 active deployment
github-pages — 020a7305 Deployed Oct 19, 2026 by dakra via deploy #226
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