Merge pull request #29 from MrDowntempo/Launch-TUI-apps

Feat: If applications have a runInTerminal flag, attempts to determine the appropriate terminal emulator to launch it with
This commit is contained in:
Lysec
2025-07-19 16:18:52 +02:00
committed by GitHub
+3
View File
@@ -143,12 +143,15 @@ PanelWithOverlay {
return;
var modelData = filteredApps[selectedIndex];
const termEmu = Quickshell.env("TERMINAL") || Quickshell.env("TERM_PROGRAM") || none;
if (modelData.isCalculator) {
Qt.callLater(function () {
Quickshell.clipboardText = String(modelData.result);
Quickshell.execDetached(["notify-send", "Calculator Result", `${modelData.expr} = ${modelData.result} (copied to clipboard)`]);
});
} else if (modelData.runInTerminal && termEmu){
Quickshell.execDetached([termEmu, "-e", modelData.execString.trim()]);
} else if (modelData.execute) {
modelData.execute();
} else {