diff --git a/Main.qml b/Main.qml index 12c966e..281df71 100644 --- a/Main.qml +++ b/Main.qml @@ -223,8 +223,11 @@ Rectangle { color: config.accent1_text + property bool clock: config.am_pm_clock == "true" + function updateTime() { - text = new Date().toLocaleString(Qt.locale("en_US"), "hh:mm:ss") + text = new Date().toLocaleString(Qt.locale("en_US"), + clock ? "h:mm:ss A" : "hh:mm:ss") } } diff --git a/README.md b/README.md index 0273c23..3ede4cd 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ the defaults. * `accent1_text`: The color of the top bar text and buttons * `accent2`: The color of other items, like the "LOG IN" button * `accent2_hover`: The color that will be applied on hover to accent2 items +* `am_pm_clock`: Whether to use a 12-hour AM/PM clock or a 24-hour clock * `logo` (optional): Path to the image that will be placed in the spot usually filled by a face icon * `primary_screen_only`: Whether or not to display the panel on both screens, diff --git a/theme.conf b/theme.conf index d6242c8..59975aa 100644 --- a/theme.conf +++ b/theme.conf @@ -8,3 +8,4 @@ accent2=#00796b accent2_hover=#009688 user_name=select primary_screen_only=false +am_pm_clock=false