search: allow hiding actions when the prefix is not that of them

Co-Authored-By: reakjra <85903730+reakjra@users.noreply.github.com>
This commit is contained in:
end-4
2025-08-21 09:23:03 +07:00
parent 955a7696f1
commit ce25675f73
2 changed files with 6 additions and 3 deletions
@@ -266,6 +266,7 @@ Singleton {
property list<string> 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: ":"
@@ -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;
}