From e45ecf864ab748976d357f3f9aa60f429b1370da Mon Sep 17 00:00:00 2001 From: zach Date: Sat, 18 Apr 2026 00:45:19 +0200 Subject: [PATCH] fix launcher for non-uwsm --- Config/Config.qml | 1 + Config/Launcher.qml | 1 + Modules/Launcher/Services/Apps.qml | 7 +++++-- Modules/Settings/Categories/Launcher.qml | 21 +++++++++++++++------ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Config/Config.qml b/Config/Config.qml index c0ca873..9d67806 100644 --- a/Config/Config.qml +++ b/Config/Config.qml @@ -206,6 +206,7 @@ Singleton { return { maxAppsShown: launcher.maxAppsShown, maxWallpapers: launcher.maxWallpapers, + uwsm: launcher.uwsm, actionPrefix: launcher.actionPrefix, specialPrefix: launcher.specialPrefix, useFuzzy: { diff --git a/Config/Launcher.qml b/Config/Launcher.qml index a195868..5ab58cc 100644 --- a/Config/Launcher.qml +++ b/Config/Launcher.qml @@ -91,6 +91,7 @@ JsonObject { property string specialPrefix: "@" property UseFuzzy useFuzzy: UseFuzzy { } + property bool uwsm: true component Sizes: JsonObject { property int itemHeight: 50 diff --git a/Modules/Launcher/Services/Apps.qml b/Modules/Launcher/Services/Apps.qml index 57a30b0..3d4446c 100644 --- a/Modules/Launcher/Services/Apps.qml +++ b/Modules/Launcher/Services/Apps.qml @@ -9,17 +9,20 @@ import qs.Paths Searcher { id: root + readonly property list command: Config.launcher.uwsm ? ["app2unit", "--"] : [] + function launch(entry: DesktopEntry): void { appDb.incrementFrequency(entry.id); + console.log(root.command); if (entry.runInTerminal) Quickshell.execDetached({ - command: ["app2unit", "--", ...Config.general.apps.terminal, `${Quickshell.shellDir}/assets/wrap_term_launch.sh`, ...entry.command], + command: [...root.command, ...Config.general.apps.terminal, `${Quickshell.shellDir}/assets/wrap_term_launch.sh`, ...entry.command], workingDirectory: entry.workingDirectory }); else Quickshell.execDetached({ - command: ["app2unit", "--", ...entry.command], + command: [...root.command, ...entry.command], workingDirectory: entry.workingDirectory }); } diff --git a/Modules/Settings/Categories/Launcher.qml b/Modules/Settings/Categories/Launcher.qml index 920bf91..15832a8 100644 --- a/Modules/Settings/Categories/Launcher.qml +++ b/Modules/Settings/Categories/Launcher.qml @@ -10,8 +10,8 @@ SettingsPage { } SettingSpinBox { - name: "Max apps shown" min: 1 + name: "Max apps shown" object: Config.launcher setting: "maxAppsShown" } @@ -20,8 +20,8 @@ SettingsPage { } SettingSpinBox { - name: "Max wallpapers shown" min: 1 + name: "Max wallpapers shown" object: Config.launcher setting: "maxWallpapers" } @@ -43,6 +43,15 @@ SettingsPage { object: Config.launcher setting: "specialPrefix" } + + Separator { + } + + SettingSwitch { + name: "Use UWSM launch command" + object: Config.launcher + setting: "uwsm" + } } SettingsSection { @@ -103,8 +112,8 @@ SettingsPage { } SettingSpinBox { - name: "Item width" min: 1 + name: "Item width" object: Config.launcher.sizes setting: "itemWidth" } @@ -113,8 +122,8 @@ SettingsPage { } SettingSpinBox { - name: "Item height" min: 1 + name: "Item height" object: Config.launcher.sizes setting: "itemHeight" } @@ -123,8 +132,8 @@ SettingsPage { } SettingSpinBox { - name: "Wallpaper width" min: 1 + name: "Wallpaper width" object: Config.launcher.sizes setting: "wallpaperWidth" } @@ -133,8 +142,8 @@ SettingsPage { } SettingSpinBox { - name: "Wallpaper height" min: 1 + name: "Wallpaper height" object: Config.launcher.sizes setting: "wallpaperHeight" }