emersion / mako

A lightweight Wayland notification daemon
https://wayland.emersion.fr/mako
MIT License
2.17k stars 137 forks source link

[Feature request] Update timeout settings of all notifications when switching mode #497

Open itshog opened 7 months ago

itshog commented 7 months ago

I apologize in advance if this has already been requested or if it's somewhat already possible, but, as far as I understand, for each notification mako retains the timeout property from the mode that was active when the notification was originally sent, and not the one from the new mode. So, for instance, having a config like this:

default-timeout=5000

[mode=paused]
invisible=1
default-timeout=0
ignore-timeout=1

will result in every notification sent when the paused mode is active having no timeout even when switching mode, so after exiting the paused mode every notification has to be manually dismissed. Would it be possible to make it so these notifications reset their timeout property to the default-timeout value instead?

My use case for this, as shown with the example above, is having a "don't disturb" mode that hides every notification but disables the timeout, so when I exit this mode I can see the notifications and they are automatically dismissed after the time specified as default-timeout, without having to manually dismiss them. IMO this makes for a nicer and more intuitive behaviour.

I understand that for some users the current behaviour of mako (retaining the timeout settings from the mode active when the notification was sent and never updating them) may be preferable, so maybe this could be made into a user-configurable option (something like retain-timeout=0|1).

Anyway, thanks for the great piece of software!