Option to override Do Not Disturb#141
Conversation
Android and iOS support allowing apps to bypass DND. This is a useful feature because a user may want to mute notifications but only allow a certain app (such as email or an important messenger) to display notifications.
|
initial testing, i am unable to get any overrides working. when do not disturb is enabled, no notifications go through at all. set dnd true -> set dnd overrides to SomeApp -> restart cosmic-notifications -> all notifications are blocked regardless of overrides attempted reboot, attempted to enable then disable dnd...all notifications are blocked and cannot determine if this works or not as is |
|
The ["SomeApp1", "SomeApp2", "SomeApp3"]And then to test with notify-send -a SomeApp1 Test
notify-send -a SomeApp2 Test
notify-send -a SomeApp3 TestAnd to test that other apps don't trigger notifications: notify-send -a SomeApp4 Test^The above steps work for me. It's important that the IDs match exactly. Also, |
|
It may not be necessary. I think critical alerts are supposed to be allowed regardless of the DnD setting. |
|
Though I suppose Android makes notifications configurable per app. |
|
Yep! Urgent notifications can bypass DND, but this covers the case where a user needs notifications muted except for notifications from important apps (e.g. work or school apps). |
garrettjwilke
left a comment
There was a problem hiding this comment.
i originally did not set the do_not_disturb_overrides correctly...after editing with the correct format, it works as intended.
|
A better way to deal with the issue is to have per app notifications. Which is a larger question of if it could be easily implemented. |
|
@maria-komarova So, I think I can easily switch this to per app notifications. Would that be preferred instead? I was thinking something like three options that can be set per app:
All apps default to "enabled" which is the current behavior. Users can allow apps to bypass DND (always enabled) or mute apps so they never display notifications (disabled). |
|
I need time to consider the design and I need to get a few other things out of the way so I'll get back to you on that. |
Android and iOS support allowing apps to bypass DND. This is a useful feature because a user may want to mute notifications but only allow a certain app (such as email or an important messenger) to display notifications.
A good use case for this is school or work. A user can toggle DND but allow notifications from Slack or an email app. To test, you can try enabling DND then adding an app to the config file
do_not_disturb_overridesor you can usenotify-send.In
~/.config/cosmic/com.system76.CosmicNotifications/v1The notification program has to be restarted in order to re-read the config, which is a limitation ofcosmic-notificationsthat I'll try to fix soon.UPDATE: It turns out that the app does reload the config and it works correctly. I'm not sure why it didn't work yesterday. 🤷♂️
^COSMIC Session will restart it so it's okay to just close it. You only have to do this if the config doesn't refresh on its own.
This notification won't fire.
This notification will display.
Currently, this setting isn't exposed to the end user beyond editing configs. I implemented a settings page for notifications in pop-os/cosmic-settings#1878 which can be amended with this setting in a future PR.