Feat: If applications have a runInTerminal flag, attempts to determine the appropriate terminal emulator to launch it with

This commit is contained in:
Corey Woodworth 2025-07-19 07:06:12 -04:00
parent 5cedce8309
commit 36c8e996ee

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 {