vifm/vifm

Using xdg-open command not working properly from vifm with vimiv.

bbaserdem opened this issue · 1 comments

I'm trying to set it so that image files are opened automatically with vimiv. I have the following line in my config;

" Images
filextype {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},
    \<image/*>
        \ {Open with xdg-default}
        \ xdg-open %c %i &,

When I navigate to any image file, and open it (by enter or by doing :file command and selecting xdg-open entry) I have an instance of vimiv launched, but from the home directory without the selected image.

When I launch it on the terminal using xdg-open Media/Pictures/Figures/rl/1dplume_fail_onlyEndRew.png; then I'm greeted with vimiv screen with the picture.

This issue only seems to be in using xdg-open with vifm; I tried all the following iterations of the command but it has not worked so far

xdg-open %c %i &,
xdg-open %c &,
xdg-open %c:p %i &,
xdg-open %c:p &,
xdg-open

and still have the same issue. I assume this is something easy that I'm missing rather than an issue with vifm; but would love some help regarding.

Here is the relevant xdg-mime and vifm commands; so I'm sure there is no problem regarding my mimetype settings.

$ xdg-mime query filetype Media/Pictures/Figures/rl/1dplume_fail_onlyEndRew.png
image/png
$ xdg-mime query default image/png
vimiv.desktop
$ vifm --version
Version: 0.12.1
Git info: built out of repository
Compiled at: Sep 27 2022 18:26:07

Support of extended keys is on
Parsing of .desktop files is enabled
Without GTK+ library
With magic library
Without X11 library
Without dynamic loading of X11 library
With file program
With -n option for cp and mv
With remote command execution
xaizek commented

I don't see any obvious issues. Does the same happen if you replace xdg-open with vimiv in :filextype command? Or if you do :!xdg-open %c? You might also want to check :!!which vimiv xdg-open in case there is some script with a matching name.