refractor xdg dirs

This commit is contained in:
end-4
2025-05-16 16:02:05 +02:00
parent 9a68f80ffa
commit 8daa1702d0
12 changed files with 28 additions and 17 deletions
@@ -1,6 +1,7 @@
pragma Singleton
pragma ComponentBehavior: Bound
import "root:/modules/common"
import QtQuick
import Quickshell
import Quickshell.Io
@@ -9,10 +10,10 @@ import Qt.labs.platform
Singleton {
id: root
property var filePath: `${StandardPaths.standardLocations(StandardPaths.CacheLocation)[0]}/notifications/notifications.json`
property var filePath: `${XdgDirectories.cache}/notifications/notifications.json`
property var list: []
// Quickshell's notification IDs starts at 1 on each run, while saved notifications
// can already contain higher IDs. This is a workaround to avoid id collisions
// can already contain higher IDs. This is for avoiding id collisions
property int idOffset
signal initDone();