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

Not work in vifm #9

Closed
dongdongbh opened this issue Feb 20, 2023 · 17 comments
Closed

Not work in vifm #9

dongdongbh opened this issue Feb 20, 2023 · 17 comments

Comments

@dongdongbh
Copy link

dongdongbh commented Feb 20, 2023

I following vifmimg setup ueberzug for vifm. remove -p json in https://github.com/thimc/vifmimg/blob/6e4c562c302405c27f0de7c5c1a335ce1a5765e2/vifmrun#L16
since -p json is not supported.

when I open a pdf file, their is a thumbnail picture created in cache directory, which proof the other part works fine, but it the image do not shows up in vifm, and the vifm stucked. When I open a image, their also no image shows up, and the vifm also stucked.

Test environment

system: ubuntu server 20.04
terminal: alacritty
vifm: v0.12.1

@jstkdng
Copy link
Owner

jstkdng commented Feb 20, 2023

hey, just checked out that project and it is using some syntax seebye introduced before it died.

Change this file

https://github.com/thimc/vifmimg/blob/master/vifmimg#L9

and replace width and height with max_width and max_height.

@dongdongbh
Copy link
Author

Just changed to max_width and max_height, but it still do not show image and stuck the program

@jstkdng
Copy link
Owner

jstkdng commented Feb 20, 2023

weird indeed, I'd recommend opening an issue in the vifmimg repository.

@dongdongbh
Copy link
Author

I posted an issue in vifm, they said maybe it related to ueberzugpp command~

@jstkdng
Copy link
Owner

jstkdng commented Feb 23, 2023

open an issue in the vifmimg repository, not vifm, vifm on its own has nothing to do with this project as far as I know.

@dongdongbh
Copy link
Author

I open an issue in vifmimg. I temporarily changed to ranger, and it works fine with ueberzuggpp, thanks for your great work!

@xaizek
Copy link
Contributor

xaizek commented Feb 23, 2023

As I've said, it's ueberzugpp fault. It just isn't that compatible with ueberzug. In addition to not accepting height, width and layer -p, it also requres max_height, max_width, x and y to be numbers, while vifmimg passes them as strings. And invalid input causes exception and aborting, thus leaving pipe without a reader once again.

@jstkdng
Copy link
Owner

jstkdng commented Feb 23, 2023

yeah, a PR should be made to pass regular numbers instead of strings. Adding more validations will slow down this program. If the owner of vifmimg doesn't respond I'll add them.

@xaizek
Copy link
Contributor

xaizek commented Feb 24, 2023

I thought you'd want to change ueberzugpp to work without doing any changes to vifmimg, otherwise This is a drop-in replacement for the now defunct ueberzug project. in the README doesn't hold and should be removed to not mislead users (also the binary should be renamed).

@jstkdng
Copy link
Owner

jstkdng commented Feb 24, 2023

It is still the intention to be a drop-in replacement, I just didn't know how many other programs use the syntax that was introduced before, I was basing all my testing on ranger after all.

@jstkdng
Copy link
Owner

jstkdng commented Feb 25, 2023

@dongdongbh I've made some changes for vifm but it's still not working. Could you test the latest release? perhaps my vifm config is wrong

@dongdongbh
Copy link
Author

I will test it next week and give feedback then

@xaizek
Copy link
Contributor

xaizek commented Feb 25, 2023

perhaps my vifm config is wrong

Either that, vifmimg isn't in the $PATH or you haven't started Vifm using vifmrun. On my side v2.2.1 works just fine with vifmimg. Kudos for enhancing compatibility and making it not quit on errors! I couldn't make it fail and abandon the pipe by supplying invalid input.

I've also tried to use it in Vifm via a Lua plugin. It was a nice surprise that WMs without EWMH are supported, don't know if original ueberzug was able to do this too at some point, it didn't last time I tried.

@dongdongbh
Copy link
Author

It works fine in my vifm with the last version, and yes, you should use vifmrun to make it work according 'vifmimg' docs.

PS: I also tested it on w3m, it not work in w3m.

@jstkdng
Copy link
Owner

jstkdng commented Feb 27, 2023

seems it doesn't even work with OG ueberzug. https://bbs.archlinux.org/viewtopic.php?id=269270

@dongdongbh
Copy link
Author

I didn't test the OG ueberzug, just saw people talking about it may use in w3m.

In addition, it not work inside ssh, does this is the expected result?

@jstkdng
Copy link
Owner

jstkdng commented Feb 27, 2023

X11 forwarding would be required for that, and even then it might need some validation.
I'd say to open a new issue if you want to get help so that other people can get the information easily.

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