Skip to content

Behavior rules

Behavior keys change how matching windows interact with input, displays, and capture. They update while the window is open and on config reload.

# Variable refresh rate for game content
[[window_rule]]
match.content_type = "game"
vrr = "always"
KeyDefaultDescription
confine_pointerfalseKeep the pointer inside the window while it has keyboard focus. See Games.
allow_shortcuts_inhibittrueLet the app take over compositor shortcuts. See Keep compositor shortcuts.
background_renderfalseKeep drawing while hidden. See Keep drawing while hidden.
block_capturefalseLeave the window out of screenshots and recordings. See Hide a window from screenshots.
focus_on_activateglobalOverride general.focus_on_activate. See Focus on activation.
touchpad_scroll_factorunsetTouchpad scroll speed multiplier, 0.1 to 10.0. See Touchpad scroll speed.
vrroutputOverride the output’s VRR policy: "disabled", "always", or "fullscreen".
tearingclientRequest (true) or veto (false) tearing.
hdroutputOverride the output’s HDR policy.

vrr, tearing, and hdr apply while the window is focused. A window rule’s vrr = "fullscreen" follows the window’s own fullscreen state.

# Keep the pointer in games that release it in menus
[[window_rule]]
match.app_id = "^steam_app_.*$"
confine_pointer = true
  • Confinement applies while the window has keyboard focus and the pointer is inside it, tiled, floating, or fullscreen.
  • Pointer locks requested by the game still work; confinement resumes when the game releases its lock.
  • Escape with a focus or workspace keybind.
  • It is suspended during session lock, the overview, and compositor move or resize.
# Variable refresh and tearing for Steam games
[[window_rule]]
match.app_id = "^steam_app_.*$"
vrr = "always"
tearing = true

Tearing also needs tearing = true on the output; see Tearing.

# Compositor shortcuts keep working in virtual machines
[[window_rule]]
match.app_id = "^virt-manager$"
allow_shortcuts_inhibit = false

Virtual machines and remote desktops normally capture every key. This denies their request; the manual passthrough toggle still works.

# OBS keeps running on another workspace
[[window_rule]]
match.app_id = "^obs$"
background_render = true

A window that no output shows, on another workspace, in a hidden tab, or in a hidden scratchpad, is told it is suspended and can stop drawing. Applications that tie other work to drawing can stall. This keeps them running as if shown, at the cost of the CPU and GPU time they spend drawing.

# Keep a private app out of screenshots and recordings
[[window_rule]]
match.app_id = "^private-app$"
block_capture = true
  • Output and region captures show what is underneath; no black box replaces the window.
  • Direct capture of the window is refused, and enabling the rule stops existing sessions.
  • Frames already recorded cannot be recalled.
  • The window’s popups and transients are protected too.
  • Local display, input, focus, and layout are unchanged. Protected captures redraw the whole output.
# Faster touchpad scrolling in a document viewer
[[window_rule]]
match.app_id = "^org[.]pwmt[.]zathura$"
touchpad_scroll_factor = 2.0

The factor multiplies input.touchpad.scroll_factor. Mouse wheels are unaffected.

focus_on_activate overrides general.focus_on_activate for matching windows: whether an application’s activation request focuses and reveals the window.