I want to make ranger open GIFs in mpv instead of in feh.

I added the line image/gif=mpv.desktop; in ~/.config/mimeapps.list (under [Default Applications]), updated the database with update-mime-database ~/.local/share/mime/. Now xdg-mime query default image/gif outputs mpv.desktop.

I tried opening .gif file in PCManFM and it opens up in mpv, but ranger still opens .gif files in feh.

Does someone know how to fix this?


Ranger holds it's file associations in ~/.config/ranger/rifle.conf, so adding filetype gif and associating it with mpv should do the job.

Just add this line to ~/.config/ranger/rifle.conf:
^mime image/gif, has mpv, X, flag f = mpv -- "$@".

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.