From fed2fd8e3d2e53b4db67196af36e20be38f1057a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 29 Jun 2026 13:24:04 -0500 Subject: [PATCH] Fix notification expire timeout being treated as seconds instead of milliseconds --- bin/omarchy-capture-screenshot | 2 +- shell/plugins/notifications/Service.qml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/omarchy-capture-screenshot b/bin/omarchy-capture-screenshot index a9ff98c3..822e66e2 100755 --- a/bin/omarchy-capture-screenshot +++ b/bin/omarchy-capture-screenshot @@ -125,7 +125,7 @@ case "$PROCESSING" in wl-copy --type image/png <"$FILEPATH" ( - if [[ -n $(omarchy-notification-send "Screenshot saved to clipboard and file" "Edit with Super + Alt + , (or click this)" -t 10000 --image "$FILEPATH" -a) ]]; then + if [[ -n $(omarchy-notification-send "Screenshot saved to clipboard and file" "Edit with Super + Alt + , (or click this)" --image "$FILEPATH" -a) ]]; then open_editor "$FILEPATH" fi ) >/dev/null 2>&1 & diff --git a/shell/plugins/notifications/Service.qml b/shell/plugins/notifications/Service.qml index 61293d06..258ca82d 100644 --- a/shell/plugins/notifications/Service.qml +++ b/shell/plugins/notifications/Service.qml @@ -109,9 +109,11 @@ Item { } function requestedDuration(expireTimeout) { - var seconds = Number(expireTimeout || 0) - if (!isFinite(seconds) || seconds <= 0) return 0 - return Math.round(seconds * 1000) + // FreeDesktop notification spec (and Quickshell) report expireTimeout in + // milliseconds, so pass it through directly. + var ms = Number(expireTimeout || 0) + if (!isFinite(ms) || ms <= 0) return 0 + return Math.round(ms) } // DND bypass: only let through notifications we trust to be intentional