esiqveland / notify

notify is a go dbus implementation for delivering desktop notifications over dbus
BSD 3-Clause "New" or "Revised" License
70 stars 14 forks source link

Default Action #24

Closed lordofscripts closed 5 months ago

lordofscripts commented 6 months ago

When you set more than one Action in a Notification you can (and should!) mark one as the default action. Currently your package doesn't handle that use case, yet it is very easy to do (just found out!).

See How to set default action

So basically, the action name should be default but the label can be anything.

esiqveland commented 6 months ago

Shouldn't that be same as a Action{Key: "default", Label: "My default action"} ?

lordofscripts commented 5 months ago

Yes, but the documentation doesn't mention it anywhere. I spent quite a lot of time browsing DBus & Dunst code. I added it in my wrapper, as all that time would have been better spent.

esiqveland commented 5 months ago

Is this part of the Freedesktop specification? I could perhaps provide a way to make it more obvious.

esiqveland commented 5 months ago

Yes, i found it and pushed a helper in https://github.com/esiqveland/notify/commit/6f7ebc583bbc475fc073ff036872a81db8ea3077