mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
osc: kitty notifications: implement focus|report
This patch adds support for window focusing, and sending events back
to the client application when a notification is closed.
* Refactor notification related configuration options:
- add desktop-notifications sub-section
- deprecate 'notify' in favor of 'desktop-notifications.command'
- deprecate 'notify-focus-inhibit' in favor of
'desktop-notifications.inhibit-when-focused'
* Refactor: rename 'struct kitty_notification' to 'struct
notification'
* Pass a 'struct notification' to notify_notify(), instead of many
arguments.
* notify_notify() now registers a reaper callback. When the notifier
process has terminated, the notification is considered closed, and we
either try to focus (activate) the window, or send an event to the
client application, depending on the notification setting.
* For the window activation, we need an XDG activation token. For now,
assume *everything* written on stdout is part of the token.
* Refactor: remove much of the warnings from OSC-99; we don't
typically log anything when an OSC/CSI has invalid values.
* Add icon support to OSC-99. This isn't part of the upstream
spec. Foot's implementation:
- uses the 'I' parameter
- the value is expected to be a symbolic icon name
- a quick check for absolute paths is done, and such icon requests
are ignored.
* Added ${icon} to the 'desktop-notifications.command' template. Uses
the icon specified in the notification, or ${app-id} if not set.
This commit is contained in:
parent
12152a8ae4
commit
5905ea0d84
11 changed files with 410 additions and 137 deletions
|
|
@ -799,7 +799,9 @@ struct terminal {
|
|||
void *cb_data;
|
||||
} shutdown;
|
||||
|
||||
tll(struct kitty_notification) kitty_notifications;
|
||||
/* Notifications that either haven't been sent yet, or have been
|
||||
sent but not yet dismissed */
|
||||
tll(struct notification) notifications;
|
||||
|
||||
char *foot_exe;
|
||||
char *cwd;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue