feat: --login-item launch argument for headless nodes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main
Samuel Zielke 2 days ago
parent dc10a13e5c
commit d9b8e46335

@ -40,12 +40,20 @@ final class Coordinator {
outputs.applyLaunchRoutes() outputs.applyLaunchRoutes()
audio.applyLaunchRoutes() audio.applyLaunchRoutes()
applyLoginItemArgument()
statusTimer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { [weak self] _ in statusTimer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { [weak self] _ in
MainActor.assumeIsolated { self?.sendStatus() } MainActor.assumeIsolated { self?.sendStatus() }
} }
} }
/// `--login-item on|off`: set up a headless node over SSH, where the settings window is hidden behind outputs.
private func applyLoginItemArgument(_ arguments: [String] = ProcessInfo.processInfo.arguments) {
guard let index = arguments.firstIndex(of: "--login-item"), index + 1 < arguments.count else { return }
settings.launchAtLogin = arguments[index + 1] == "on"
Log.ndi.info("Launch at login: \(self.settings.launchAtLogin ? "on" : "off", privacy: .public)")
}
/// (Re)starts the Bonjour side that fits the role; call after role or interface changes. /// (Re)starts the Bonjour side that fits the role; call after role or interface changes.
func startRemote() async { func startRemote() async {
nodeServer?.stop() nodeServer?.stop()

Loading…
Cancel
Save

Powered by TurnKey Linux.