Zach: I know everything about your life

This commit is contained in:
2025-12-03 23:22:59 +01:00
parent e9fab71e9d
commit cf55c79855
6 changed files with 35 additions and 79 deletions
+4 -33
View File
@@ -9,10 +9,7 @@ Singleton {
id: root
property alias gifFolder: adapter.gifFolder
property alias ready: root.loaded
property bool loaded: false
property string configDir: Quickshell.env("HOME") + "/.config/QtDesktopPet"
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet"
property string configPath: configDir + "/config.json"
signal folderChanged()
@@ -25,11 +22,9 @@ Singleton {
onExited: function( exitCode ) {
if (exitCode !== 0) {
dirCreate.running = true
} else {
fileCheck.running = true
}
}
}
}
}
Process {
id: dirCreate
@@ -38,31 +33,9 @@ Singleton {
onExited: function(): void {
console.log("Created config directory:", root.configDir)
fileCreate.running = true
}
}
Process {
id: fileCheck
running: false
command: ["test", "-f", root.configPath]
onExited: function( exitCode ): void {
if (exitCode !== 0) {
fileCreate.running = true
}
}
}
Process {
id: fileCreate
property string homeDir: Quickshell.env("HOME")
running: false
command: ["sh", "-c", `echo '{\"gifFolder\": \"${homeDir}/.config/quickshell/QtDesktopPet/Gifs\"}' > ` + root.configPath]
}
FileView {
id: watcher
path: root.configPath
@@ -71,12 +44,10 @@ Singleton {
onFileChanged: reload()
onLoaded: root.loaded = true
JsonAdapter {
id: adapter
property string gifFolder: ""
property string gifFolder: Quickshell.shellDir + "/Gifs"
}
}
}
+4 -3
View File
@@ -26,13 +26,14 @@ Repeater {
x: 0
y: Screen.height - height
width: gif.width
height: gif.height
width: Math.floor( gif.sourceSize.width / 2 )
height: Math.floor( gif.sourceSize.height / 2 )
AnimatedImage {
id: gif
source: gifItem.modelData
fillMode: Image.PreserveAspectFit
// fillMode: Image.PreserveAspectFit
anchors.fill: parent
}
Mouse {}