Skip to content
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

Image previews stopped working in a recent update #70

Open
musjj opened this issue Aug 15, 2023 · 2 comments
Open

Image previews stopped working in a recent update #70

musjj opened this issue Aug 15, 2023 · 2 comments

Comments

@musjj
Copy link

musjj commented Aug 15, 2023

In a recent NixOS update, for some reason image previews stopped working. I'm using kitty 0.29.2

This is my config:

set previewer /nix/store/m7xbhvr4qcvl7na07644rqb5j2vsrj4l-ctpv-1.1/bin/ctpv
set cleaner /nix/store/m7xbhvr4qcvl7na07644rqb5j2vsrj4l-ctpv-1.1/bin/ctpvclear
cmd on-quit %/nix/store/m7xbhvr4qcvl7na07644rqb5j2vsrj4l-ctpv-1.1/bin/ctpv -e $id
&/nix/store/m7xbhvr4qcvl7na07644rqb5j2vsrj4l-ctpv-1.1/bin/ctpv -s $id

Running ctpv image.jpg by itself properly renders the image into the terminal.

Strangely, if I remove the final ctpv -s $id line from my config, previews in lf now works. What is this command for? It seems that it acts as a server, but preview works anyways without it.

EDIT: Hmm, it seems that the server is only needed for ueberzug, which I don't use (#12 (comment)). So I guess I can just safely remove that line. Still don't know why it stopped working though.

@NikitaIvanovV
Copy link
Owner

Yes, currently ctpv -s $id is only needed for ueberzug. My guess is that ctpv thought ueberzug was available on your system but it did not work for some reason, resulting in no preview being shown. Do you have ueberzug installed? If yes, does bringing back the deleted line and adding set forcekitty to your ctpv config fix the issue?

@te-lang-wakker
Copy link

This is the config that works for me on NixOS with Kitty:

set previewer ctpv -s $id
set cleaner ctpvclear
cmd on-quit ctpv -e $id

These are my relevant installed packages:

lf
ctpv
file
poppler_utils
atool
ffmpeg
colordiff
fontforge
elinks
jq
libreoffice
imagemagick
ffmpegthumbnailer
mdcat

Do note that you need file for any of these to work at all. At least, I did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants