mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
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.
This commit is contained in:
parent
b1c03861cd
commit
729f7466ae
6 changed files with 27 additions and 8 deletions
2
notify.c
2
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue