diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-16 00:50:38 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-16 00:50:38 +1000 |
| commit | 4fe6ff22f6def77f30170c007c185685a13a9a2e (patch) | |
| tree | 02f71d72eddc8c7a5391e44d03e41453e0aa6c25 /services | |
| parent | Merge pull request #52 from thaemisch/betteractions (diff) | |
| download | caelestia-shell-4fe6ff22f6def77f30170c007c185685a13a9a2e.tar.gz caelestia-shell-4fe6ff22f6def77f30170c007c185685a13a9a2e.tar.bz2 caelestia-shell-4fe6ff22f6def77f30170c007c185685a13a9a2e.zip | |
feat: configurable weather location
Impls #76
Diffstat (limited to 'services')
| -rw-r--r-- | services/Weather.qml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/Weather.qml b/services/Weather.qml index 4f53d0b..29858eb 100644 --- a/services/Weather.qml +++ b/services/Weather.qml @@ -1,8 +1,10 @@ pragma Singleton +import "root:/config" import "root:/utils" import Quickshell import Quickshell.Io +import QtQuick Singleton { id: root @@ -13,15 +15,18 @@ Singleton { property real temperature function reload(): void { - wttrProc.running = true; + if (Config.dashboard.weatherLocation) + loc = Config.dashboard.weatherLocation; + else + ipProc.running = true; } onLocChanged: wttrProc.running = true + Component.onCompleted: reload() Process { id: ipProc - running: true command: ["curl", "ipinfo.io"] stdout: StdioCollector { onStreamFinished: root.loc = JSON.parse(text).loc |