Skip to content

Support Kitty's Unicode placeholders feature and support running loooooooongcat within tmux#48

Open
haya14busa wants to merge 6 commits into
mattn:masterfrom
haya14busa:kitty-unicode-placeholder-and-tmux
Open

Support Kitty's Unicode placeholders feature and support running loooooooongcat within tmux#48
haya14busa wants to merge 6 commits into
mattn:masterfrom
haya14busa:kitty-unicode-placeholder-and-tmux

Conversation

@haya14busa

Copy link
Copy Markdown

@yoichi

yoichi commented May 23, 2025

Copy link
Copy Markdown
Contributor

Unfortunately it didn't work in my environment.
I've tested with tmux 3.5a with Kitty 0.38.1 and Ghostty 1.1.3 on macOS 15.4.1

I confirm that CheckKittyGraphicsProtocol returns false and it was reaching the code path with "If we didn't get the graphics response, assume no support" comment.

Is there anything else I should look into?

@yoichi

yoichi commented May 23, 2025

Copy link
Copy Markdown
Contributor

I have confirmed that there is no response for graphicsQuery even with the printf command.
スクリーンショット 2025-05-24 2 56 47

@yoichi

yoichi commented May 23, 2025

Copy link
Copy Markdown
Contributor

I found that I must set allow-passthrough option of tmux.
https://github.com/tmux/tmux/wiki/FAQ#what-is-the-passthrough-escape-sequence-and-how-do-i-use-it

スクリーンショット 2025-05-24 7 49 14

Then it works!

スクリーンショット 2025-05-24 7 51 54

Comment thread kitty/check.go Outdated
}
defer term.Restore(fd, state)

// Wrap graphics query for tmux if necessary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, option settings are required, so I thought it would be a good idea to add a comment like the one below.

	// Requires the allow-passthrough option set to on or all for this to work
	// https://github.com/tmux/tmux/wiki/FAQ#what-is-the-passthrough-escape-sequence-and-how-do-i-use-it

@yoichi

yoichi commented May 25, 2025

Copy link
Copy Markdown
Contributor

After this change, with Terminal.app on macOS, longcat stops processing at

yoichi@Mac longcat % ./longcat 
Ga=q,i=22896,s=1,v=1,t=d,f=24;AAAA

If I press some key, then the image is displayed in pixterm mode as before.

mattn added 3 commits June 26, 2026 18:26
- Route kitty graphics protocol and cell size queries through a
  QueryTerminal hook instead of duplicating terminal I/O.
- Drop the leaking reader goroutines and reads from os.Stdout.
- Restrict the graphics protocol probe to tmux to avoid mishandling
  on terminals such as Terminal.app.
- Query cell size only in Unicode placeholder mode.
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.

3 participants