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

Implement makoctl count script command with variants #526

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fidelicura
Copy link

@fidelicura fidelicura commented Jul 22, 2024

This PR adds new command to makoctl as makoctl count. It allows a user to get number of notifications that are currently in history or in a waiting state. It may be useful for software producing a lot of notifications (e.g. single-point DBs) or any other use case where notifications are used as counter for something. The result looks like this:

{
        "type" : "u",
        "data" : [
             5
        ]
}

...where 5 is the number of notifications in the history or on the screen (waiting) at the moment.

See also original idea from 2017 in dunst. It is the same sub-command that was initially named status, and now named count: issue, commit.

@emersion
Copy link
Owner

Do we really need to add a new D-Bus method here? Couldn't we use the same as makoctl list and use jq to count the number of entries?

@fidelicura
Copy link
Author

Do we really need to add a new D-Bus method here? Couldn't we use the same as makoctl list and use jq to count the number of entries?

Now I don't think we need a new D-Bus method, so no. I did it as a script command in the latest force-push, but I think it is not that necessary anymore if the user can just use jq for this purpose. I won't be upset if you just close this PR.

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

Successfully merging this pull request may close these issues.

2 participants