lusingander / serie

A rich git commit graph in your terminal, like magic 📚
MIT License
426 stars 13 forks source link

Graph not loading within Wezterm + tmux #49

Open Mo0rBy opened 1 month ago

Mo0rBy commented 1 month ago

Hey,

I found this cool git graphing terminal solution, installed rust on my system and then installed this utility, and it works, but I cannot see any of the graph images.

My specs are: MacOS M2 Pro Sonoma 14.6.1 Wezterm terminal emulator (can find config in my dotfiles if that helps)

Here is a screenshot of what I see in the utility: Screenshot 2024-09-15 at 17 09 47

I have tried using different protocols as well after seeing the table in this repos README. Alas, all the different options gave me the same results.

alerque commented 1 month ago

Try serie -p kitty to see if Wezterm supports the Kitty image protocol instead of the default iTerm one. If it does we should add detection for it, either in #24 or another new PR. If not then there is nothing you can do.

Mo0rBy commented 1 month ago

I tried using the --protocol flag with values of "kitty", "iterm" and even "auto". All were the same results.

alerque commented 1 month ago

Are you using a terminal multiplexer (like tmux or zellij)? Your screen shot has a status bar at the top that suggests to me you might be. If so that's blocking any use of image protocols from getting through from your TUI apps to the actual terminal.

Mo0rBy commented 1 month ago

Ah yes, I am using tmux, however I don't believe this cuts off the ability to render images completely.

I also use yazi as a TUI file explorer which also includes terminal image rendering from multiple protocols. I have a screenshot here of it rendering the same screenshot I attached in my original post: Screenshot 2024-09-17 at 11 56 21

To fix image previewing within yazi, please look at this (part of my tmux.conf file) and this (yazi docs).

So it's definitely possible to fix image rendering within tmux, and I think it's fairly safe to assume that my tmux.conf settings for enabling image rendering in yazi will be extremely similar (if not the same) as the settings required to get it working with serie.....but I don't know what the differences are between how yazi is doing it and how serie is doing it.

Mo0rBy commented 1 month ago

And I can also confirm that the graph is loading when I am not within a tmux session

Screenshot 2024-09-17 at 12 47 19

adamperkowski commented 1 month ago

I'm using kitty + tmux. The graph is not rendering when in tmux.

ndom91 commented 1 month ago

Seeing this as well with the latest serie, tmux@3.4 and kitty@0.36.1.

I came across this discussion in the tmux repo and tried the recommended config option of set -g allow-passthrough on, but unfortunately that didn't help in my situation.

39555 commented 1 month ago

Can confirm. WSL and Windows. I use Wezterm without tmux and serie, serie -p iterm shows this:

image

serie -p kitty

image

wezterm 20240812-215703-30345b36 serie 0.1.2

alerque commented 1 month ago

As has been covered, this is likely because wezterm doesn't support any of the imaging protocols used.

In addition to the detection of supported terminals (why isn't #24 merged?) I think it would make things a lot easier on this project if it detected some common unsupported terminals and just errored out with a message about the relevant upstream support. That would save quite a bit of user confusion and tinkering. There really isn't much point in running this particular app without image protocol support since it doesn't have a useful ASCII fallback, and there is a regular amount of confusion and tinkering from people expecting it might somehow work.

39555 commented 1 month ago

It turns out this is Wezterm+Windows issue. See: https://github.com/wez/wezterm/issues/1673. On other platforms Serie works perfectly

Mo0rBy commented 1 month ago

As has been covered, this is likely because wezterm doesn't support any of the imaging protocols used.

I don't think so.

According to the yazi documentation I linked earlier in the thread, Wezterm supports the same inline protocol that iTerm uses (you can see this here). The issue you link only mentions Wezterm being unable to use the kitty protocol.

It turns out this is Wezterm+Windows issue. See: wez/wezterm#1673. On other platforms Serie works perfectly

I don't think this is specific to a Windows + wezterm platform, the issue being discussed in this thread is compatibility with tmux as @alerque identified here. I have reworded the title of this issue slightly to reflect that as when I originally opened it, I didn't know tmux was the culprit.

I want to repeat that yazi has already solved the issue of image rendering within tmux for various image protocols and terminals (see this post), I have no idea if that's useful to solve this specific problem, but it certainly shows that it is at least fixable.