From ff1509939a4ea51305398abff0b799c77e99cf43 Mon Sep 17 00:00:00 2001 From: loner <2788892716@qq.com> Date: Sat, 27 Sep 2025 11:29:57 +0800 Subject: [PATCH] test kitty --- Modules/Launcher/Plugins/ApplicationsPlugin.qml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Modules/Launcher/Plugins/ApplicationsPlugin.qml b/Modules/Launcher/Plugins/ApplicationsPlugin.qml index 46d83094..36847501 100644 --- a/Modules/Launcher/Plugins/ApplicationsPlugin.qml +++ b/Modules/Launcher/Plugins/ApplicationsPlugin.qml @@ -137,10 +137,19 @@ Item { Quickshell.execDetached(["app2unit", "--", app.id + ".desktop"]) else Quickshell.execDetached(["app2unit", "--"].concat(app.command)) - } else if (app.execute) { - app.execute() } else { - Logger.log("ApplicationsPlugin", `Could not launch: ${app.name}`) + // Fallback logic when app2unit is not used + if (app.runInTerminal) { + // If app.execute() fails for terminal apps, we handle it manually. + Logger.log("ApplicationsPlugin", "Executing terminal app manually: " + app.name) + const command = ["kitty", "-e"].concat(app.command) + Quickshell.execDetached(command) + } else if (app.execute) { + // Default execution for GUI apps + app.execute() + } else { + Logger.log("ApplicationsPlugin", `Could not launch: ${app.name}. No valid launch method.`) + } } } }