25 lines
793 B
QML
25 lines
793 B
QML
pragma Singleton
|
|
|
|
import qs.config
|
|
import qs.utils
|
|
import Quickshell
|
|
|
|
Searcher {
|
|
id: root
|
|
|
|
list: DesktopEntries.applications.values.filter(a => !a.noDisplay).sort((a, b) => a.name.localeCompare(b.name))
|
|
useFuzzy: Config.launcher.useFuzzy.apps
|
|
|
|
function launch(entry: DesktopEntry): void {
|
|
if (entry.runInTerminal)
|
|
Quickshell.execDetached({
|
|
command: ["app2unit", "--", ...Config.general.apps.terminal, `${Quickshell.shellDir}/assets/wrap_term_launch.sh`, ...entry.command],
|
|
workingDirectory: entry.workingDirectory
|
|
});
|
|
else
|
|
Quickshell.execDetached({
|
|
command: ["app2unit", "--", ...entry.command],
|
|
workingDirectory: entry.workingDirectory
|
|
});
|
|
}
|
|
}
|