1
0
mirror of https://gittea.dev/nova/th.git synced 2026-01-30 16:50:10 -05:00

better string handling

This commit is contained in:
nova
2025-12-12 20:28:39 +01:00
parent 217884d920
commit 393864c80f
4 changed files with 65 additions and 40 deletions

View File

@@ -2,6 +2,8 @@
#define SETTINGS_UEBERZUG_IMAGE_PREVIEW 1 /* 0 is disabled, 1 is enabled, 2 is with caching; depends on ueberzug */
#define SETTINGS_RELOAD_DIR_DELTA 10 /* 0 is disabled, time in seconds between automatic refresh of dir contents */
#define SETTINGS_CURSES_TIMEOUT 100 /* read: inopts(3NCURSES), blocking time between user inputs */
#define SETTINGS_COMMAND_REPLACE_STR "%" /* if a command in any cmd inside this fle contains this string, it will be replaced with the hovered/selected file name
* as of right now, this character cannot be escaped; i.e ``command\% --arg`` will parse into ``command\path_of_hovered_file --arg``*/
/* {{{ */
#ifndef CONFIG_GUARD
@@ -21,8 +23,8 @@ static const mimetype mimetype_default_cmd[] = {
* we need to define "gif" before "image" */
{ "text", "$EDITOR" },
{ "gif", "mpv --loop-file=\"inf\"" },
{ "image", "feh" },
{ "video", "mpv" },
{ "image", "feh % &" },
{ "video", "mpv % &" },
{ "audio", "mpv" },
{ "pdf", "zathura" },
};
@@ -31,8 +33,8 @@ static const extension file_extension_default_cmd[] = {
* similar to mimetype_default_cmd, however it searches for exact string matches
* and is checked before mimetype_default_cmd */
{ ".exe", "wine"},
{ ".cbz", "mcomix"},
{ ".cbr", "mcomix"},
{ ".cbz", "mcomix % &"},
{ ".cbr", "mcomix % &"},
{ ".json", "$EDITOR"},
{ ".csv", "$EDITOR"},
};