notify: close notification by sending SIGINT to helper

If the user hasn't configured a custom 'desktop-notifications.close'
command, try to close the notification by sending SIGINT to the
notification helper.

This is best-effort:

* If there's no helper running, we do nothing (except warn)
* We don't verify, in any way, the notification is actually closed
* We don't send any other signals, under any circumstances. That is,
  no SIGTERM, no SIGKILL. Ever.
This commit is contained in:
Daniel Eklöf 2024-07-26 16:23:17 +02:00
parent 8f16fe54d3
commit 9cf99ea4bf
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 66 additions and 30 deletions

View file

@ -39,6 +39,7 @@ struct notification {
enum notify_when when;
enum notify_urgency urgency;
bool focus;
bool may_be_programatically_closed;
bool report_activated;
bool report_closed;