-
Notifications
You must be signed in to change notification settings - Fork 888
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
icat preview image method (suggestion/enhancement) #983
Comments
@hut |
@JackofSpades707 @soredake Does icat work on terminals other than kitty, how about inside of tmux? If it does then implementing kitty's graphics protocol for ranger might be worth the effort. So far we've avoided doing image previews with anything more than a program called from |
FYI, I have a branch in my repository with what I currently have, if someone wants to check it out. Technically speaking everything is ready for a merge, I just need to finish filling up the pull request; but I'd like to check kitty's codebase to see if I could implement the fix and discuss it with kovidgoyal, and if it can be resolved quickly I would wait before merging it with the master branch. After all it's not nice to have the manpage mentioning that a feature has a bug. |
Would appreciate kitty users to test that PR. |
@mark-dawn @toonn Thank you so much for your work on Ranger and this issue! I'm running the latest release of Ranger (1.9.1) on Kitty (0.12.0) on XWayland (1.20.1) on Sway (0.15.2) on Arch Linux. I also have python-pillow (5.2.0) installed. With both "set preview_images true" and "set preview_images_method kitty" in my rc.conf, nothing is displayed when previewing images (tested with PNGs). Kitty's icat works just fine, but Ranger's image previews don't. Am I doing something wrong? Do I need to set additional config options? |
@cosmojg, not doing anything wrong except this is gonna be in the next release. On arch you can already get it by installing ranger-git from the AUR, that installs the head of the master branch. We keep master in working condition but breakages do creep in occasionally (mostly when I push to master x )). |
@toonn Ahh, thanks a million for the prompt reply! Keep up the awesome work. :) |
@nicoulaj Did you set the image preview method to kitty? The issues you describe seems the same when w3m is used with kitty. You can set the preview type temporarily without changing your config using the command |
@mark-dawn indeed, it works perfectly now! |
Also @nicoulaj, you should append |
It's already this way, kitty sets it to |
Closing because the feature has been released. |
@toonn Which ranger version has this? I'm running ranger 1.9.2 and can't get image previews to work. I do have |
This was because I was using a very old |
I came back to my ranger config and I'm noticing something weird. Image previews stop working when I set preview method to kitty, but otherwise work fine! Preview doesn't work when I have this in config (tested on both Kitty & ranger): set preview_images true
set preview_images_method kitty But work fine, when I just keep it like: set preview_images true
# set preview_images_method kitty BTW, how is Konsole able to show image previews? |
Do you have PIL (pillow) installed for your python? That's a requirement for kitty previews. Konsole might work with w3m and would probably work with ueberzug. |
@toonn Yes, I do have pillow installed. Just ran |
I'm out of ideas. You're not running inside tmux, are you? The kitty image preview method only works if "kitty" is a substring of |
This was it. I was manually setting TERM to be Fixed it. Thanks. |
@toonn is there any way i can get kitty preview method, while still having my using P.S: I found that you've had similar problems with kitty as well 😆 |
@dufferzafar, the only working solution for now is I know this isn't ideal but the kitty image preview method needs to be restricted to kitty terminals otherwise you'd get a corrupted ranger and this is the only way to detect what terminal you're running in. If you find a better solution I'd love to know. |
ISSUE TYPE
EXPECTED BEHAVIOR
A picture is worth a thousand words, I've linked to one at the bottom of this post
CURRENT BEHAVIOR
Better image rendering within the terminal
CONTEXT
Better overall Terminal Experience
POSSIBLE SOLUTIONS
Modify the rc.conf setting to use icat
IMAGES / VIDEOS
You may also be interested in these links :
kovidgoyal/kitty#33
https://github.com/kovidgoyal/kitty/blob/master/graphics-protocol.asciidoc
The text was updated successfully, but these errors were encountered: