Open
Conversation
- Introduced `CreateVirtualOutput` and `RemoveVirtualOutput` requests in IPC. - Implemented corresponding message handling in the client. - Added methods for creating and removing virtual outputs in the backend. - Updated CLI to support virtual output creation and removal commands. - Added documentation for virtual outputs in the wiki.
…ut integration - Introduced support for virtual outputs in the headless backend, allowing for dynamic creation and removal of outputs. - Implemented a new `VirtualOutputMarker` to identify virtual outputs and manage their state. - Added functionality to apply configuration changes to managed virtual outputs based on the provided config. - Integrated libinput plugin system initialization for headless backend, enabling input handling. - Enhanced rendering logic to accommodate virtual outputs, ensuring proper frame callback delivery. - Refactored existing code to improve modularity and maintainability, including the extraction of libinput plugin initialization into a separate module. - Updated the TTY backend to mirror virtual outputs and handle IPC communication for them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed there has been significant interest in virtual output support (discussed in #714 and #3101), so I'd like to share this implementation I've been working on :)
I took some inspiration from Sway's headless output approach (as mentioned in #3101) for certain parts. The feature supports both the headless backend (running niri with no physical monitor at all) and the TTY backend (creating virtual outputs alongside physical displays) , and outputs can be created, removed, and configured via IPC or config.kdl.
Some of the use cases, which were brought up in those discussions are: Sunshine/Moonlight streaming via wlr-screencopy, VNC with tools like wayvnc, headless remote sessions over SSH, and concurrent independent streaming sessions.
The video below shows two independent users, each running their own niri headless session and Sunshine instance, with multiple virtual outputs created per session. I've also opened a PR to Sunshine (LizardByte/Sunshine#4954) that enables input isolation between concurrent Sunshine instances, which makes this setup fully usable :)
Please test and report any issues or suggestions
virtual-outputs.mp4