mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
feat: (Launcher/Spotlight): Updated w/New Settings & QOL features
- New Spotlight toggle to show/hide chips, off by default - Updated blur effects on all launcher inputs and footers - Fixed previous queries resurfacing - Upated Spotlight keyboard navigation - Added functionality to show and shortcut to keybinds from the Launcher tab
This commit is contained in:
@@ -9,6 +9,7 @@ import qs.Services
|
||||
Singleton {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("AppSearchService")
|
||||
property int refCount: 0
|
||||
|
||||
property var applications: []
|
||||
property var _cachedCategories: null
|
||||
@@ -297,11 +298,11 @@ Singleton {
|
||||
function getBuiltInLauncherItems(pluginId, query) {
|
||||
if (pluginId === "dms_clipboard_search") {
|
||||
const trimmed = (query || "").toString().trim();
|
||||
const entries = ClipboardService.getCachedLauncherSearchEntries(trimmed, 20);
|
||||
const entries = ClipboardService.internalEntries.length > 0 ? ClipboardService.getLauncherEntries(trimmed, 20, 0) : ClipboardService.getCachedLauncherSearchEntries(trimmed, 20);
|
||||
return entries.map(entry => ({
|
||||
type: "clipboard",
|
||||
data: entry
|
||||
}));
|
||||
type: "clipboard",
|
||||
data: entry
|
||||
}));
|
||||
}
|
||||
|
||||
if (pluginId !== "dms_settings_search")
|
||||
|
||||
@@ -463,6 +463,24 @@ Singleton {
|
||||
return _flatCache;
|
||||
}
|
||||
|
||||
function keysForAction(actionId) {
|
||||
if (!actionId)
|
||||
return [];
|
||||
for (let i = 0; i < _flatCache.length; i++) {
|
||||
const group = _flatCache[i];
|
||||
if (!group || group.action !== actionId || !Array.isArray(group.keys))
|
||||
continue;
|
||||
const keys = [];
|
||||
for (let k = 0; k < group.keys.length; k++) {
|
||||
const key = group.keys[k]?.key || "";
|
||||
if (key)
|
||||
keys.push(key);
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function saveBind(originalKey, bindData) {
|
||||
if (!bindData.key || !Actions.isValidAction(bindData.action))
|
||||
return;
|
||||
|
||||
@@ -205,6 +205,8 @@ Singleton {
|
||||
}
|
||||
|
||||
function launchDesktopEntry(desktopEntry, useNvidia) {
|
||||
if (!desktopEntry || !desktopEntry.command)
|
||||
return;
|
||||
let cmd = desktopEntry.command;
|
||||
|
||||
const appId = desktopEntry.id || desktopEntry.execString || desktopEntry.exec || "";
|
||||
@@ -261,6 +263,8 @@ Singleton {
|
||||
}
|
||||
|
||||
function launchDesktopAction(desktopEntry, action, useNvidia) {
|
||||
if (!desktopEntry || !action || !action.command)
|
||||
return;
|
||||
let cmd = action.command;
|
||||
|
||||
const appId = desktopEntry.id || desktopEntry.execString || desktopEntry.exec || "";
|
||||
|
||||
Reference in New Issue
Block a user