From 8d9903b65e9842a73975ae7239bb315dfbd78e34 Mon Sep 17 00:00:00 2001 From: mx Date: Sat, 14 Nov 2026 17:17:04 +0100 Subject: [PATCH] Read notification expire timeouts as milliseconds Quickshell hands expireTimeout through in ms, so multiplying by 1000 kept a notify-send -t 3000 popup up for about 50 minutes. Co-Authored-By: Claude Opus 5.5 --- quickshell/services/NotificationService.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quickshell/services/NotificationService.qml b/quickshell/services/NotificationService.qml index 933c78a..81a54ca 100644 --- a/quickshell/services/NotificationService.qml +++ b/quickshell/services/NotificationService.qml @@ -85,11 +85,12 @@ Singleton { function critical(n) { return !!n && n.urgency === NotificationUrgency.Critical; } - // Popup lifetime in ms; 0 keeps it until dismissed. + // Popup lifetime in ms; 0 keeps it until dismissed. Quickshell passes the + // sender's expire_timeout through in milliseconds (notify-send -t 3000 is 3000). function timeoutFor(n) { if (critical(n)) return 0; - return n.expireTimeout > 0 ? Math.round(Math.max(1, n.expireTimeout) * 1000) : options.timeout; + return n.expireTimeout > 0 ? Math.round(Math.max(1000, n.expireTimeout)) : options.timeout; } function since(n) { const at = n ? times[n.id] : undefined;