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. --- terminal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index 2738291d..0f5b4b62 100644 --- a/terminal.c +++ b/terminal.c @@ -3081,11 +3081,11 @@ term_bell(struct terminal *term) term_damage_margins(term); } } - - if (term->conf->bell.notify) - notify_notify(term, "Bell", "Bell in terminal"); } + if (term->conf->bell.notify) + notify_notify(term, "Bell", "Bell in terminal"); + if ((term->conf->bell.command.argv.args != NULL) && (!term->kbd_focus || term->conf->bell.command_focused)) { -- cgit v1.3