diff options
author | Daniel Santos <dacs.git@brilhante.top> | 2023-03-24 14:56:35 +0000 |
---|---|---|
committer | Daniel Santos <dan.git@brilhante.top> | 2023-07-01 10:08:20 +0100 |
commit | 35351387a197e55f5389545efe3941b58ca94ffd (patch) | |
tree | 87bba0f195ad83c9f895f91f1119cd099b954c71 /src/config | |
parent | c402f8d9d2b3f94bbc20ba9c0c43f6df3b7ca885 (diff) | |
download | profani-tty-35351387a197e55f5389545efe3941b58ca94ffd.tar.gz |
/executable async on|off
* rename call_external() to call_external_async(). * add call_external_fork(). This function makes all executable calls to be forked and synchronous. So that running profanity inside a TTY, we can set all executables to be TTY programs (fbi, mpv, w3m, emacs eww, etc.), making possible to open urls or see images inside the TTY. * add '/executable async' command. * make call_external() use either call_external_async() or call_external_fork(), according to the '/executable async' configuration. Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/preferences.c | 4 | ||||
-rw-r--r-- | src/config/preferences.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c index 3293d025..385cf592 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -1836,6 +1836,7 @@ _get_group(preference_t pref) case PREF_URL_OPEN_CMD: case PREF_URL_SAVE_CMD: case PREF_VCARD_PHOTO_CMD: + case PREF_EXECUTABLE_ASYNC: return PREF_GROUP_EXECUTABLES; case PREF_AUTOAWAY_CHECK: case PREF_AUTOAWAY_MODE: @@ -2140,6 +2141,8 @@ _get_key(preference_t pref) return "url.open.cmd"; case PREF_URL_SAVE_CMD: return "url.save.cmd"; + case PREF_EXECUTABLE_ASYNC: + return "run.async"; case PREF_COMPOSE_EDITOR: return "compose.editor"; case PREF_SILENCE_NON_ROSTER: @@ -2214,6 +2217,7 @@ _get_default_boolean(preference_t pref) case PREF_MOOD: case PREF_STROPHE_SM_ENABLED: case PREF_STROPHE_SM_RESEND: + case PREF_EXECUTABLE_ASYNC: return TRUE; default: return FALSE; diff --git a/src/config/preferences.h b/src/config/preferences.h index 531b8f94..3e386960 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -186,6 +186,7 @@ typedef enum { PREF_STROPHE_SM_ENABLED, PREF_STROPHE_SM_RESEND, PREF_VCARD_PHOTO_CMD, + PREF_EXECUTABLE_ASYNC, PREF_STATUSBAR_TABMODE, } preference_t; |