#!/bin/bash
swaymsg create_output OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"')
# No need to reduce res, it defualts to 1080p #swaymsg output "$OUTPUT" resolution 1280x720
wl-mirror "$OUTPUT"
swaymsg output "$OUTPUT" unplug
When I was still in X11 land I used to just use Xephyr.
Fixed:
#!/bin/bash
swaymsg create_output
OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"')
# No need to reduce res, it defualts to 1080p
# swaymsg output "$OUTPUT" resolution 1280x720
wl-mirror "$OUTPUT"
swaymsg output "$OUTPUT" unplug
#!/bin/bash
swaymsg create_output
OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"')
# No need to reduce res, it defualts to 1080p
# swaymsg output "$OUTPUT" resolution 1280x720
wl-mirror "$OUTPUT"
swaymsg output "$OUTPUT" unplugOnly two spaces are needed: https://news.ycombinator.com/formatdoc
function trim {
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
}
/end sarcasm swaymsg output "MY-MONITOR" scale 2 # or 1 for exec_after
With that, everything puffs up big and readable when I'm screensharing and seamlessly shrinks back down when I stop screen sharing. No need to juggle windows around to different displays.[0] https://man.archlinux.org/man/extra/xdg-desktop-portal-wlr/x...
That said, with both the X nesting approach and the Wayland nesting approach, you'd also need to run the screencasting application itself inside the nested server, not the just the application you want to cast. If the compositor supports a way to create headless outputs (as sway and hyprland do) that is much easier.
Available May 2020, https://github.com/any1/wayvnc/issues/7#issuecomment-6256611...