From 7edcae651e1124c1437be93594c3aebf64090372 Mon Sep 17 00:00:00 2001 From: Laurens Duin <85798751+Laurens256@users.noreply.github.com> Date: Thu, 31 Jul 2025 12:41:56 +0200 Subject: config: respect user locale for twelve hour clock & temperature (#290) * bar: add 12h clock option * feat: allow custom format config * feat: 12h clock based on locale with config * chore: cleanup * fix: PR comments, add automatic fahrenheit * fix: formatting * dashboard: fix up date time * lock: better 12h clock --------- Co-authored-by: Soramane <61896496+soramanew@users.noreply.github.com> --- config/ServiceConfig.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/ServiceConfig.qml b/config/ServiceConfig.qml index 0b8b170..5c48fcb 100644 --- a/config/ServiceConfig.qml +++ b/config/ServiceConfig.qml @@ -1,6 +1,8 @@ import Quickshell.Io +import QtQuick JsonObject { property string weatherLocation: "" // A lat,long pair or empty for autodetection, e.g. "37.8267,-122.4233" - property bool useFahrenheit: false + property bool useFahrenheit: [Locale.ImperialUSSystem, Locale.ImperialSystem].includes(Qt.locale().measurementSystem) + property bool useTwelveHourClock: Qt.locale().timeFormat(Locale.ShortFormat).toLowerCase().includes("a") } -- cgit v1.2.3-freya