doronbehar / pistol

General purpose file previewer designed for Ranger, Lf to make scope.sh redundant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image preview does not work with TUI file managers.

keystroke3 opened this issue · comments

commented

I am using Pistol to preview files in Lf but for some reason, it does not work with images, it only shows a blank preview window. In Ranger I use the default previewer script with previewer_image_method set to kitty. That works fine but when I switch to Pistol, the preview brakes. I am trying to add image previews to Lf like they are in Ranger, but it does not work. Calling Pistol from terminal with an image argument causes it to display the image without issues. In the pistol.conf file, I have set image/* kitty +kitten icat %s. It however, does not work in Lf or Ranger. I am using Kitty terminal. I have tried this on Alacritty, ST-manjaro and xfce4-terminal. Same results.

Hi, I won't have time to drill into this in any time soon, but just so that I'll be able to do it right away when the time comes, you wrote:

I have set image/* kitty +kitten icat %s

Just to make sure, you are not using Pistol 0.1 or 0.1.1 I assume? Because the syntax has changed, see the big banner at the README. I'm not saying it should work once you'll switch to the new version and the new syntax, I'm just saying that in general you should update.

Maybe it will work and this is the issue, IDK.

commented

I just made the correction. It still does not work. Please look into it when you get the time.

@keystroke3 I don't know if you were using the FISH shell, but there's actually been a known incompatibility between FISH and Ranger, affecting image previews:

ranger/ranger#1919

commented

I use zsh.

Same here
The only way to get it sorta working is using viu with the -b option (force block output) but the output is far from ideal
If i use kitty's icat lf stops working

All work fine outside lf

Closing in favor of #2.