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

tmux support #118

Open
wpalace opened this issue Sep 30, 2024 · 4 comments
Open

tmux support #118

wpalace opened this issue Sep 30, 2024 · 4 comments

Comments

@wpalace
Copy link

wpalace commented Sep 30, 2024

This program is fantastic! Thanks for creating it!

I just started experimenting with it and noticed if I remote into a tmux session which I prefer to do, images will not display. I have kitty installed on both the host and remote machines.

This works:
ssh user@somehost -t

This does not work:
ssh user@somehost -t "tmux new-session -A -s mysesh"

image

@joouha
Copy link
Owner

joouha commented Sep 30, 2024

Hi,

Thanks for the kind words.

Only recent versions of tmux support sixel graphics (tmux>=3.4), and for this to work tmux has to be compiled with sixel support enabled. It doesn't support the kitty graphics protocol unfortunately.

It is possible to bypass tmux and send graphics commands directly to the terminal, but this is rather temperamental. You can try this by running euporie using the following command line options:

euporie-console --multiplexer-passthrough --force-graphics --graphics=kitty

(Please note that running euporie over SSH means that images may not be displayed at the correct size, as it's not always possible to detect the terminal size over SSH).

I hope that helps

@wpalace
Copy link
Author

wpalace commented Sep 30, 2024

Thanks for the quick response. Running the command you provided gives me a blank area where the image should be; however, if I run just the command below, I get back the graphic but it is pixelated wrong (blocky):
euporie-console --multiplexer-passthrough
Is there any way to manually set my terminal pixel size? If so, I suspect might get it working.

@joouha
Copy link
Owner

joouha commented Oct 1, 2024

Can you tell if it's blocky because it's using ANSI-art style graphics, or is it using kitty graphics but just very low resolution?

Do graphics work as expected for you over SSH when you are not using tmux?

@wpalace
Copy link
Author

wpalace commented Oct 2, 2024

Yes, the graphics work as expected on Kitty when I use SSH (either with or without -t) without tmux. I cannot tell which graphics protocol is being used when I SSH to tmux and omit the --force-graphics parameters. To investigate further, I tried another terminal. It turns out that WezTerm works as expected with SSH to tmux, and I did not need to pass any parameters to euporie-console. Sweet!

My goal is to pass lines of code from neovim, where I can quickly edit with AI assist, to euporie-console in the most efficient means possible. I tried launching euporie-console from neovim's terminal mode, but the graphics did not work from there. I tried this with various terminals, both local and remote. This appears to be a neovim issue, not euporie. The best alternative I have so far is to use two tmux windows or panes and copy-paste, but this involves a lot of keystrokes. I haven't played around with WezTerm's multiplexing features yet. Do you have any suggestions on how to achieve this most efficiently?

This project looks promising: https://github.com/mrjones2014/smart-splits.nvim?tab=readme-ov-file#tmux

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

No branches or pull requests

2 participants