Desktop notifications protocol: Add support for querying if the terminal emulator supports the protocol

Fixes #7658
This commit is contained in:
Kovid Goyal
2024-07-23 20:16:25 +05:30
parent b97b16da58
commit e14894888c
5 changed files with 91 additions and 21 deletions

View File

@@ -108,6 +108,8 @@ Detailed list of changes
- Allow controlling the easing curves used for :opt:`visual_bell_duration`
- Desktop notifications protocol: Add support for querying if the terminal emulator supports the protocol (:iss:`7658`)
0.35.2 [2024-06-22]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -93,6 +93,38 @@ to display it based on what it does understand.
Similarly, features such as scheduled notifications could be added in future
revisions.
Querying for support
-------------------------
An application can query the terminal emulator for support of this protocol, by
sending the following escape code::
<OSC> 99 ; ? ; <terminator>
A conforming terminal must respond with an escape code of the form::
<OSC> 99 ; ? ; key=value : key=value <terminator>
Here, the ``key=value`` parts specify details about what the terminal
implementation supports. Currently, the following keys are defined:
======= ================================================================================
Key Value
======= ================================================================================
``a`` Comma separated list of actions from the ``a`` key that the terminal
implements. If no actions are supported, the a key must be absent form the
query response.
``o`` Comma separated list of occassions from the ``o`` key that the
terminal implements. If no occassions are supported, the value
``o=always`` must be sent in the query response.
======= ================================================================================
In the future, if this protocol expands, more keys might be added. Clients must
ignore keys they dont understand in the query response.
Specification of all keys used in the protocol
--------------------------------------------------
======= ==================== ========== =================
Key Value Default Description