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