diff --git a/settings/quickshell.nix b/settings/quickshell.nix index 2c990cc..a4eeb7f 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -1750,6 +1750,9 @@ in function resetView() { viewYear = clockText.now.getFullYear(); viewMonth = clockText.now.getMonth(); + // Runs on every open: an on-screen toast is redundant + // once the notification list is visible. + if (toastItem.visible) toastItem.dismiss(); } function shiftMonth(d) { let m = viewMonth + d; @@ -2293,11 +2296,17 @@ in Connections { target: bar.shellRoot function onNotificationReceived() { - // No toast while the calendar popup is open — the - // notification list is already on screen there. - if (toastItem.isPrimary && !calPopup.visible) { - toastItem.showToast(bar.shellRoot.latestNotification); + if (!toastItem.isPrimary) return; + let n = bar.shellRoot.latestNotification; + // Popup open: the notification list is already on + // screen — play the sound but skip the toast. + if (calPopup.visible) { + if (!toastItem.mutedApps.includes(n.appName)) { + notifSoundProc.running = true; + } + return; } + toastItem.showToast(n); } }