From ce25675f73e276b336907e79732d96bd343b3ded Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Thu, 21 Aug 2025 09:23:03 +0700 Subject: [PATCH] search: allow hiding actions when the prefix is not that of them Co-Authored-By: reakjra <85903730+reakjra@users.noreply.github.com> --- .config/quickshell/ii/modules/common/Config.qml | 1 + .config/quickshell/ii/modules/overview/SearchWidget.qml | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 0218319cf..dc4d2e8fc 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -266,6 +266,7 @@ Singleton { property list excludedSites: ["quora.com"] property bool sloppy: false // Uses levenshtein distance based scoring instead of fuzzy sort. Very weird. property JsonObject prefix: JsonObject { + property bool showDefaultActionsWithoutPrefix: true property string action: "/" property string clipboard: ";" property string emojis: ":" diff --git a/.config/quickshell/ii/modules/overview/SearchWidget.qml b/.config/quickshell/ii/modules/overview/SearchWidget.qml index cb3ca41c4..09ae87718 100644 --- a/.config/quickshell/ii/modules/overview/SearchWidget.qml +++ b/.config/quickshell/ii/modules/overview/SearchWidget.qml @@ -415,9 +415,11 @@ Item { // Wrapper result = result.concat(launcherActionObjects); /// Math result, command, web search /// - if (!startsWithShellCommandPrefix) result.push(commandResultObject); - if (!startsWithNumber && !startsWithMathPrefix) result.push(mathResultObject); - if (!startsWithWebSearchPrefix) result.push(webSearchResultObject); + if (Config.options.search.prefix.showDefaultActionsWithoutPrefix) { + if (!startsWithShellCommandPrefix) result.push(commandResultObject); + if (!startsWithNumber && !startsWithMathPrefix) result.push(mathResultObject); + if (!startsWithWebSearchPrefix) result.push(webSearchResultObject); + } return result; }