Skip to content

niri Integration

binds {
Mod+R { spawn "raffi"; }
}

Inside niri, Raffi starts the app you pick with niri msg action spawn, so niri is its parent and the app gets niri’s environment and working directory. To always start apps from Raffi, set launch: direct in general (see General Settings).

Raffi’s window has the app ID com.chmouel.raffi. niri opens new windows as columns; this rule floats it instead, and sizes it relative to the screen:

window-rule {
match app-id=r#"^com\.chmouel\.raffi$"#
open-floating true
default-column-width { proportion 0.45; }
default-window-height { proportion 0.78; }
}

Check your config with niri validate. If you start a second style with raffi --app-name com.chmouel.raffi.fb, match that app ID in another rule.

Pass an addon keyword as the initial query to open Raffi straight into it:

binds {
Mod+W { spawn "raffi" "-i" "win "; }
Mod+V { spawn "raffi" "-i" "clip "; }
Mod+T { spawn "raffi" "-i" "tabs "; }
}

win lists the open windows in focus order. Enter focuses one, Ctrl+Enter moves it to the current workspace, Ctrl+D closes it, and Ctrl+Tab shows the workspaces instead. The list follows niri msg event-stream while it is open. See Window Switcher.

With raise_running: true in general, Enter on a launcher whose app already has a window focuses that window, and Ctrl+Enter starts a new one. Raffi matches the app ID. See General Settings.

ifcompositor shows a launcher only under the given compositors:

launchers.yaml
niri-overview:
binary: niri
args: ["msg", "action", "toggle-overview"]
description: "Toggle the overview"
ifcompositor: niri

Raffi is translucent by default (opacity: 0.95 in general). niri 26.04 and later blur behind it when a window rule asks for it:

window-rule {
match app-id=r#"^com\.chmouel\.raffi$"#
background-effect { blur true; }
}

See Transparency and Blur.

  • Raffi does not appear: check that raffi is on niri’s PATH (try an absolute path in the binding) and look at journalctl --user -u niri.
  • To see what Raffi asks niri, run it with --debug-file /tmp/raffi.log.