summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorWilliam (Liam) Snow IV <mail@liamsnow.com>2025-07-03 00:08:25 -0400
committerGitHub <noreply@github.com>2025-07-03 14:08:25 +1000
commitb053130570c40c19c124d409d7843ad825312525 (patch)
treea4fbdd101ac013fdac587c39d514318763a3e28f /services
parentinternal: set default bpm to 1 (diff)
downloadcaelestia-shell-b053130570c40c19c124d409d7843ad825312525.tar.gz
caelestia-shell-b053130570c40c19c124d409d7843ad825312525.tar.bz2
caelestia-shell-b053130570c40c19c124d409d7843ad825312525.zip
feat: fahrenheit option for weather (#189)
* Added Fahrenheit to Weather Service * some fixes Allow for hot reloading config opt Add opt to example config --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Diffstat (limited to 'services')
-rw-r--r--services/Weather.qml6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/Weather.qml b/services/Weather.qml
index ad80e48..ae0e0b6 100644
--- a/services/Weather.qml
+++ b/services/Weather.qml
@@ -11,7 +11,8 @@ Singleton {
property string loc
property string icon
property string description
- property real temperature
+ property string tempC: "0°C"
+ property string tempF: "0°F"
function reload(): void {
if (Config.dashboard.weatherLocation)
@@ -27,7 +28,8 @@ Singleton {
const json = JSON.parse(text).current_condition[0];
icon = Icons.getWeatherIcon(json.weatherCode);
description = json.weatherDesc[0].value;
- temperature = parseFloat(json.temp_C);
+ tempC = `${parseFloat(json.temp_C)}°C`;
+ tempF = `${parseFloat(json.temp_F)}°F`;
})
Component.onCompleted: reload()