dunst-project / dunst

Lightweight and customizable notification daemon
https://dunst-project.org
Other
4.61k stars 342 forks source link

Idea: dunstify should support the option -r for ID as string instead integer #1098

Closed Zesko closed 6 months ago

Zesko commented 2 years ago

Issue description

It is not about the issue, but a new feature:

Currently ID is only integer, but it is hard for human to remember to avoid conflict of many IDs of dunstify when he creates many different systemd services, each service has an ID of dunstify and each ID must be different.

For example: A service1 starts and a notification ID as String:

$ dunstify -u "critical" "Service1 is running" -r "Service1"

This notification will be closed when the service is done.

$ dunstify -C "Service1"

Idea: the ID "Service1" would be converted to hash like ID

bynect commented 6 months ago

Unfortunately the Desktop Notifications Specification specifies that ids are integers (https://specifications.freedesktop.org/notification-spec/latest/ar01s09.html).

Also, you should not use -r ID for new notifications but only to replace old notifications. Using -r ID when ID is not already existing is wrong according to the spec (see #1317)