Namespace Hyprland events under bread.hyprland.*, keep legacy names via [compat]
normalize_hyprland() dual-emits each of its 10 flat event names (bread.workspace.changed, bread.monitor.connected, bread.window.opened, etc.) alongside a bread.hyprland.<rest> equivalent, so portable automation can subscribe to bread.hyprland.* and be guaranteed compositor-specific coverage without also matching genuinely cross-backend events like bread.power.*. The bread.hyprland.event fallback was already namespaced and is unaffected. Gated behind [compat] legacy_hyprland_event_names (default true during the deprecation window) so the old names keep firing until modules migrate; set to false to emit only the namespaced names. EventNormalizer::with_legacy_hyprland_event_names(bool) is a builder on top of the existing ::new(dedup_window_ms), threaded through from config in main.rs. Bumps API_VERSION to 1.5.0 (additive), updates Documentation.md's Hyprland event reference with Deprecated/Since markers and the new [compat] option, refreshes the README config example and the dock-workflow/git-branch-widget examples to the namespaced names, and adds DEPRECATIONS.md tracking the deferred full removal once the window closes.
This commit is contained in:
parent
96639516b1
commit
d270ac6ff7
9 changed files with 535 additions and 95 deletions
|
|
@ -15,7 +15,7 @@ Instead of scattering behavior across shell scripts, compositor configs, udev ru
|
|||
Bread runs a long-lived daemon (`breadd`) that:
|
||||
|
||||
1. Ingests raw signals from your compositor, hardware, and OS
|
||||
2. Normalizes them into stable, semantic events (`bread.device.dock.connected`, `bread.monitor.connected`, etc.)
|
||||
2. Normalizes them into stable, semantic events (`bread.device.dock.connected`, `bread.hyprland.monitor.connected`, etc.)
|
||||
3. Maintains a live model of your desktop state
|
||||
4. Delivers those events to Lua modules that implement your automation
|
||||
|
||||
|
|
@ -144,6 +144,9 @@ enabled = true
|
|||
[events]
|
||||
dedup_window_ms = 100
|
||||
|
||||
[compat]
|
||||
legacy_hyprland_event_names = true # dual-emits bread.hyprland.* alongside legacy flat names; see Documentation.md
|
||||
|
||||
[notifications]
|
||||
default_timeout_ms = 5000
|
||||
default_urgency = "normal"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue