Description
Is your feature request related to a problem? Please describe.
A fish shell plugin (https://github.com/franciscolourenco/done) uses Kitty's desktop notification protocol to notify the user when a long-running command finishes. It should only send a notification when the terminal is in background (not focused). Under X11, it uses xprops to detect the window state. But under Wayland there's no such protocol, so currently it uses kitty @ ls
to query the state, which requires the user to setup remote control in Kitty.
I think 'only send notification when in background' is common enough, that the desktop notification protocol could have an option for that.
Describe the solution you'd like
Add an option to the protocol. E.g., with "b=1" in metadata, a notification request is ignored when the current os-window is focused, and the current tab is active.
Or add 3 options:
- b=os-window: ignore this request when the os-window is focused
- b=tab: ignore this request when the os-window is focused, and the tab is active
- b=window: ignore this request when the os-window is focused, the tab is active, and the window is active