Skip to main content

Module focus

Module focus 

Source
Expand description

Hyprland focus and window-close events.

Subscribes to Hyprland’s IPC event socket ($XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock) and translates the line-based event stream into FocusEvents. The daemon uses these to keep a per-window keystroke buffer — typing in one window does not poison the buffer of another, and switching back to a window restores its prior buffer state — and to apply the privacy app-blocklist (gating buffer accumulation by window class).

See DESIGN.md — “The keystroke buffer”.

Structs§

InitialFocus
The currently focused window at startup, used to seed the daemon.

Enums§

FocusError
An error subscribing to Hyprland’s IPC event stream.
FocusEvent
A focus or window-lifecycle event from Hyprland.

Functions§

start
Start the Hyprland focus subscription.