From 729f7466ae6ed7a4bd51b27999ddc50c43a27d89 Mon Sep 17 00:00:00 2001 From: Mitja Horvat Date: Tue, 5 Oct 2021 23:07:01 +0200 Subject: notify: add the notify-focus-inhibit config option foot doesn't show desktop notifications (via OSC777) if the current terminal has keyboard focus. This is probably a sane default, but there are use cases where showing a notification regardless of the focus status may be desired. For example, a completion notification of a long running task inside a non-focused tmux window. This PR adds the notify-focus-inhibit option which can be used to disable inhibition of notifications when the window has focus. The default value is `yes`, which retains the old behavior. --- config.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index e3b79e3e..3448cab6 100644 --- a/config.c +++ b/config.c @@ -1012,6 +1012,10 @@ parse_section_main(const char *key, const char *value, struct config *conf, } } + else if (strcmp(key, "notify-focus-inhibit") == 0) { + conf->notify_focus_inhibit = str_to_bool(value); + } + else if (strcmp(key, "url-launch") == 0) { deprecated_url_option( conf, "url-launch", "launch", path, lineno); @@ -2956,6 +2960,7 @@ config_load(struct config *conf, const char *conf_path, .notify = { .argv = {.args = NULL}, }, + .notify_focus_inhibit = true, .tweak = { .fcft_filter = FCFT_SCALING_FILTER_LANCZOS3, -- cgit v1.3