Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by

Hi there,

say I have 100 pictures 1.jpg 2.jpg ... 100.jpg

To see the first one, I move on it in VIFM and press ENTER

It opens the picture in Xviewer, then I can go to the next picture with arrow right.... until 10.jpg

After exiting Xviewer the VIFM cursor stays on 1.jpg

Is there a way to synchronize VIFM cursor with Xviewer after leaving it ?

Thanks

1 Answer

0 votes
by

Hi,

This Xviewer? I don't see it's documentation, but this list of options doesn't look promising. It apparently supports plugins, so maybe that interface could be used (by way of writing a plugin).

In general for this to work you need to somehow communicate cursor position back to Vifm. A viewer needs to expose this information and then it should be sent/returned to Vifm.

by

Can I read this information - the path of the JPG - from a log File ? If yes, maybe I can extract it from there and sent it to Vifm.

by

I don't think that application has a log file. If it does, then it could work (could wait for it to exit in Lua and then move the cursor).

by

@xaizek you're right - there is no log file with this viewer. May I ask which application do you recommand - if you use one

by

I'm using sxiv which doesn't print current file name either, but its fork nsxiv seems to do this on Q (see https://github.com/nsxiv/nsxiv/blob/master/etc/nsxiv.1).

by

@xaizek, are you aware of any Wayland-native image viewer where such functionality can be achieved more or less out of the box?

The idea sounds interesting, similar to the workflow of editing LaTeX and having PDF viewer (e.g. Zathura) sync'd to it.

by

@xaizek, are you aware of any Wayland-native image viewer where such functionality can be achieved more or less out of the box?

Looking at the list (likely outdated), there is vimiv-qt which I think counts as Wayland-native because of Qt. It doesn't seem to have this specific functionality, but maybe a plugin could be written to do it. pim is GTK (which apparently can work on Wayland) and can print marked files on exit, xzgv is also GTK and seems to do the same. Not sure about imv.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...