diff --git a/quickshell/Modals/DankLauncherV2/Controller.qml b/quickshell/Modals/DankLauncherV2/Controller.qml index ea076a7b9..90fe1f767 100644 --- a/quickshell/Modals/DankLauncherV2/Controller.qml +++ b/quickshell/Modals/DankLauncherV2/Controller.qml @@ -449,7 +449,12 @@ Item { searchQuery = query; requestSearch(); - if (searchMode !== "plugins" && query.startsWith("/")) { + if (autoSwitchedToFiles && !query.startsWith("/")) { + restorePreviousMode(); + return; + } + + if (query.startsWith("/")) { var prefix = Utils.parseFileSearchPrefix(query); var explicitType = prefix && prefix.type !== null ? prefix.type : null; var targetType = explicitType !== null ? explicitType : (SessionData.launcherLastFileSearchType || "all"); diff --git a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalStandalone.qml b/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalStandalone.qml index 39747f749..e9ddd3cc8 100644 --- a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalStandalone.qml +++ b/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalStandalone.qml @@ -174,9 +174,12 @@ Item { spotlightContent.controller.selectedFlatIndex = 0; spotlightContent.controller.selectedItem = null; spotlightContent.controller.historyIndex = -1; - spotlightContent.controller.searchQuery = targetQuery; - - spotlightContent.controller.performSearch(); + if (targetQuery) { + spotlightContent.controller.setSearchQuery(targetQuery); + } else { + spotlightContent.controller.searchQuery = ""; + spotlightContent.controller.performSearch(); + } } if (spotlightContent.resetScroll) { spotlightContent.resetScroll(); @@ -271,7 +274,7 @@ Item { target: spotlightContent?.controller ?? null function onModeChanged(mode, userInitiated) { - if (!userInitiated || !SettingsData.rememberLastMode || (mode !== "all" && mode !== "apps")) + if (!userInitiated || !SettingsData.rememberLastMode) return; SessionData.setLauncherLastMode(mode); }