Skip to content

world-clock

Multiple timezones shown together in a dropdown.

Add it to your layout with world-clock:

toml
[[bar.layout]]
monitor = "*"
right = ["world-clock"]

General

FieldTypeDefaultDescription
formatstring"{{ tz('UTC', '%H:%M %Z') }}"Format string with embedded timezone blocks.
icon-namestring"ld-globe-symbolic"Symbolic icon name.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
label-showbooltrueDisplay text label.
label-max-lengthu320Max label characters before truncation with ellipsis. Set to 0 to disable.
More about format

Use {{ tz('timezone', 'strftime') }} to insert a formatted time. Anything outside a placeholder stays as literal text.

Examples

Format stringRenders as
"{{ tz('UTC', '%H:%M %Z') }}"14:30 UTC
"NYC {{ tz('America/New_York', '%H:%M') }} TYO {{ tz('Asia/Tokyo', '%H:%M') }}"NYC 09:30 TYO 23:30
"{{ tz('America/New_York', '%H:%M %Z') }} | {{ tz('Europe/London', '%H:%M %Z') }}"09:30 EST | 14:30 GMT

Colors

FieldTypeDefaultDescription
border-colorColorValue"yellow"Border color token.
icon-colorColorValue"auto"Icon foreground color. Auto selects based on variant for contrast.
icon-bg-colorColorValue"yellow"Icon container background color token.
label-colorColorValue"yellow"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.

Click actions

FieldTypeDefaultDescription
left-clickClickAction""Action on left click.
right-clickClickAction""Action on right click.
middle-clickClickAction""Action on middle click.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.

Default configuration

toml
[modules.world-clock]
format = "{{ tz('UTC', '%H:%M %Z') }}"
icon-name = "ld-globe-symbolic"
border-show = false
border-color = "yellow"
icon-show = true
icon-color = "auto"
icon-bg-color = "yellow"
label-show = true
label-color = "yellow"
label-max-length = 0
button-bg-color = "bg-surface-elevated"
left-click = ""
right-click = ""
middle-click = ""
scroll-up = ""
scroll-down = ""

Released under the MIT License.