mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-05 21:15:38 -05:00
Refresh app list
This commit is contained in:
@@ -12,20 +12,30 @@ Singleton {
|
||||
property var applicationsByName: ({})
|
||||
property var applicationsByExec: ({})
|
||||
property bool ready: false
|
||||
property int refreshInterval: 10000
|
||||
|
||||
Timer {
|
||||
id: refreshTimer
|
||||
interval: root.refreshInterval
|
||||
repeat: true
|
||||
running: true
|
||||
onTriggered: root.refreshApplications()
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
loadApplications()
|
||||
}
|
||||
|
||||
function refreshApplications() {
|
||||
loadApplications()
|
||||
}
|
||||
|
||||
function loadApplications() {
|
||||
var allApps = Array.from(DesktopEntries.applications.values)
|
||||
|
||||
// Debug: Check what properties are available
|
||||
if (allApps.length > 0) {
|
||||
var firstApp = allApps[0]
|
||||
console.log("AppSearchService: Sample DesktopEntry properties:")
|
||||
console.log(" name:", firstApp.name)
|
||||
console.log(" id:", firstApp.id)
|
||||
if (firstApp.exec !== undefined) console.log(" exec:", firstApp.exec)
|
||||
if (firstApp.execString !== undefined) console.log(" execString:", firstApp.execString)
|
||||
if (firstApp.executable !== undefined) console.log(" executable:", firstApp.executable)
|
||||
|
||||
Reference in New Issue
Block a user