zach's nutty qmlformat

This commit is contained in:
2026-02-25 23:01:52 +01:00
parent f5a0b763d5
commit 7e3109f758
8 changed files with 346 additions and 230 deletions
+38
View File
@@ -0,0 +1,38 @@
FileView {
id: watcher
path: configPath
property string name: gifItem.fileBaseName + ".json"
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet/"
property string configPath: configDir + name
onLoaded: {
if ( gifSaved.zIndex === -1 ) gifSaved.zIndex = gifItem.index
gifItem.x = gifSaved.positionX
gifItem.y = gifSaved.positionY
gifItem.loaded = true
}
onLoadFailed: {
gifSaved.zIndex = gifItem.index
writeAdapter()
gifItem.loaded = true
}
watchChanges: true
onFileChanged: reload()
onAdapterUpdated: writeAdapter()
JsonAdapter {
id: gifSaved
property real scaling: 1
property int positionX: 0
property int positionY: 0
property int zIndex: -1
}
}
}