29 lines
532 B
QML
29 lines
532 B
QML
pragma Singleton
|
|
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
import QtQuick
|
|
|
|
|
|
Singleton {
|
|
id: root
|
|
property alias s: stateAdapter
|
|
property alias v: state
|
|
FileView {
|
|
id: state
|
|
path: Qt.resolvedUrl(Quickshell.shellDir + "/settings/state.json")
|
|
watchChanges: true
|
|
onLoadFailed: {
|
|
writeAdapter()
|
|
}
|
|
onAdapterUpdated: writeAdapter()
|
|
onFileChanged: reload()
|
|
adapter: JsonAdapter {
|
|
id: stateAdapter
|
|
property bool themeSwitcherVisible: false
|
|
}
|
|
|
|
}
|
|
Component.onCompleted: console.log("say gex")
|
|
|
|
}
|