From dc93f1c1fd7b67e2da5af2ffada732b9ddeb2d6a Mon Sep 17 00:00:00 2001 From: Kent Daleng Date: Sun, 17 Aug 2025 16:05:41 +0200 Subject: github wiki replacement / mkdocs-docs (#2147) * Add wiki based on mkdocs * wording fixes * fix github bg color on narrow * Fix left sidebar section headers being bigger than pages * fix hover accent * fix list rendering on fractional layout * fix videos * fix automatic full links * remove redundant commented css * improve dark mode contrast * update pygments for better child node coloring * update logo * remove blank lines * add systemd language hint --------- Co-authored-by: Ivan Molodetskikh --- wiki/Screencasting.md | 136 -------------------------------------------------- 1 file changed, 136 deletions(-) delete mode 100644 wiki/Screencasting.md (limited to 'wiki/Screencasting.md') diff --git a/wiki/Screencasting.md b/wiki/Screencasting.md deleted file mode 100644 index 2f0aa70a..00000000 --- a/wiki/Screencasting.md +++ /dev/null @@ -1,136 +0,0 @@ -### Overview - -The primary screencasting interface that niri offers is through portals and pipewire. -It is supported by [OBS], Firefox, Chromium, Electron, Telegram, and other apps. -You can screencast both monitors and individual windows. - -In order to use it, you need a working D-Bus session, pipewire, `xdg-desktop-portal-gnome`, and [running niri as a session](./Getting-Started.md) (i.e. through `niri-session` or from a display manager). -On widely used distros this should all "just work". - -Alternatively, you can use tools that rely on the `wlr-screencopy` protocol, which niri also supports. - -There are several features in niri designed for screencasting. -Let's take a look! - -### Block out windows - -You can block out specific windows from screencasts, replacing them with solid black rectangles. -This can be useful for password managers or messenger windows, etc. - -![Screenshot showing a window visible normally, but blocked out on OBS.](./img/block-out-from-screencast.png) - -This is controlled through the `block-out-from` window rule, for example: - -```kdl -// Block out password managers from screencasts. -window-rule { - match app-id=r#"^org\.keepassxc\.KeePassXC$"# - match app-id=r#"^org\.gnome\.World\.Secrets$"# - - block-out-from "screencast" -} -``` - -You can similarly block out layer surfaces, using a layer rule: - -```kdl -// Block out mako notifications from screencasts. -layer-rule { - match namespace="^notifications$" - - block-out-from "screencast" -} -``` - -Check [the corresponding wiki section](./Configuration:-Window-Rules.md#block-out-from) for more details and examples. - -### Dynamic screencast target - -Since: 25.05 - -Niri provides a special screencast stream that you can change dynamically. -It shows up as "niri Dynamic Cast Target" in the screencast window dialog. - -![Screencast dialog showing niri Dynamic Cast Target.](https://github.com/user-attachments/assets/e236ce74-98ec-4f3a-a99b-29ac1ff324dd) - -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: - -- `set-dynamic-cast-window` to cast the focused window. -- `set-dynamic-cast-monitor` to cast the focused monitor. -- `clear-dynamic-cast-target` to go back to an empty stream. - -You can also use these actions from the command line, for example to interactively pick which window to cast: - -```sh -$ niri msg action set-dynamic-cast-window --id $(niri msg --json pick-window | jq .id) -``` - -https://github.com/user-attachments/assets/c617a9d6-7d5e-4f1f-b8cc-9301182d9634 - -If the cast target disappears (e.g. the target window closes), the stream goes back to empty. - -All dynamic casts share the same target, but new ones start out empty until the next time you change it (to avoid surprises and sharing something sensitive by mistake). - -### Indicate screencasted windows - -Since: 25.02 - -The [`is-window-cast-target=true` window rule](./Configuration:-Window-Rules.md#is-window-cast-target) matches windows targeted by an ongoing window screencast. -You use it with a special border color to clearly indicate screencasted windows. - -This also works for windows targeted by dynamic screencasts. -However, it will not work for windows that just happen to be visible in a full-monitor screencast. - -```kdl -// Indicate screencasted windows with red colors. -window-rule { - match is-window-cast-target=true - - focus-ring { - active-color "#f38ba8" - inactive-color "#7d0d2d" - } - - border { - inactive-color "#7d0d2d" - } - - shadow { - color "#7d0d2d70" - } - - tab-indicator { - active-color "#f38ba8" - inactive-color "#7d0d2d" - } -} -``` - -Example: - -![Screencasted window indicated with a red border and shadow.](https://github.com/user-attachments/assets/375b381e-3a87-4e94-8676-44404971d893) - -### Windowed (fake/detached) fullscreen - -Since: 25.05 - -When screencasting browser-based presentations like Google Slides, you usually want to hide the browser UI, which requires making the browser fullscreen. -This is not always convenient, for example if you have an ultrawide monitor, or just want to leave the browser as a smaller window, without taking up an entire monitor. - -The `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. - -```kdl -binds { - Mod+Ctrl+Shift+F { toggle-windowed-fullscreen; } -} -``` - -Keep in mind that not all apps react to fullscreening, so it may sometimes look as if the bind did nothing. - -Here's an example showing a windowed-fullscreen Google Slides [presentation](https://youtu.be/Kmz8ODolnDg), along with the presenter view and a meeting app: - -![Windowed Google Slides presentation, another window showing the presenter view, and another window showing Zoom UI casting the presentation.](https://github.com/user-attachments/assets/b2b49eea-f5a0-4c0a-b537-51fd1949a59d) - -[OBS]: https://obsproject.com/ -- cgit