Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Get list of notifications & clear/dismiss specific notifications #468

Open
NovaAndrom3da opened this issue Aug 20, 2024 · 1 comment

Comments

@NovaAndrom3da
Copy link

Is your feature request related to a problem? Please describe.
It would be useful to be able to access information and interact with current notifications from the command line/a third-party program, as well as assigning notifications unique IDs that could be dismissed manually.

Describe the solution you'd like
A command could be added that would return JSON output, perhaps something similar to this:

user@machine:~ $ swaync-client --get-notifications
[
    {
        "id": 0,
        "title": "Test notification",
        "body": "this notification is an example",
        "icon": "firefox",
        "urgency": 0,
        "visible": false,
        "inhibited": false,
        "actions": [
            "send another notification": "notify-send 'test!'"
        ]
    },
    {
        "id": 1,
        "title": "test!",
        "body": null,
        "icon": null,
        "urgency": 0,
        "visible": true,
        "inhibited": false,
        "actions": []
    }
]
user@machine:~ $ swaync-client --close 0  # This would dismiss the "Test notification"
user@machine:~ $

Describe alternatives you've considered
It could also be output as a human readable format, but I like this idea as it makes it easy to parse for third party programs.

@4rtemis-4rrow
Copy link

I second this

I have vim motions EVERYWHERE in my config, the only place it's missing is notifications

with this, I can set some keybindings to execute the commands, or perhaps write some scripts, you get the idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants