-
Notifications
You must be signed in to change notification settings - Fork 906
Fix image display with tmux + kitty #2856
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to test this but if it fixes image previews in Tmux in Kitty that's awesome!
9d1db50
to
71a06f2
Compare
@Ethsan Can I patch ranger on my own using this PR? Would things work as expected? Can't wait for this PR to go into the next release. |
Feel free, remember to allow passthrough in tmux and it should work like a charm. I only tested it on my machine, if there is a problem don't hesitate to tell me. |
This issue was happening to me as well, even though I don't use tmux. While using kitty to preview images, ranger would freeze after opening any image file. This PR fixed it for me. Thank you. For anyone wanting to patch this on nix, you need to add a couple of extra deps. As an overlay: (self: super: {
# Use ranger PR, fixes freeze after opening image in kitty: https://github.com/ranger/ranger/pull/2856
ranger = super.ranger.overrideAttrs (old: {
version = "1.9.3";
src = super.fetchFromGitHub {
owner = "Ethsan";
repo = "ranger";
rev = "71a06f28551611d192d3e644d95ad04023e10801";
sha256 = "sha256-Yjdn1oE5VtJMGnmQ2VC764UXKm1PrkIPXXQ8MzQ8u1U=";
};
propagatedBuildInputs = old.propagatedBuildInputs ++ (with super.python3Packages; [ astroid pylint ]);
});
}) |
@thenbe I think I see why it work but I am not sure. Do you use a terminal multiplexer ? What is your TERM variable ? |
Whatever is set by kitty by default, I haven't changed it.
|
Lmao I don’t know why it work but good for you. |
@Ethsan I think I was affected by this bug: #1603 (comment). Originally, I was on latest stable release. I only got the fix for my freezing issue when I patched ranger to point to your PR, since the fix for my issue has only been merged to master but not released yet. Still, thank you for contributing. |
Not sure if this is the appropriate thread but hopefully it's still useful to some. I've been waiting for tmux+kitty+ranger+wayland support for a long time. Then I just realized ueberzugpp supports tmux on sway. It just works out of the box: https://github.com/ranger/ranger/wiki/Image-Previews#with-ueberzug |
Add support for image with tmux + kitty, by using unicode placeholder characters of the kitty protocol and tmux passthrough sequence. To work, allow-passthrough need to be activated in tmux and kitty >= v0.28.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- it works
- mergeable with current master
New PR: #3086 |
Fix image display with tmux + kitty
ISSUE TYPE
RUNTIME ENVIRONMENT
CHECKLIST
CONTRIBUTING
document has been read [REQUIRED]DESCRIPTION
Fix escape sequence for tmux passthrough
Add the possibility to render images wiith placehoder ( necessary with tmux )
MOTIVATION AND CONTEXT
Could not view image with tmux+kitty but work in icat #2846
TESTING
Tested with
i ran
make test