From 4fe6ff22f6def77f30170c007c185685a13a9a2e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 16 Jun 2025 00:50:38 +1000 Subject: feat: configurable weather location Impls #76 --- services/Weather.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'services') 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 -- cgit v1.2.3-freya