1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-08 22:45:38 -05:00

Recently used apps

This commit is contained in:
bbedward
2025-07-12 21:47:02 -04:00
parent a6bc8d65e2
commit ed9af263fd
4 changed files with 208 additions and 11 deletions

View File

@@ -50,7 +50,20 @@ Singleton {
}
function saveRecentApps() {
recentAppsFileView.text = JSON.stringify(recentApps, null, 2)
var jsonData = JSON.stringify(recentApps, null, 2)
var process = Qt.createQmlObject('
import Quickshell.Io
Process {
command: ["sh", "-c", "echo \'' + jsonData.replace(/'/g, "'\"'\"'") + '\' > \'' + root.recentAppsFile + '\'"]
running: true
onExited: {
if (exitCode !== 0) {
console.warn("Failed to save recent apps:", exitCode)
}
destroy()
}
}
', root)
}
function addRecentApp(app) {