From 991f3734aa746165a094ae0c00a1ea7acac66376 Mon Sep 17 00:00:00 2001 From: rope Date: Thu, 11 Jun 2026 15:01:52 +0100 Subject: [PATCH] quickshell: keep notification sound while popup open; opening popup dismisses toast Co-Authored-By: Claude Fable 5 --- settings/quickshell.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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); } }