Skip to content

Add a "don't notify when the os-window is focused and the tab is active" option to the desktop notification protocol  #6755

Closed
@jinliu

Description

@jinliu

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:

  1. b=os-window: ignore this request when the os-window is focused
  2. b=tab: ignore this request when the os-window is focused, and the tab is active
  3. b=window: ignore this request when the os-window is focused, the tab is active, and the window is active

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions