From f50a65d125fee8fc074715e9b57f250f849af230 Mon Sep 17 00:00:00 2001 From: princearia Date: Fri, 17 Jul 2026 14:29:26 +0200 Subject: [PATCH] Feature: Added support for PrismLauncher forks, notably FreesmLauncher --- prismlauncher-instances/plugin.toml | 11 +++++++++-- prismlauncher-instances/prismlauncher-instances.luau | 11 +++++++++-- prismlauncher-instances/translations/en.json | 4 ++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/prismlauncher-instances/plugin.toml b/prismlauncher-instances/plugin.toml index 75fa0b8..8986efd 100644 --- a/prismlauncher-instances/plugin.toml +++ b/prismlauncher-instances/plugin.toml @@ -1,13 +1,13 @@ id = "radimous/prismlauncher-instances" name = "PrismLauncher Instances" -version = "1.0.0" +version = "1.0.1" plugin_api = 3 author = "radimous" license = "MIT" dependencies = ["prismlauncher"] icon = "nut" deprecated = false -description = "A launcher provider that adds PrismLauncher instances to the noctalia launcher." +description = "A launcher provider that adds PrismLauncher and PrismLauncher fork instances to the noctalia launcher." tags = ["gaming", "launcher"] [[launcher_provider]] @@ -24,3 +24,10 @@ type = "string" label_key = "settings.prismlauncher_path.label" description_key = "settings.prismlauncher_path.description" default = "~/.local/share/PrismLauncher" + +[[setting]] +key = "launcher_exec_command" +type = "string" +label_key = "settings.launcher_exec_command.label" +description_key = "settings.launcher_exec_command.description" +default = "prismlauncher" \ No newline at end of file diff --git a/prismlauncher-instances/prismlauncher-instances.luau b/prismlauncher-instances/prismlauncher-instances.luau index 59331c0..865c885 100644 --- a/prismlauncher-instances/prismlauncher-instances.luau +++ b/prismlauncher-instances/prismlauncher-instances.luau @@ -5,10 +5,15 @@ local function getPrismPath() return noctalia.expandPath(prismPath) end +local function getLauncherCommand() + local launcherCommand = noctalia.getConfig("launcher_exec_command") + return noctalia.expandPath(launcherCommand) +end + local function getInstancesDir() local prismPath = getPrismPath() - local configuredInstanceDir = getCfgValue(prismPath .. "/prismlauncher.cfg", "InstanceDir") + local configuredInstanceDir = getCfgValue(prismPath .. "/*.cfg", "InstanceDir") local instances if configuredInstanceDir == nil then -- default path @@ -91,8 +96,10 @@ local function shellQuote(s) end function onActivate(id) + local launcherCommand = getLauncherCommand() + if id == "" then return end - noctalia.runAsync(string.format("prismlauncher --launch %s &>/dev/null", shellQuote(id))) + noctalia.runAsync(string.format(launcherCommand .. " --launch %s &>/dev/null", shellQuote(id))) end -- doesn't handle icons that were changed to different default icon, rest is fine diff --git a/prismlauncher-instances/translations/en.json b/prismlauncher-instances/translations/en.json index b8e4959..087c092 100644 --- a/prismlauncher-instances/translations/en.json +++ b/prismlauncher-instances/translations/en.json @@ -3,6 +3,10 @@ "prismlauncher_path": { "label": "PrismLauncher path", "description": "Path to PrismLauncher" + }, + "launcher_exec_command": { + "label": "Prism Executable", + "description": "Start Prismlauncher or fork of choice" } }, "no_instances": {