desktop-notifier icon indicating copy to clipboard operation
desktop-notifier copied to clipboard

Allow setting custom notifications sounds

Open samschott opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. Currently, there is only support for turning notification sounds off (default) or on. When enabled, the platform's default sound for notifications will be used, if available. It would be nice to support custom sounds.

Describe the solution you'd like Ideally, we would allow specifying either:

  1. an identifier for a platform-provided sound
  2. the path to a sound file

Both options will require some abstraction over platform differences: macOS only provides two notification sounds, default and critical, and critical alerts require a special entitlement issued by Apple. Linux desktops typically allow using all platforms sounds from the sound-theme-spec. Both platforms allow specifying sound files but supported audio formats will be limited. In addition, macOS requires the sound file to be stored either in the app bundle or in the /Library/Sounds directory of the app's container directory (see the UNNotificationSound docs). It therefore appears that custom sound files are only support from bundled apps.

Describe alternatives you've considered Keep the sound option as is: default or nothing.

samschott avatar Feb 07 '21 18:02 samschott