enBoxer/docs/DESIGN.md
en 5aabf0d36f Round 5 batch A (Grok review): games.yaml seed, pending_ipc fix, doc residue, dead passthrough_id.
Grok round 5 found:

1. examples/games.yaml was actually src/main.rs (227 lines of clap
   CLI; my round-4 Item 4 commit message was wrong). Replaced with
   a real seed YAML. The example shows the env format as
   [[KEY, VALUE], ...] (a list of pairs), NOT KEY=*** (serde_yaml
   will not parse KEY=*** into Vec<(String, String)>).

3. App.pending_ipc was written by Free-mode buttons but never
   drained by the main loop. Replaced with direct self.ipc(...)
   calls. Hoisted the closure borrow by collecting verbs into a
   Vec<(&str, u32)> and draining after the slots borrow is
   released. Dropped the pending_ipc field + App literal init.

8. Doc residue: passthrough / window_match claims still in
   README.md, CHANGELOG.md, docs/DESIGN.md. Updated README.md to
   point at round-4 Item 6 + Item 3. Added a round-4 section at
   the top of CHANGELOG.md. Dropped the duplicate passthrough
   bullet in docs/DESIGN.md.

10. Dead passthrough_id helper in hotkey.rs (unused after the
    passthrough feature dropped in round-4 Item 6). Dropped the
    function + its doc comment.

cargo test 103/103; clippy clean.
2026-09-17 07:40:24 +02:00

42 lines
1.7 KiB
Markdown

# Design
enBoxer is a Hyprland session that sits beside several WoW windows. It is not loaded into the game.
## Process
```
keyboard / mouse
Hyprland (only while a managed WoW window or an enBoxer overlay is focused)
│ hl.bind (mapped keys, consumed)
enboxer daemon ← unix socket ($XDG_RUNTIME_DIR/enboxer/enboxer.sock)
├─ mapped-key engine (targets, delays, hold, game_binds)
├─ Lua: hl.dsp.send_shortcut | send_key_state
└─ Video FX: grim → overlay window
```
Delivery is compositor input to a window address.
## Routing
1. **Session off** (focus is not a captured slot and not an enBoxer overlay): no binds. Normal desktop.
2. **Mode `maps` (default):** only `maps[].hotkey` are intercepted. Everything else, including movement, goes to the focused primary.
3. **Passthrough:** removed in round-4 Item 6. Every mapped hotkey is intercepted.
5. **Video FX hover + `pass_through`:** keys and clicks inside the viewer go to the **source slot only**.
A map with `target: others` never delivers to the primary. A map with `target: all` consumes the OS key and re-sends to every slot including primary (no double-tap).
## Interact / loot
See `docs/MACROS.md`. Stock `loot` map: assist + CTM on + Interact with Target + delay + CTM off, all `others`. Delay is configurable; we do not spam interact.
## Video FX
Each feed is a source rect (slot + normalized box) plus a viewer rect on the current primary. Overlay class `enboxer-vfx`. Capture is `grim` for visible sources, `zwlr_export_dmabuf_unstable_v1` for covered sources (gated behind `ENBOXER_ENABLE_TOPLEVEL=1`). See [docs/VIDEO.md](VIDEO.md).
## Config
One YAML profile (`~/.config/enboxer/profile.yaml` or `-c`). Reload maps without restarting WoW.