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:
commit
f55af1b68b
1 changed files with 3 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue