From 1d39853937cf94464d11b5e26e8148aa9881125a Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 8 Oct 2026 14:12:51 +0100 Subject: [PATCH] Add moonlight launch option --- launcher/actions.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/launcher/actions.py b/launcher/actions.py index 30b357b..da063bf 100644 --- a/launcher/actions.py +++ b/launcher/actions.py @@ -14,6 +14,8 @@ class ActionDispatcher: self._run_command(config['cmd'].split()) elif service_type == "power": self._handle_power_action(config) + elif service_type == "moonlight": + seld._launch_moonlight(config) else: print(f"Service type: {service_type}, not known") @@ -97,6 +99,19 @@ class ActionDispatcher: self._run_command(cmd) + def _launch_moonlight(self, config): + cmd = ["flatpak", "run", "com.moonlight_stream.Moonlight"] + + app_name = config.get("app") + if app_name: + # Launch directly into a specific app stream + cmd.extend(["stream", config["target"], app_name]) + else: + # Open the GUI directly to the host's app selection page + cmd.append(config["target"]) + + self._run_command(cmd) + def _handle_power_action(self, action): if action == "shutdown": print("Initiating system shutdown")