before it goes to ....
This commit is contained in:
+11
-11
@@ -1,6 +1,5 @@
|
||||
pragma Singleton
|
||||
|
||||
import QtCore
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
import Quickshell
|
||||
@@ -9,9 +8,6 @@ Singleton {
|
||||
id: root
|
||||
|
||||
property alias gifFolder: adapter.gifFolder
|
||||
property alias scaling: adapter.scaling
|
||||
property alias maxWidth: adapter.maxWidth
|
||||
property alias maxHeight: adapter.maxHeight
|
||||
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet"
|
||||
property string configPath: configDir + "/config.json"
|
||||
|
||||
@@ -20,22 +16,27 @@ Singleton {
|
||||
Process {
|
||||
id: dirCheck
|
||||
running: true
|
||||
command: ["test", "-d", root.configDir]
|
||||
command: [ "test", "-d", root.configDir ]
|
||||
|
||||
onExited: function( exitCode ) {
|
||||
if (exitCode !== 0) {
|
||||
if ( exitCode !== 0 ) {
|
||||
console.log( "creating dir" )
|
||||
dirCreate.running = true
|
||||
}
|
||||
if ( exitCode !== 1 ) {
|
||||
console.log( "creating config" )
|
||||
configCheck.running = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: dirCreate
|
||||
running: false
|
||||
command: ["mkdir", "-p", root.configDir]
|
||||
command: [ "mkdir", "-p", root.configDir ]
|
||||
|
||||
onExited: function(): void {
|
||||
console.log("Created config directory:", root.configDir)
|
||||
console.log( "Created config directory:", root.configDir )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,13 +48,12 @@ Singleton {
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
onAdapterUpdated: writeAdapter()
|
||||
|
||||
JsonAdapter {
|
||||
id: adapter
|
||||
|
||||
property string gifFolder: Quickshell.shellDir + "/Gifs"
|
||||
property var scaling: 1
|
||||
property int maxWidth: 1000
|
||||
property int maxHeight: 1000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user