added file extension commands

This commit is contained in:
nova
2025-07-18 23:01:49 +02:00
parent d9ae5c79af
commit 6daeaebb5a
3 changed files with 39 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
#include "interactions.h"
#include "sorting.h"
static const mimetype mimetype_default_cmd[] = {
/* mimetype shell command
* ^ substring of "file --mime-type -b ./hovered"
@@ -16,7 +17,12 @@ static const mimetype mimetype_default_cmd[] = {
{ "video", "mpv" },
{ "audio", "mpv" }
};
static const extension file_extension_default_cmd[] = {
/* extension shell command
* similar to mimetype_default_cmd, however it searches for exact string matches
* and is checked before mimetype_default_cmd */
{ ".exe", "wine"},
};
static const binding key_binding[] = {
/*key action blackmagic comment*/
/*you cannot add bindings that include other bindings in its entirety
@@ -72,3 +78,4 @@ static const binding key_binding[] = {
};
static const unsigned long binding_count = sizeof(key_binding) / sizeof(binding);
static const unsigned long mimetype_default_count = sizeof(mimetype_default_cmd) / sizeof(mimetype);
static const unsigned long file_extension_default_count = sizeof(file_extension_default_cmd) / sizeof(extension);