Overview
The primary screencasting interface that niri offers is through portals and pipewire. It is supported by:- OBS Studio
- Firefox
- Chromium
- Electron apps
- Telegram
- Other apps using xdg-desktop-portal
Requirements
On widely used distros, this should all “just work”.
Alternative Methods
Alternatively, you can use tools that rely on thewlr-screencopy protocol, which niri also supports.
Blocking Windows from Screencasts
You can block out specific windows from screencasts, replacing them with solid black rectangles. This is useful for password managers, messengers, or any sensitive content.
Window Rules
Block windows using theblock-out-from window rule:
Layer Rules
You can similarly block out layer surfaces:Learn More
Check the window rules documentation for more details and examples
Dynamic Screencast Target
Available since version 25.05
How It Works
When you select it, it will start as an empty, transparent video stream. Then, you can use the following binds to change what it shows:Cast Window
set-dynamic-cast-window - Cast the focused windowCast Monitor
set-dynamic-cast-monitor - Cast the focused monitorClear Target
clear-dynamic-cast-target - Go back to empty streamConfiguration Example
Command Line Usage
You can also use these actions from the command line, for example to interactively pick which window to cast:Behavior Notes
- If the cast target disappears (e.g., the target window closes), the stream goes back to empty
- All dynamic casts share the same target
- New casts start out empty until the next time you change the target (to avoid surprises)
Indicating Screencasted Windows
Available since version 25.02
is-window-cast-target=true window rule matches windows targeted by an ongoing window screencast. You can use it with a special border color to clearly indicate screencasted windows.
Example Configuration
Windowed (Fake) Fullscreen
Available since version 25.05
toggle-windowed-fullscreen bind helps with this. It tells the app that it went fullscreen, while in reality leaving it as a normal window that you can resize and put wherever you want.
Configuration
Keep in mind that not all apps react to fullscreening, so it may sometimes look as if the bind did nothing.
Use Case Example
Here’s an example showing a windowed-fullscreen Google Slides presentation, along with the presenter view and a meeting app:Screen Mirroring
For presentations it can be useful to mirror an output to another. Currently, niri doesn’t have built-in output mirroring, but you can usewl-mirror that mirrors an output to a window.