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

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

Open
bbaserdem opened this issue Apr 19, 2023 · 1 comment
Open

Comments

@bbaserdem
Copy link

bbaserdem commented Apr 19, 2023

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
Copy link
Member

xaizek commented Apr 20, 2023

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.

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

No branches or pull requests

2 participants