Skip to content

Commit

Permalink
Add a config option for an AM/PM clock
Browse files Browse the repository at this point in the history
  • Loading branch information
pvsr committed Jan 6, 2018
1 parent 8e6b7bb commit 01dff10
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ accent2=#00796b
accent2_hover=#009688
user_name=select
primary_screen_only=false
am_pm_clock=false

0 comments on commit 01dff10

Please sign in to comment.