#!/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:
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
#!/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
Only two spaces are needed: https://news.ycombinator.com/formatdoc
function trim { sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' }
#!/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.