2025-12-28 13:25:31 +01:00
|
|
|
pragma ComponentBehavior: Bound
|
|
|
|
|
pragma Singleton
|
|
|
|
|
import QtQuick
|
2026-01-04 12:43:20 +01:00
|
|
|
import Quickshell
|
2026-01-05 15:22:29 +01:00
|
|
|
import Quickshell.Io
|
2025-12-28 13:25:31 +01:00
|
|
|
|
2026-01-05 15:22:29 +01:00
|
|
|
Singleton {
|
2025-12-31 01:37:27 +01:00
|
|
|
property alias currentWall: jsonAdapter.currentWall
|
|
|
|
|
property alias font: jsonAdapter.font
|
|
|
|
|
property alias fontSize: jsonAdapter.fontSize
|
|
|
|
|
property alias wallDir: jsonAdapter.wallDir
|
2026-01-06 15:10:35 +01:00
|
|
|
onCurrentWallChanged: settingsView.writeAdapter()
|
|
|
|
|
onWallDirChanged: settingsView.writeAdapter()
|
|
|
|
|
onFontChanged: {
|
|
|
|
|
Quickshell.reload();
|
|
|
|
|
settingsView.writeAdapter();
|
|
|
|
|
}
|
|
|
|
|
onFontSizeChanged: settingsView.writeAdapter()
|
|
|
|
|
|
2026-01-05 15:22:29 +01:00
|
|
|
FileView {
|
|
|
|
|
id: settingsView
|
|
|
|
|
path: "/home/lucy/.config/quickshell/modules/settings/config.json"
|
|
|
|
|
|
|
|
|
|
watchChanges: true
|
|
|
|
|
onAdapterChanged: reload()
|
|
|
|
|
onAdapterUpdated: reload()
|
|
|
|
|
|
|
|
|
|
adapter: JsonAdapter {
|
|
|
|
|
id: jsonAdapter
|
|
|
|
|
property string currentWall: ""
|
|
|
|
|
property string wallDir: "/home/lucy/.walls/"
|
2026-01-13 12:12:16 +01:00
|
|
|
property string font: "Google Sans Code"
|
2026-01-06 15:10:35 +01:00
|
|
|
property real fontSize: 14
|
2026-01-05 15:22:29 +01:00
|
|
|
}
|
|
|
|
|
}
|
2025-12-28 13:25:31 +01:00
|
|
|
}
|