mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 16:28:19 +02:00
Desktop notifications protocol: Add support for closing previous notifications
Feel free to comment if you have concerns. Not yet implemented in kitty. Fixes #7659
This commit is contained in:
@@ -110,6 +110,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- Desktop notifications protocol: Add support for querying if the terminal emulator supports the protocol (:iss:`7658`)
|
- Desktop notifications protocol: Add support for querying if the terminal emulator supports the protocol (:iss:`7658`)
|
||||||
|
|
||||||
|
- Desktop notifications protocol: Add support for closing previous notifications (:iss:`7659`)
|
||||||
|
|
||||||
0.35.2 [2024-06-22]
|
0.35.2 [2024-06-22]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,24 @@ to display it based on what it does understand.
|
|||||||
Similarly, features such as scheduled notifications could be added in future
|
Similarly, features such as scheduled notifications could be added in future
|
||||||
revisions.
|
revisions.
|
||||||
|
|
||||||
|
Closing an existing notification
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
.. versionadded:: 0.36.0
|
||||||
|
The ability to close a previous notification was added in kitty 0.36.0
|
||||||
|
|
||||||
|
To close a previous notification, send::
|
||||||
|
|
||||||
|
<OSC> i=<notification id> : p=close ; <terminator>
|
||||||
|
|
||||||
|
This will close a previous notification with the specified id. If closing
|
||||||
|
succeeds, the terminal will send an escape code of the form::
|
||||||
|
|
||||||
|
<OSC> i=<notification id> : p=close ; <terminator>
|
||||||
|
|
||||||
|
Closing is done on a best effort basis so applications must not rely on the
|
||||||
|
delivery of the closed escape code.
|
||||||
|
|
||||||
Querying for support
|
Querying for support
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
@@ -128,6 +146,10 @@ Key Value
|
|||||||
``u`` Comma separated list of urgency values that the terminal implements.
|
``u`` Comma separated list of urgency values that the terminal implements.
|
||||||
If urgency is not supported, the ``u`` key must be absent from the
|
If urgency is not supported, the ``u`` key must be absent from the
|
||||||
query response.
|
query response.
|
||||||
|
|
||||||
|
``p`` Comma spearated list of supported payload types (i.e. values of the
|
||||||
|
``p`` key that the terminal implements). These must contain at least
|
||||||
|
``title`` and ``body``.
|
||||||
======= ================================================================================
|
======= ================================================================================
|
||||||
|
|
||||||
In the future, if this protocol expands, more keys might be added. Clients must
|
In the future, if this protocol expands, more keys might be added. Clients must
|
||||||
@@ -156,8 +178,8 @@ Key Value Default Description
|
|||||||
direct responses to the correct window.
|
direct responses to the correct window.
|
||||||
|
|
||||||
``p`` One of ``title``, ``title`` Whether the payload is the notification title or body or query. If a
|
``p`` One of ``title``, ``title`` Whether the payload is the notification title or body or query. If a
|
||||||
``body`` or ``?`` notification has no title, the body will be used as title. Terminal
|
``body``, ``close`` notification has no title, the body will be used as title. Terminal
|
||||||
emulators should ignore payloads of unknown type to allow for future
|
, ``?`` emulators should ignore payloads of unknown type to allow for future
|
||||||
expansion of this protocol.
|
expansion of this protocol.
|
||||||
|
|
||||||
``o`` One of ``always``, ``always`` When to honor the notification request. ``unfocused`` means when the window
|
``o`` One of ``always``, ``always`` When to honor the notification request. ``unfocused`` means when the window
|
||||||
|
|||||||
Reference in New Issue
Block a user