notifications
notifications copied to clipboard
Add support for sound-name and suppress-sound hints
The notification specification defines some additional hints for sounds.
- sound-file
- sound-name
- suppress-sound
This PR adds support for sound-name and suppress-sound. Supporting sound-file may be a bit more involved since Canberra doesn't seem to natively support files.
Testing sound-name (and category to verify no breakage) can be done with notify-send
:
# category
notify-send --category=email test test
notify-send --category=im.received test test
# sound-name
notify-send --hint=string:sound-name:message-new-instant test test
notify-send --hint=string:sound-name:service-login test test
Testing suppress-sound is trickier since notify-send doesn't support boolean hints.
gdbus call --session \
--dest org.freedesktop.Notifications \
--object-path /org/freedesktop/Notifications \
--method org.freedesktop.Notifications.Notify \
"test" "42" "dialog-information" "test" "test" \
'[]' '{"suppress-sound":<true>}' "5000"