launcher: better app launch
More foolproof (hopefully) Also set working directory correctly
This commit is contained in:
parent
c34589a23d
commit
5455cc3af5
2 changed files with 13 additions and 4 deletions
5
assets/wrap_term_launch.sh
Executable file
5
assets/wrap_term_launch.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
cat ~/.local/state/caelestia/sequences.txt 2>/dev/null
|
||||
|
||||
exec "$@"
|
||||
|
|
@ -12,10 +12,14 @@ Searcher {
|
|||
|
||||
function launch(entry: DesktopEntry): void {
|
||||
if (entry.runInTerminal)
|
||||
Quickshell.execDetached(["app2unit", "--", "foot", "fish", "-C", entry.execString]);
|
||||
else if (entry.execString.startsWith("sh -c"))
|
||||
Quickshell.execDetached(["sh", "-c", `app2unit -- ${entry.execString}`]);
|
||||
Quickshell.execDetached({
|
||||
command: ["app2unit", "--", "foot", `${Quickshell.configDir}/assets/wrap_term_launch.sh`, ...entry.command],
|
||||
workingDirectory: entry.workingDirectory
|
||||
});
|
||||
else
|
||||
Quickshell.execDetached(["sh", "-c", `app2unit -- '${entry.id}.desktop' || app2unit -- ${entry.execString}`]);
|
||||
Quickshell.execDetached({
|
||||
command: ["app2unit", "--", ...entry.command],
|
||||
workingDirectory: entry.workingDirectory
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue