Desktop lives on a persistent HEADLESS output that Sunshine captures; DP-1 mirrors it when present, so streaming works whether or not the physical monitor is on. Fixes workspace/window orphaning when the monitor powers off (the old 'HEADLESS mirrors DP-1' design collapsed when DP-1 disappeared). - bin/sunshine-headless-primary.sh: apply (idempotent topology + rescue), rescue (recenter off-screen floating windows), watch (self-heal on monitor add/remove and on windows that open off-screen). - bin/sunshine-prestart.sh: delegates to the manager's apply. - docs/HEADLESS-PRIMARY.md: full rationale + the ufw stale-subnet gotcha. Not yet wired into install.sh; configured directly on JARVIS via monitors.conf and autostart.conf (tracked in the dotfiles repo). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
14 lines
719 B
Bash
Executable File
14 lines
719 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Sunshine systemd ExecStartPre hook.
|
|
#
|
|
# As of 2026-07-27 this is a thin wrapper around the HEADLESS-PRIMARY manager,
|
|
# which is the single source of truth for the monitor/headless topology:
|
|
# - ensures exactly one persistent HEADLESS output exists (Sunshine's capture
|
|
# target) BEFORE Sunshine's startup encoder probe runs,
|
|
# - sizes it and mirrors DP-1 onto it when the physical monitor is present,
|
|
# - keeps sunshine.conf's output_name in sync with the live headless name.
|
|
#
|
|
# Non-fatal by design (the drop-in prefixes this with '-'): if Hyprland isn't
|
|
# reachable yet, the manager logs and returns 0 so Sunshine still starts.
|
|
exec "$(dirname "$0")/sunshine-headless-primary.sh" apply
|