docs/wiki/FAQ.md
Uncomment the prefer-no-csd setting at the top level of the config, and then restart your apps.
Then niri will ask windows to omit client-side decorations, and also inform them that they are being tiled (which makes some windows rectangular, even if they cannot omit the decorations).
Note that currently this will prevent edge window resize handles from showing up. You can still resize windows by holding <kbd>Mod</kbd> and the right mouse button.
Uncomment the prefer-no-csd setting at the top level of the config, and then restart your apps.
Niri will draw focus rings and borders around windows that agree to omit their client-side decorations.
By default, focus ring and border are rendered as a solid background rectangle behind windows. That is, they will show up through semitransparent windows. This is because windows using client-side decorations can have an arbitrary shape.
You can also override this behavior with the draw-border-with-background window rule.
Put this window rule in your config:
window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
For more information, check the geometry-corner-radius window rule.
Put this into your config:
hotkey-overlay {
skip-at-startup
}
Hybrid GPU laptops (which have both an integrated and a discrete GPU) generally connect the external monitor port to the discrete GPU. Meanwhile, the built-in monitor is connected to the integrated GPU, and the integrated GPU is used for rendering by default.
This is good and expected because the integrated GPU uses significantly less battery compared to the discrete GPU. However, this means that niri has to render the external monitor contents on the integrated GPU, then copy them over to the discrete GPU for display. On some laptops this can cause lag and stuttering (it gets worse with monitor resolution and refresh rate).
If your laptop has a MUX switch—usually a GPU toggle in the UEFI settings—then you can switch it to use the discrete GPU, then niri will render on the discrete GPU, and the external monitor won't lag.
Otherwise, you can try configuring niri to render on the discrete GPU via the render-drm-device debug option.
Keep in mind that using the discrete GPU for rendering will make the laptop's battery deplete much faster.
To run X11 apps, you can use xwayland-satellite. Check the Xwayland wiki page for instructions.
Keep in mind that you can run many Electron apps such as VSCode or Discord natively on Wayland by passing the right flags, as described here.
A combination of factors:
All in all, the situation works out in favor of avoiding Xwayland integration.
<sup>Since: 25.08</sup> niri has seamless built-in xwayland-satellite integration that by and large works as well as built-in Xwayland in other compositors, solving the hurdle of having to set it up manually.
I wouldn't be too surprised if, down the road, xwayland-satellite becomes the standard way of integrating Xwayland into new compositors, since it takes on the bulk of the annoying work, and isolates the compositor from misbehaving clients.
<sup>Since: 26.04</sup> Yes. See the window effects wiki page.
Not yet, follow/upvote this issue.
You can emulate this with a script that uses the niri IPC.
For example, nirius seems to have this feature (toggle-follow-mode).
Firefox seems to first open the Bitwarden window with a generic Firefox title, and only later change the window title to Bitwarden, so you can't effectively target it with an open-floating window rule.
You'll need to use a script, for example this one or other ones (search niri issues and discussions for Bitwarden).
No, but you can script the behavior you want with the niri IPC.
Listen to the event stream for a new window opening, then call an action like consume-or-expel-window-left.
Adding this directly to niri is challenging:
This can happen with focus-follows-mouse.
When using client-side decorations, windows are supposed to have some margins outside their geometry for the mouse resizing handles.
These margins "peek out" of the monitor edges since they're outside the window geometry, and focus-follows-mouse triggers when the mouse crosses them.
It doesn't always happen:
focus-follows-mouse to trigger.focus-follows-mouse won't trigger because the mouse will never leave the current window.To fix this, you can:
focus-follows-mouse max-scroll-amount="0%", which will prevent focus-follows-mouse from triggering when it would cause scrolling.prefer-no-csd which will generally cause clients to remove those resizing margins.When your screen locker dies, you will be left with a red screen. This is niri's locked session background.
You can recover from this by spawning a new screen locker.
One way is to switch to a different TTY (with a shortcut like <kbd>Ctrl</kbd><kbd>Alt</kbd><kbd>F3</kbd>) and spawning a screen locker to niri's Wayland display, e.g. WAYLAND_DISPLAY=wayland-1 swaylock.
Another way is to set allow-when-locked=true on your screen locker bind, then you can press it on the red screen to get a fresh screen locker.
binds {
Super+Alt+L allow-when-locked=true { spawn "swaylock"; }
}
If you require different output configurations depending on what outputs are connected then you can use Kanshi.
Kanshi has its own simple configuration and communicates with niri via IPC. You may want to launch kanshi from the niri config.kdl e.g. spawn-at-startup "/usr/bin/kanshi"
For example, if you wish to scale your laptop display differently when an external monitor is connected, you might use a Kanshi config like this:
profile {
output eDP-1 enable scale 1.0
}
profile {
output HDMI-A-1 enable scale 1.0 position 0,0
output eDP-1 enable scale 1.25 position 1920,0
}
They draw their own 1 px dark border around the window, which obscures one pixel of niri's border.
If you don't like this, set the clip-to-geometry true window rule.