sunshine: size the virtual output to the client

The work laptop drives two 3840x2160 panels, so a fixed 1920x1080 capture
was being upscaled 2x on the client — fine for Big Picture's large UI,
visibly soft for terminal text on the Desktop app.

A headless wlroots output has no physical size, so it can take any mode.
Both apps now set HEADLESS-1 to SUNSHINE_CLIENT_WIDTH/HEIGHT/FPS in their
prep-cmd and restore 1920x1080 on undo. SWAYSOCK joins the environment
import so Sunshine's prep-cmds can reach the compositor at all.
This commit is contained in:
connor committed 2026-09-14 16:28:32 -04:00
1 parent 2a2e94cc71
commit eb6a42c4d7
2 files changed
+13 -7

No files matched your search

+12 -6
View File
@@ -5,19 +5,25 @@
"apps": [
{
"name": "Desktop",
"image-path": "desktop.png"
"image-path": "desktop.png",
"prep-cmd": [
{
"do": "swaymsg output HEADLESS-1 mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz",
"undo": "swaymsg output HEADLESS-1 mode 1920x1080@60Hz"
}
]
},
{
"name": "Steam Big Picture",
"image-path": "steam.png",
"detached": [
"setsid steam -gamepadui"
],
"prep-cmd": [
{
"do": "",
"undo": "setsid steam -shutdown"
"do": "swaymsg output HEADLESS-1 mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz",
"undo": "swaymsg output HEADLESS-1 mode 1920x1080@60Hz"
}
],
"detached": [
"setsid steam -gamepadui"
]
}
]