Skip to content

[Feature] Add swaync-client --list-notifications #675

@unikitty37

Description

@unikitty37

Please read through the README and the Man pages before submitting
Please also make sure that there isn't any prior issue describing this feature

Is your feature request related to a problem? Please describe.
When I receive a notification that I need to write a rule for (example: satty sends its notifications as normal urgency rather than low) I cannot easily get the app-name or other notification details to match against.

Describe the solution you'd like
With the notification still on the screen or in the control centre, I'd like to type swaync-client --list-notifications and get all the information I need about the notification that is already on my screen.

Describe alternatives you've considered
The only way to work around this at the moment seems to be:

  1. Quit swaync
  2. Run G_MESSAGES_DEBUG=all swaync
  3. Try to get the program that generated the notification to do it again (and this is not always easy!)
  4. Get the information I need and save it somewhere
  5. Get swaync back running in the background again — since niri spawns this at login, that means logging out and back in again unless I want to leave nohup.out files lying around the place or dedicate a terminal window to swaync.
  6. Finally write the rule

An alternative would be for swaync, if run with G_MESSAGES_DEBUG=all and there is already a swaync instance running, to run and show the debug output without trying to do anything else — the running instance would handle showing the notifications, and the debugging instance would just show messages. Even then, though, I would still need to be able to reliably retrigger the notification, so this isn't an ideal solution compared to having swaync-client just output the data that swaync presumably still has in memory somewhere.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions