mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-19 04:08:48 +00:00
22 lines
676 B
QML
22 lines
676 B
QML
pragma Singleton
|
|
|
|
import "root:/modules/common/functions/fuzzysort.js" as Fuzzy
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
|
|
Singleton {
|
|
id: root
|
|
|
|
readonly property list<DesktopEntry> list: DesktopEntries.applications.values.filter(a => !a.noDisplay).sort((a, b) => a.name.localeCompare(b.name))
|
|
readonly property list<var> preppedNames: list.map(a => ({
|
|
name: Fuzzy.prepare(a.name),
|
|
entry: a
|
|
}))
|
|
|
|
function fuzzyQuery(search: string): var { // Idk why list<DesktopEntry> doesn't work
|
|
return Fuzzy.go(search, preppedNames, {
|
|
all: true,
|
|
key: "name"
|
|
}).map(r => r.obj.entry);
|
|
}
|
|
}
|