Zach: I know everything about your life
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user