enBoxer/docs/DESIGN.md

43 lines
1.9 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`:** never intercepted, even if a map lists them. Default `[]`. Put `e s d f` here to keep those letters on the primary.
4. **`passthrough`:** never intercepted, even if a map lists them. Default `[]`. Put `e s d f` here to keep those letters on the primary.
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.