diff options
Diffstat (limited to 'modules/launcher/services/Apps.qml')
| -rw-r--r-- | modules/launcher/services/Apps.qml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/launcher/services/Apps.qml b/modules/launcher/services/Apps.qml new file mode 100644 index 0000000..d561d15 --- /dev/null +++ b/modules/launcher/services/Apps.qml @@ -0,0 +1,25 @@ +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", "--", "foot", `${Quickshell.configDir}/assets/wrap_term_launch.sh`, ...entry.command], + workingDirectory: entry.workingDirectory + }); + else + Quickshell.execDetached({ + command: ["app2unit", "--", ...entry.command], + workingDirectory: entry.workingDirectory + }); + } +} |