Bug 452500

Summary: Allow to temporarily disable notifications/enter DND mode for individual apps
Product: [Plasma] plasmashell Reporter: Alex <allo>
Component: NotificationsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: kde, nate
Priority: NOR    
Version First Reported In: 5.26.4   
Target Milestone: 1.0   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Alex 2022-04-11 13:35:58 UTC
Plasma Notifications have a do-not-disturb mode and a mode to mute notifications for a certain time. It would be useful to be able to mute notifications from a specific application for a certain time.

The popup already lists notifications grouped by applications, so the UI would only require a context menu when clicking the application name, similar to the menu of the "do not disturb" button on top.

It would probably need some additional UI to unmute applications which did not send (new) notifications yet or an unmute-all button.
Comment 1 Nate Graham 2022-04-11 18:44:00 UTC
What's the specific use case you have in mind for this?
Comment 2 Alex 2022-04-11 18:50:03 UTC
Use-Case:
- Have two Chat-Apps online, one for work and one for personal contacts
- Mute the personal chat notifications while you have to concentrate on work, but receive team chat messages related to work

Use-Case:
- Have some application that is noisy (or sometimes noisy) but you currently do not care about its notifications
- Mute the app that sends too many notifications, but still receive notifications from other apps

Use-Case:
- Have an app that does not allow to turn off notifications, but you currently do not care about its notifications
- Mute the app on the system level

Most use-cases could in principle handled by configuring the apps themselves, but different apps provide different options to configure this and have different UI, while muting the notifications in plasma has an unified UI and unified features, like, for example, muting only for an hour and then auto-unmuting again.
Comment 3 Nate Graham 2022-04-11 19:20:31 UTC
Aha, you can in fact turn off all notifications from individual apps. Go to System Settings > Notifications > Applications: Configure > select the app > uncheck "show popups".

Technically this is disabling the app's notifications, not muting them. But it's the same effect. Does that suffice?
Comment 4 Alex 2022-04-11 19:45:02 UTC
(In reply to Nate Graham from comment #3)
> Aha, you can in fact turn off all notifications from individual apps. Go to
> System Settings > Notifications > Applications: Configure > select the app >
> uncheck "show popups".
> 
> Technically this is disabling the app's notifications, not muting them. But
> it's the same effect. Does that suffice?

I am thinking of a new function, where you can click the application title in the notifications popup, because it would have two advantages over what's possible:
- It is easier to reach for quickly switching dnd-mode for single applications on and off
- It would allow for timed dnd-mode like the global dnd-mode does now.

In addition I am not sure if your solution hides the notifications from the popup as well. I still want to receive them, but they should only be listed in the drawer that pops up when I click the notification icon and not show an active notification.
Comment 5 Nate Graham 2022-04-11 20:01:09 UTC
Thanks for the info.
Comment 6 31113 2023-01-10 15:56:05 UTC
(In reply to Nate Graham from comment #1)
> What's the specific use case you have in mind for this?

Apps that don't support event channels. 

Example: 

Apparently Spotify shows notifications on track change, that some people might want to see, but don't want their music interrupted by it. Spotify hasn't implemented event channels, and Plasma does not expose an option to mute all notifications for an app. (Relevant reddit post: https://www.reddit.com/r/kde/comments/106kpc3/nobara_best_way_to_mute_notifications_for_one/)


I personally would like to mute notifications from telegram, which also has not implemented event channels, but I'd still like to see them. I don't want to mute notifications for all apps, because other applications might have more important notifications I want to be alerted to with sound.

The solutions I see are

1. the obvious: adding a "mute this app" checkbox in the per app notification settings

2. this might be worth considering: treating all notifications from an app that has not implemented event channels as 1 channel, thereby making all options that are available for events available as a general setting for all the app's notifications.
Comment 7 Alex 2023-01-10 16:02:20 UTC
(In reply to 31113 from comment #6)
> (In reply to Nate Graham from comment #1)
> > What's the specific use case you have in mind for this?
> 
> (...)
> I personally would like to mute notifications from telegram, which also has
> not implemented event channels, but I'd still like to see them. I don't want
> to mute notifications for all apps, because other applications might have
> more important notifications I want to be alerted to with sound.

This bug is about muting notifications (i.e. not showing them at all), not about muting the sound effect.
So the wanted solution here would not show notifications from Spotify for 1 hour when selecting Spotify->DnD->1 hour AT ALL, so not only muting sound, but also not displaying the notification.

I think you're looking for a "turn off notification sound" (for single programs) solution, which is not the scope of my feature request.
Comment 8 31113 2023-01-10 16:18:07 UTC
(In reply to Alex from comment #7)
> (In reply to 31113 from comment #6)
> > (In reply to Nate Graham from comment #1)
> > > What's the specific use case you have in mind for this?
> > 
> > (...)
> > I personally would like to mute notifications from telegram, which also has
> > not implemented event channels, but I'd still like to see them. I don't want
> > to mute notifications for all apps, because other applications might have
> > more important notifications I want to be alerted to with sound.
> 
> This bug is about muting notifications (i.e. not showing them at all), not
> about muting the sound effect.
> So the wanted solution here would not show notifications from Spotify for 1
> hour when selecting Spotify->DnD->1 hour AT ALL, so not only muting sound,
> but also not displaying the notification.
> 
> I think you're looking for a "turn off notification sound" (for single
> programs) solution, which is not the scope of my feature request.

Sorry, you used the word mute, so I thought you wanted to mute notifications. What you're talking about is what I'd call "hide" notifications.  

I don't want to detract from your feature request, but comments can't be the deleted here, so idk if I should open a new report. The kde devs who are cc'd to this report were already sent my comment, it's probably no use for them to read the same thing twice.
Comment 9 Alex 2023-01-10 16:19:49 UTC
Open a new request, so it has an own status and can be tracked and closed when it is implemented.
Comment 10 31113 2023-01-10 16:56:42 UTC
(In reply to Alex from comment #9)
> Open a new request, so it has an own status and can be tracked and closed
> when it is implemented.

Okay. Created bug #464107

Sorry again
Comment 11 Nate Graham 2023-01-10 20:57:32 UTC
I see, you were using the word "mute" to mean "disable", not "turn off sound from". Got it now.

To be honest, based on your use cases, I think the path of least resistance is to just close the apps that you don't want to receive notifications from (e.g. the personal chat app while you're at work, other noisy app), or permanently disable their notifications (e.g. Spotify). I don't think it's super likely that we'll end up implementing what essentially amounts to a per-app DND mode. The UI would become super complex really fast.

Thanks for the idea anyway though!
Comment 12 Alex 2023-01-10 22:32:29 UTC
> To be honest, based on your use cases, I think the path of least resistance is to just close the apps that you don't want to receive notifications from (e.g. the personal chat app while you're at work, other noisy app), or permanently disable their notifications (e.g. Spotify).

I would not consider this a good solution. At best it is a workaround. I do not really care about music apps (I do not use notifications for such trivial things), but I am thinking about different chat system, mail clients, and so on.

> I don't think it's super likely that we'll end up implementing what essentially amounts to a per-app DND mode. The UI would become super complex really fast.

I think a per-app DnD would be enough and this wouldn't require a complex UI. Each App already has a header (or whatever it is internally called) in the notifications list with a clear-button, that remove all notification from that app. There could additionally be a DnD button, that allows to mute future notification for some time.
I would compare it to notifications in mobile apps. If your Signal group is too active, you can mute it for 1 hour and still receive notification for message from other users. In KDE it would be a DnD mode for, e.g., notifications from your chat program, which do not suppress notifications from, for example, your e-mail client.
Comment 13 Nate Graham 2023-01-11 16:18:56 UTC
Can you give me an example of an app that you want to keep open but not receive notifications from, and what problems would be caused if you closed the app instead of muting its notifications?
Comment 14 Alex 2023-01-11 16:50:41 UTC
Let's say I would like to mute the team chat for 2 hours, but keep notifications for reminders from the calandar app on, so you get notified when the next meeting starts.
Now I could, of course, just quit the teamchat, or disable notifications inside the team-chat itself. But will I remember to start it again after 2 hours? Maybe I will only remember several hours later and then have missed quite a few notifications and was unreachable for a lot of people.
The DnD feature also doesn't discard (or prevent) the notifications completely, but only disables showing them for a chosen amount of time and you can have a look at them later on.

In the end, I would say the use-cases are all the same as for the global DnD function, only that you may want to whitelist or blacklist only certain applications instead of disabling notifications for all programs. Most often it would probably be like getting one notification, e.g. from a chat, and then clicking on "mute for 2 hours" and wouldn't require an extensive management for lists of enabled and disabled apps. For me, it also doesn't have to persist across sessions, but a switch that just suppresses the notifications right now is enough.
I can't imagine that it would be hard to implement and it could be handy for the cases when only one app is sending too many notifications.
Comment 15 Nate Graham 2023-01-11 17:11:38 UTC
Thanks for the explanation, that makes sense. Re-opening.