Feature: Add compatibility for kotor
This commit is contained in:
26
dotfiles/.config/sunshine/scripts/sunshine-games.sh
Executable file
26
dotfiles/.config/sunshine/scripts/sunshine-games.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# Sunshine global_prep_cmd: make games launched during a stream open on the
|
||||
# headless stream output instead of whichever physical monitor had focus.
|
||||
# start -> enable the "sunshine-games" Hyprland window rule (layout/windowrules.lua:
|
||||
# steam_app_* -> workspace 9 on HEADLESS-1, fullscreen) and make
|
||||
# HEADLESS-1 the XWayland primary output, which Wine/Proton uses for
|
||||
# fullscreen mode changes and scaling
|
||||
# stop -> disable the rule and clear the primary output again
|
||||
# Games that pick their render size at launch (KOTOR etc.) otherwise come up
|
||||
# on a desk monitor and stay tiny in a corner when moved to the stream.
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
hyprctl eval 'SunshineGamesRule:set_enabled(true)'
|
||||
xrandr --output HEADLESS-1 --primary 2>/dev/null
|
||||
;;
|
||||
stop)
|
||||
hyprctl eval 'SunshineGamesRule:set_enabled(false)'
|
||||
xrandr --noprimary 2>/dev/null
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 start|stop" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
@@ -2,4 +2,4 @@ audio_sink = sink-sunshine-stereo
|
||||
csrf_allowed_origins = https://xol.twhomelab.local:47990
|
||||
nvenc_preset = 4
|
||||
output_name = HEADLESS-1
|
||||
global_prep_cmd = [{"do":"/home/thomas/.config/hypr/scripts/SunshineIdle.sh start","undo":"/home/thomas/.config/hypr/scripts/SunshineIdle.sh stop"}]
|
||||
global_prep_cmd = [{"do":"/home/thomas/.config/hypr/scripts/SunshineIdle.sh start","undo":"/home/thomas/.config/hypr/scripts/SunshineIdle.sh stop"},{"do":"/home/thomas/.config/sunshine/scripts/sunshine-games.sh start","undo":"/home/thomas/.config/sunshine/scripts/sunshine-games.sh stop"}]
|
||||
|
||||
Reference in New Issue
Block a user