summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorLaurens Duin <85798751+Laurens256@users.noreply.github.com>2025-07-31 12:41:56 +0200
committerGitHub <noreply@github.com>2025-07-31 20:41:56 +1000
commit7edcae651e1124c1437be93594c3aebf64090372 (patch)
tree6f9f8c34ef34228d40c15b596ad1dfa23cc674d4 /config
parentconfig: allow configuring external audio program (diff)
downloadcaelestia-shell-7edcae651e1124c1437be93594c3aebf64090372.tar.gz
caelestia-shell-7edcae651e1124c1437be93594c3aebf64090372.tar.bz2
caelestia-shell-7edcae651e1124c1437be93594c3aebf64090372.zip
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>
Diffstat (limited to 'config')
-rw-r--r--config/ServiceConfig.qml4
1 files changed, 3 insertions, 1 deletions
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")
}