diff options
Diffstat (limited to 'appearance')
| -rw-r--r-- | appearance/Hyprsunset.qml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/appearance/Hyprsunset.qml b/appearance/Hyprsunset.qml index acfc365..ea389fd 100644 --- a/appearance/Hyprsunset.qml +++ b/appearance/Hyprsunset.qml @@ -31,6 +31,7 @@ Singleton { property string lon: "" property bool autoDetect: true property string daemonCommand: "hyprsunset" + property string cachePathRaw: "~/.config/hyprsunset-qt/sun.json" property string cachePath: `${home}/.config/hyprsunset-qt/sun.json` property string notice: "" property string sunSummary: "" @@ -190,7 +191,8 @@ profile { root.lat = c["location.lat"] ?? ""; root.lon = c["location.lon"] ?? ""; root.autoDetect = (c["location.auto_detect"] ?? "true") === "true"; - root.cachePath = root.expandTilde(c["cache.path"] ?? "~/.config/hyprsunset-qt/sun.json"); + root.cachePathRaw = c["cache.path"] ?? "~/.config/hyprsunset-qt/sun.json"; + root.cachePath = root.expandTilde(root.cachePathRaw); root.daemonCommand = c["daemon.command"] ?? "hyprsunset"; } } @@ -203,7 +205,7 @@ profile { function appConfText() { return `[location]\nlat = ${root.lat}\nlon = ${root.lon}\n` + `auto_detect = ${root.autoDetect}\n\n` + - `[cache]\npath = ~/.config/hyprsunset-qt/sun.json\n\n` + + `[cache]\npath = ${root.cachePathRaw}\n\n` + `[daemon]\ncommand = ${root.daemonCommand}\n\n`; } function saveSettings() { appFile.setText(root.appConfText()); } |
