night light: use hyprsunset <- gammastep

This commit is contained in:
end-4
2025-07-23 09:00:31 +07:00
parent 3d5ed9401c
commit 574a2a11e7
7 changed files with 148 additions and 35 deletions
@@ -8,6 +8,7 @@ Singleton {
id: root
property string filePath: Directories.shellConfigPath
property alias options: configOptionsJsonAdapter
property bool ready: false
function setNestedValue(nestedKey, value) {
let keys = nestedKey.split(".");
@@ -41,10 +42,10 @@ Singleton {
FileView {
path: root.filePath
watchChanges: true
onFileChanged: reload()
onAdapterUpdated: writeAdapter()
onLoaded: root.ready = true
onLoadFailed: error => {
if (error == FileViewError.FileNotFound) {
writeAdapter();
@@ -171,6 +172,15 @@ Singleton {
}
}
property JsonObject light: JsonObject {
property JsonObject night: JsonObject {
property bool automatic: true
property string from: "19:00" // Format: "HH:mm", 24-hour time
property string to: "06:30" // Format: "HH:mm", 24-hour time
property int colorTemperature: 5000
}
}
property JsonObject networking: JsonObject {
property string userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
}