From 7197f9ddfb9201510223399808748887216006ec Mon Sep 17 00:00:00 2001 From: Greyfeather Date: Sat, 3 Jan 2026 21:46:18 -0700 Subject: [PATCH 1/3] add last refresh timestamp to weather popup --- .../modules/ii/bar/weather/WeatherPopup.qml | 30 +++++++++++++++++++ .../quickshell/ii/services/Weather.qml | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/ii/bar/weather/WeatherPopup.qml b/dots/.config/quickshell/ii/modules/ii/bar/weather/WeatherPopup.qml index 85d9c1bac..f07f27c38 100644 --- a/dots/.config/quickshell/ii/modules/ii/bar/weather/WeatherPopup.qml +++ b/dots/.config/quickshell/ii/modules/ii/bar/weather/WeatherPopup.qml @@ -100,5 +100,35 @@ StyledPopup { value: Weather.data.sunset } } + + // Footer + ColumnLayout { + id: footer + Layout.alignment: Qt.AlignHCenter + spacing: 2 + + RowLayout { + Layout.alignment: Qt.AlignHCenter + spacing: 6 + + StyledText { + text: "Last Refresh:" + font { + weight: Font.Medium + pixelSize: Appearance.font.pixelSize.smaller + } + color: Appearance.colors.colOnSurfaceVariant + } + + StyledText { + text: Weather.data.lastRefresh + font { + weight: Font.Medium + pixelSize: Appearance.font.pixelSize.smaller + } + color: Appearance.colors.colOnSurfaceVariant + } + } + } } } diff --git a/dots/.config/quickshell/ii/services/Weather.qml b/dots/.config/quickshell/ii/services/Weather.qml index a7bb8d5ce..0b900a1d9 100644 --- a/dots/.config/quickshell/ii/services/Weather.qml +++ b/dots/.config/quickshell/ii/services/Weather.qml @@ -42,7 +42,8 @@ Singleton { visib: 0, press: 0, temp: 0, - tempFeelsLike: 0 + tempFeelsLike: 0, + lastRefresh: 0, }) function refineData(data) { @@ -75,6 +76,7 @@ Singleton { temp.temp += "°C"; temp.tempFeelsLike += "°C"; } + temp.lastRefresh = Qt.locale().toString(new Date(), (Config.options?.time.format ?? "hh:mm") + " - " + (Config.options?.time.dateWithYearFormat ?? "dd/MM/yyyy")); root.data = temp; } From 14c930d48cc7bef55aed37c45063154e46aff179 Mon Sep 17 00:00:00 2001 From: Greyfeather Date: Sat, 3 Jan 2026 22:05:02 -0700 Subject: [PATCH 2/3] Use wrapper functions in DateTime to format --- dots/.config/quickshell/ii/services/Weather.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/services/Weather.qml b/dots/.config/quickshell/ii/services/Weather.qml index 0b900a1d9..c42c7cb8e 100644 --- a/dots/.config/quickshell/ii/services/Weather.qml +++ b/dots/.config/quickshell/ii/services/Weather.qml @@ -76,7 +76,7 @@ Singleton { temp.temp += "°C"; temp.tempFeelsLike += "°C"; } - temp.lastRefresh = Qt.locale().toString(new Date(), (Config.options?.time.format ?? "hh:mm") + " - " + (Config.options?.time.dateWithYearFormat ?? "dd/MM/yyyy")); + temp.lastRefresh = DateTime.time + " • " + DateTime.date; root.data = temp; } From bf06497f9e05492eb5d1024dfede7c13ac8bb65f Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 4 Jan 2026 10:36:03 +0100 Subject: [PATCH 3/3] weatherpopup: remove useless layouts --- .../modules/ii/bar/weather/WeatherPopup.qml | 33 ++++--------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/ii/bar/weather/WeatherPopup.qml b/dots/.config/quickshell/ii/modules/ii/bar/weather/WeatherPopup.qml index f07f27c38..5b00b4590 100644 --- a/dots/.config/quickshell/ii/modules/ii/bar/weather/WeatherPopup.qml +++ b/dots/.config/quickshell/ii/modules/ii/bar/weather/WeatherPopup.qml @@ -101,34 +101,15 @@ StyledPopup { } } - // Footer - ColumnLayout { - id: footer + // Footer: last refresh + StyledText { Layout.alignment: Qt.AlignHCenter - spacing: 2 - - RowLayout { - Layout.alignment: Qt.AlignHCenter - spacing: 6 - - StyledText { - text: "Last Refresh:" - font { - weight: Font.Medium - pixelSize: Appearance.font.pixelSize.smaller - } - color: Appearance.colors.colOnSurfaceVariant - } - - StyledText { - text: Weather.data.lastRefresh - font { - weight: Font.Medium - pixelSize: Appearance.font.pixelSize.smaller - } - color: Appearance.colors.colOnSurfaceVariant - } + text: Translation.tr("Last refresh: %1").arg(Weather.data.lastRefresh) + font { + weight: Font.Medium + pixelSize: Appearance.font.pixelSize.smaller } + color: Appearance.colors.colOnSurfaceVariant } } }