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:
1 parent
2a2e94cc71
commit
eb6a42c4d7
2 files changed
+13
-7
No files matched your search
@@ -5,19 +5,25 @@
|
|||||||
"apps": [
|
"apps": [
|
||||||
{
|
{
|
||||||
"name": "Desktop",
|
"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",
|
"name": "Steam Big Picture",
|
||||||
"image-path": "steam.png",
|
"image-path": "steam.png",
|
||||||
"detached": [
|
|
||||||
"setsid steam -gamepadui"
|
|
||||||
],
|
|
||||||
"prep-cmd": [
|
"prep-cmd": [
|
||||||
{
|
{
|
||||||
"do": "",
|
"do": "swaymsg output HEADLESS-1 mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz",
|
||||||
"undo": "setsid steam -shutdown"
|
"undo": "swaymsg output HEADLESS-1 mode 1920x1080@60Hz"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"detached": [
|
||||||
|
"setsid steam -gamepadui"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ xwayland force
|
|||||||
# DISPLAY to the apps it launched. Steam then failed with "Unable to open a
|
# DISPLAY to the apps it launched. Steam then failed with "Unable to open a
|
||||||
# connection to X" even though Xwayland was up and the manager environment was
|
# connection to X" even though Xwayland was up and the manager environment was
|
||||||
# correct.
|
# correct.
|
||||||
exec systemctl --user import-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP && systemctl --user start sunshine.service
|
exec systemctl --user import-environment WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP && systemctl --user start sunshine.service
|
||||||
|
|
||||||
# Input arrives from the Moonlight client, so keybinds are worth having even
|
# Input arrives from the Moonlight client, so keybinds are worth having even
|
||||||
# though nobody is sitting at this machine. Without them the Desktop app
|
# though nobody is sitting at this machine. Without them the Desktop app
|
||||||
|
|||||||
Reference in new issue
Block a user