diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-03 14:26:51 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-03 14:26:51 +1000 |
| commit | 8af10012b9527e3e4a894e4a3c0fd8ea9ac0e132 (patch) | |
| tree | 799a2e04552377040541b9f07b36aa315b6cfe96 /services | |
| parent | winfo: fix kill button (diff) | |
| parent | feat: fahrenheit option for weather (#189) (diff) | |
| download | caelestia-shell-8af10012b9527e3e4a894e4a3c0fd8ea9ac0e132.tar.gz caelestia-shell-8af10012b9527e3e4a894e4a3c0fd8ea9ac0e132.tar.bz2 caelestia-shell-8af10012b9527e3e4a894e4a3c0fd8ea9ac0e132.zip | |
Merge branch 'main' of https://github.com/caelestia-dots/shell
Diffstat (limited to 'services')
| -rw-r--r-- | services/Weather.qml | 6 |
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() |