Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use unicode placeholders to print images under kitty+tmux #166

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

mfontanini
Copy link
Owner

This uses the unicode placeholder strategy under kitty to get images (including gifs) to work when running under tmux. Caveats:

  • Gifs only seem to really work correctly under tmux 3.3a. 3.2a sometimes doesn't display them upon the first try.
  • This doesn't currently detect kitty (or wezterm) correctly when running in tmux so if you're using tmux on either of those terminals that support the kitty protocol, you need to pass --image-protocol kitty-local (kitty-remote seems to not work great). I may add some better detection but at least this currently works.
  • I tried to get this to work under the iterm protocol as well but I'm afraid it won't work. tmux has some buffer of 1MB that kicks in here and because the iterm protocol sends the entire image in a single b64 chunk, that can easily overflow for any non tiny image. If there's some way to send chunked images in iterm, this can be revisited.

Fixes #72

@mfontanini mfontanini merged commit c97041a into master Jan 24, 2024
5 checks passed
@mfontanini mfontanini deleted the tmux-images branch January 24, 2024 00:38
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.

Images are not shown when using tmux
1 participant