Replies: 1 comment 3 replies
-
|
Sounds like a pretty cool idea, though yeah, need to figure out how to toggle between these and configure them nicely.
Where would you constrain this? Unfortunately, the xdp-gnome dialog only lets us select a "window" from a predefined list. Do you mean, like, having a global config option for which output to restrict this to or something?
How's this different from just normal screencasting? Even in OBS, there's nowadays only a single PipeWire source that asks the portal for either screen or window: |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
The problem
In many cases when screensharing, you end up wanting to show the contents of one window primarily, but sometimes wanting to show some other window for context. Currently, the only real solution here is to share your entire screen, which has several drawbacks:
block-out-from, however doing that for a browser window might be very fragile and not necessarily convenient)The proposed solution
Niri could create a sort of "virtual" window that is only seen by xdg-desktop-portal screencast clients. This window then mirrors the contents of whatever the user currently wants to show, allowing the user to quickly switch what is shown on stream through niri, rather than having to go through the screenshare-menu of the users video-calling software.
I'd propose three different modes here, which should be toggleable via regular actions (-> niri IPC, keybinds, etc):
follow-focus: niri always casts the currently focused window. When the user focuses something else, the other window gets shown. Optimally, it should be possible to constrain this to a single workspace and/or display, such that you can still have a secondary monitor or workspace that the screencast does not follow you to.full-screen: the equivalent of just sharing your entire screen. This would be still be useful because it'd allow the user to quickly switch between sharing the entire screen and singular, specific windowsfixed/manual: share one specific window, specified via its ID. The user could then set up keybinds or other automations to switch which window is casted exactly how they want to -- i.e. creating a keybind that sets the window focused at that moment as the casted window.This would work especially well in combination with #1080, as you'd then be able to nicely visualize which window you are sharing -- which is infinitely more important when that window might be changing very frequently and dynamically.
Beta Was this translation helpful? Give feedback.
All reactions