1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-10 07:25:37 -05:00

spotlight: danksearch integration (indexed file search)

This commit is contained in:
bbedward
2025-10-27 09:49:17 -04:00
parent 0ac5b7bc87
commit 79b23ca829
8 changed files with 1210 additions and 57 deletions

View File

@@ -20,10 +20,10 @@ DankModal {
open()
Qt.callLater(() => {
if (spotlightContent && spotlightContent.searchField) {
spotlightContent.searchField.forceActiveFocus()
}
})
if (spotlightContent && spotlightContent.searchField) {
spotlightContent.searchField.forceActiveFocus()
}
})
}
function showWithQuery(query) {
@@ -40,10 +40,10 @@ DankModal {
open()
Qt.callLater(() => {
if (spotlightContent && spotlightContent.searchField) {
spotlightContent.searchField.forceActiveFocus()
}
})
if (spotlightContent && spotlightContent.searchField) {
spotlightContent.searchField.forceActiveFocus()
}
})
}
function hide() {
@@ -58,6 +58,9 @@ DankModal {
spotlightContent.appLauncher.selectedIndex = 0
spotlightContent.appLauncher.setCategory(I18n.tr("All"))
}
if (spotlightContent.fileSearchController) {
spotlightContent.fileSearchController.reset()
}
if (spotlightContent.resetScroll) {
spotlightContent.resetScroll()
}
@@ -111,17 +114,17 @@ DankModal {
}
IpcHandler {
function open(): string {
function open(): string {
spotlightModal.show()
return "SPOTLIGHT_OPEN_SUCCESS"
}
function close(): string {
function close(): string {
spotlightModal.hide()
return "SPOTLIGHT_CLOSE_SUCCESS"
}
function toggle(): string {
function toggle(): string {
spotlightModal.toggle()
return "SPOTLIGHT_TOGGLE_SUCCESS"
}