aboutsummaryrefslogtreecommitdiff
path: root/notify.c
diff options
context:
space:
mode:
authorMitja Horvat <pinkfluid@gmail.com>2021-10-05 21:07:01 +0000
committerMitja Horvat <pinkfluid@gmail.com>2021-10-06 21:33:17 +0000
commit729f7466ae6ed7a4bd51b27999ddc50c43a27d89 (patch)
tree4b0a2d52f3f499e63b141613456d514f1af9398b /notify.c
parentpgo: verify source dir really is a foot source dir before proceeding (diff)
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.
Diffstat (limited to 'notify.c')
-rw-r--r--notify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/notify.c b/notify.c
index a90cd317..13cee895 100644
--- a/notify.c
+++ b/notify.c
@@ -19,7 +19,7 @@ notify_notify(const struct terminal *term, const char *title, const char *body)
{
LOG_DBG("notify: title=\"%s\", msg=\"%s\"", title, body);
- if (term->kbd_focus) {
+ if (term->conf->notify_focus_inhibit && term->kbd_focus) {
/* No notifications while we’re focused */
return;
}