Also respond about urgency support in the query response
This commit is contained in:
parent
36a3b33b02
commit
3cf6db445b
3 changed files with 8 additions and 3 deletions
|
|
@ -115,12 +115,16 @@ 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
|
||||
implements. If no actions are supported, the ``a`` key must be absent from 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.
|
||||
|
||||
``u`` Comma separated list of urgency values that the terminal implements.
|
||||
If urgency is not supported, the ``u`` key must be absent from the
|
||||
query response.
|
||||
======= ================================================================================
|
||||
|
||||
In the future, if this protocol expands, more keys might be added. Clients must
|
||||
|
|
|
|||
|
|
@ -143,7 +143,8 @@ def parse_osc_99(raw: str) -> NotificationCommand:
|
|||
if metadata == '?':
|
||||
actions = ','.join(x.name for x in Action)
|
||||
when = ','.join(x.name for x in OnlyWhen if x.value)
|
||||
raise QueryResponse(f'99;?;a={actions}:o={when}')
|
||||
urgency = ','.join(str(x.value) for x in Urgency)
|
||||
raise QueryResponse(f'99;?;a={actions}:o={when}:u={urgency}')
|
||||
payload_is_encoded = False
|
||||
payload_type = 'title'
|
||||
if metadata:
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ def activated(identifier, window_id, focus, report):
|
|||
reset()
|
||||
h('?')
|
||||
self.assertFalse(notifications)
|
||||
self.ae(query_responses, ['99;?;a=focus,report:o=always,unfocused,invisible'])
|
||||
self.ae(query_responses, ['99;?;a=focus,report:o=always,unfocused,invisible:u=0,1,2'])
|
||||
|
||||
def test_dcs_codes(self):
|
||||
s = self.create_screen()
|
||||
|
|
|
|||
Loading…
Reference in a new issue