Skip to content

Clock

Displays the current date and time. Clicking on the widget opens a popup with the time and a calendar.

Screenshot of clock widget with popup open

Configuration

Type: clock

NameTypeDefaultDescription
formatstring%d/%m/%Y %H:%MDate/time format string. Pango markup is supported.
format_popupstring%H:%M:%SDate/time format string to display in the popup header. Pango markup is supported.
localestring$LC_TIME or $LANG or 'POSIX'Locale to use (eg en_GB). Defaults to the system language (reading from env var).
orientation'horizontal' or 'vertical' (shorthand: 'h' or 'v')'horizontal'Orientation of the time on the clock button.
justify'left'’, 'right', 'center', or 'fill''left'Justification (alignment) of the date/time shown on the bar.

Detail on available tokens can be found here: https://docs.rs/chrono/latest/chrono/format/strftime/index.html

JSON
{
"end": [
{
"type": "clock",
"format": "%d/%m/%Y %H:%M"
}
]
}
TOML
[[end]]
type = "clock"
format = "%d/%m/%Y %H:%M"
YAML
end:
- type: "clock"
format: "%d/%m/%Y %H:%M"
Corn
{
end = [
{
type = "clock"
format = "%d/%m/%Y %H:%M"
}
]
}

Styling

SelectorDescription
.clockClock widget button
.popup-clockClock popup box
.popup-clock .calendar-clockClock inside the popup
.popup-clock .calendarCalendar widget inside the popup. GTK provides some OOTB styling options for this.

Information on styling the calendar can be found here.

For more information on styling, please see the styling guide.