Closed alkeryn closed 3 years ago
Well your bugreport isn't really informative. Disregard that, I can't get the image preview working in rxvt and xterm with the suggestions in https://github.com/ranger/ranger/wiki/Image-Previews
To be honest the feature is really a hack in w3m.
Well i switched to urxvt in the end, sad since i love some of termite features but meh that's like it ^^
Would it be possible to implement something like urxvt pixbuf?
It would be great to get ranger image preview working in termite. I am loving termite but still have to use urxvt for ranger...
@mrneilypops sure, I have no idea what the limitation is however and it does not work for me in urxvt.
I use termite and ranger preview works just fine (even got video preview working)
I'm getting just "list index out of range" while browsing and with w3m
installed/image previews enabled. w3m
works fine when executed for image preview.
Hmm, nevermind, w3m is just opening an external imagemagick X gui no matter what I do, and if I open a web page it doesn't preview images in the terminal at all. Not sure how people get this working.
@teto can you please tell what you do to make it work? I'm on ArchLinux, and as I said above, it simply doesn't.
Bumping the question to @teto
I don't remember doing anything extraordinary, my ranger config is https://github.com/teto/home/blob/master/config/ranger/rc.conf, just set imagepreview. w3m needs to be in path with some access to fbcon. Maybe you need to check w3m version ? maybe there is some compilation time flag. You should try to see images with w3m first before trying with ranger. Note that the preview is not always perfect, sometimes some colors are off etc.
The default ranger file has this line which isn't in your rc.conf file:
set preview_image_method w3m.
I'm also using termite with ranger on sway with this issue.
I am using i3 4.15.0.1 with termite v13, ranger 1.9.1, and w3m 0.5.3, with the following in my rc.conf:
set preview_script ~/.config/ranger/scope.sh
set use_preview_script true
set preview_images_method w3m
The previews do not show on default, I have to use zi
.
The only problem I'm having is that some of the previews break my termite background color which I am assuming is related to the ranger/w3m transparency issue).
Hey! Exactly like @1094, it's working now for me too. It doesn't work inside TMUX. Also, I'm getting the same transparency issues.
Oh sorry didn't saw it followed well i use urxvt for ranger here is my rc.conf and my .Xressource rc.conf : https://pastebin.com/FZFXf6ge .Xressoource : https://pastebin.com/D21MxqhX And it look like it : Though being able to use termite only would be much appreciated
I am using termite and just set the image preview flag to true. The image is showing up when I select the image in the list.
For me the image preview is working, but when I move to another item (say a text file), the whole background becomes transparent, except the area with text (cf. screenshot below)
FYI, I am using a compositor (compton) and rgba background for termite
@mhham What are your termite and ranger config ? because it don't work like that for me
@Alkeryn
Here are my configs :
Welp i found out what was the issue it turns out it is due to bspwm because it does work in termite + i3 but not on termite + bspwm though it work on urxvt + bspwm so that's weird
I am using termite + i3, so I guess this is not really the issue.
@mhham Did you read my comment ?, i explicitly said the issue was bspwm ^^
@Alkeryn did u find any solution? that issue happens when i use termite + bspwm however urxvt it works well on bspwm, termite on another window manager works well too, it's odd...
look at that , urxvt vs termite on bspwm
is there any update on this? I am using termite + bspwm + vifm. The image preview works in urxvt but not termite. Has anyone gotten the preview to work with termite + bspwm?
@derrickcope I think the issue is with bspwm anyway i switched to st works well there
I'm using sway (wayland i3), urxvt works but termite doesn't with ranger image preview.
I use i3+termite and I got it to work by updating the original scope.sh file.
In general, I think the procedure should be: 1) make sure your w3m image preview work (eg with w3m xkcd.com) 2) make sure you have w3mimgdisplay enabled (https://github.com/ranger/ranger/wiki/Image-Previews#with-w3mimgdisplay) 3) if it still does not work, you might need to update scope.sh like me (~/.config/ranger/scope.sh), by manually deleting it first, and then run "ranger --copy-config=scope"
Hope it helps! Andrea
@andrea-82 ofc you won't have the issue you are running i3 the issue only apear when you use termite + bspwm or termite + sway idk the reason but that's a bug that apear only when both are combined
@patrick-motard No this dosen't fix anything, because the issue isn't with ranger, but with termite + bspwm combo you just didn't understood the issue please read before saying that you 'fixed' an issue
@Alkeryn I said explicitly in that commit that I now have previews working using w3m and other users configs found in this issue. At NO POINT did I say that I either understood this issue or had "fixed it" in any way. It's not even a fork. It's a completely different project that is tangentially related. The reference to this issue in MY commit in MY project was to provide breadcrumbs for myself and my projects users as to how I came to the change in that commit.
I'm experiencing this issue as well, only I'm using dwm as my window manager. Image previews work in urxvt but not when I use termite (or st).
I've tried using compton and xcompmgr and even tried it without a composite manager but I can't get it to work in termite. Has there been any update on this issue?
This issue may change behavior depending on compositor it seems, I changed from xcompmgr to compton and the behavior changed, now when changing between images, the background of the previous one isn't cleared, so a smaller image appears on top of the last, and this keeps stacking.
I enable the image preview using w3m but when I preview on an image which is larger than other, the section of the large image stay in the frame bugged until other photo gets on top of it resulting in this look.
Anyone having this issue?
I don't know where to go with this, is it considered a termite, bspwm, or w3m problem... I guess i would say termite, the program is named after a bug after all :joy: I guess i'll just switch to urxvt in the mean time.
@ShayBox Both It only happen when using termite + bspwm termite + i3 works urxvt + bspwm works termite + bspwm don't work
There must be a technical reason though, like bspwm doesn't do something that termite needs to do something that w3m needs, idk, not really my league here, still very strange that this requires 3 separate things to happen.
@ShayBox Yeah what i'd think but the weird thing is that w3m does work on urxvt on bspwm
Hi guys, i think you might be interested about a fix i found i just stoped using w3mimage and i now use ueberzug and it works even better than w3m here is an example And it can even do full preview and supports resizing :
Hey @Alkeryn could you please share your rc.conf please? I can't manager to use ueberzug with ranger. Thanks.
@lvictorino It isn't in the stable / release ranger version yet, you need to use ranger-git but here are my dotfiles : https://github.com/Alkeryn/dotfiles/tree/master/.config/ranger
Don't use w3m's image view, use ueberzug instead. It works flawlessly with ranger and Termite. All you have to do is install a recent version of ranger (so it supports ueberzug - You can check the rc.conf of ranger - if it supports ueberzug - it will be listed in there as one of the supported image preview methods) and ueberzug. Then in rc.conf enable image previews and change the image preview method from w3m to ueberzug. w3mimgdisplay has issues of its own so it may not even be Termite's fault.
P.S. I suggest we close this issue and add an entry in the wiki on here for image previews in Termite with ranger and ueberzug?
@ifohancroft I already mentioned ueberzug like 3 comments over ^
@Alkeryn Sorry. I must have missed it.
I was using the newest ranger ranger-1.9.2-1
and ueberzug
wasn't listed as supported. Neither did it work if set in the config.
To fix that on Arch Linux:
In order to use ueberzug
you need to install the unreleased ranger version from the master branch. Switch to the package ranger-git
to use it. You should then be able to change your config to include set preview_images_method ueberzug
and install python-ueberzug
to make it work.
@boreq many thanks!!! this finally fixes the long standing issue I had with w3m when browsing images and the previously larger browsed image never properly cleared up for displaying the next that simply looked like put on top of the previous.
Even after switching to ueberzug, I'm experiencing this issue. I'm using Sway. urxvt + w3m -> works urxvt + ueberzug -> works termite + w3m -> no preview termite + ueberzug -> no preview
Versions ranger - master (pulled from git today) python - 3.7.3 ueberzug - 18.1.3 termite - v15
@Mishio595 ueberzug can't work in wayland w3m can't work in termite most of the time At that point you should open an issue for wayland support on ueberzug
Well, I figured I would try it seeing as termite is the emulator sway recommends and this thread relates to my issue. Disappointing that the only thing close to a solution or workaround anyone has suggested only works under X11.
Edit: The ueberzug creator already turned down Wayland support https://github.com/seebye/ueberzug/issues/30
@Mishio595 Did you every find a solution? I am also on Sway and urxvt+w3m works but I use Termite which doesn't work with w3m or ueberzug.
That's about it here is an expample screenshot I don't have this issue on urxvt but i prefer termite please fix this :/ also the termite-ranger-fix from AUR didn't solved the issue