From 1a68fee59c57d661b147e976b4fe827cb5eb871d Mon Sep 17 00:00:00 2001 From: nova Date: Mon, 23 Jun 2025 23:03:54 +0200 Subject: [PATCH] added more default commands --- config.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/config.h b/config.h index d599db5..449ce96 100644 --- a/config.h +++ b/config.h @@ -2,10 +2,18 @@ #include "interactions.h" static mimetype mimetype_default_cmd[] = { - /* mimetype shell command */ - { "text", "$EDITOR" }, - { "image", "feh" }, - { "video", "mpv" } + /* mimetype shell command + * ^ substring of "file --mime-type -b ./hovered" + * this does mean that this list is checked for completely linear. + * Example: + * file --mime-type -b ./image.gif + * gives us "image/gif", thusly if we want to open gif in mpv rather than feh, + * we need to define "gif" before "image" */ + { "text", "$EDITOR" }, + { "gif", "mpv --loop-file=\"inf\"" }, + { "image", "feh" }, + { "video", "mpv" }, + { "audio", "mpv" } }; static binding key_binding[] = {