breadbar: reconnect Hyprland event stream, fix notification spec violations, point lock button at breadlock

- src/bar/workspaces.rs: the Hyprland EventStream loop exited permanently
  on the first Err/end-of-stream (Hyprland restart/reload, IPC hiccup),
  freezing every workspace button for the bar's remaining life. Now wrapped
  in a reconnect loop with capped exponential backoff, re-syncing workspace
  state on every reconnect
- src/notifications/mod.rs + popup.rs: three spec deviations fixed —
  expire_timeout=0 now means never-expire instead of being coerced to 5s
  (and a critical-urgency notification with no explicit timeout also
  persists by default); NotificationClosed is now emitted with the correct
  reason code whenever a notification actually goes away (expiry or an
  explicit CloseNotification call); replaces_id no longer races its
  auto-dismiss timer against the replacement's, via a per-id generation
  counter checked before a stale timer is allowed to dismiss anything
- src/main.rs + README.md + assets/icons-needed.txt: lock button (and its
  docs) now invoke breadlock instead of hyprlock, the thing breadlock was
  built to replace
- src/notifications/mod.rs: added 4 unit tests for the new expire_timeout/
  urgency mapping (pulled into a pure compute_expire() for testability) —
  this crate had zero test coverage before
This commit is contained in:
Breadway 2026-07-17 08:40:32 +08:00
parent e8d5fd5a52
commit 1f2d58d97f
6 changed files with 229 additions and 46 deletions

View file

@ -20,7 +20,7 @@ Brightness.svg
Power section buttons
-----------------------
Lock.svg
Padlock icon — triggers hyprlock (lock screen).
Padlock icon — triggers breadlock (lock screen).
Currently placeholder: 🔒
Sleep.svg