Retry USB approval notifications after delivery failure

This commit is contained in:
acrogenesis committed 2026-09-15 13:35:57 -06:00
1 parent 7309746ac8
commit 4ea410d6a1
2 files changed
+20 -2

No files matched your search

+7 -2
View File
@@ -68,11 +68,16 @@ jq -n \
chmod 600 "$temporary"
mv -f "$temporary" "$request"
omarchy-notification-send \
if ! omarchy-notification-send \
--app-name omarchy-action \
--urgency critical \
--glyph 󰖀 \
"USB accessory blocked" \
"Click to review it. Keep it blocked unless you recognize the device." \
--exec omarchy-launch-floating-terminal-with-presentation \
omarchy-usb-authorization-review "$token"
omarchy-usb-authorization-review "$token"; then
# Only a delivered notification may suppress subsequent attempts. Keep the
# lock until failure cleanup so another event cannot skip an unsent request.
rm -f "$request"
exit 1
fi