waybar-clock(5)
โจ NAME โจ
okay so bestie, this is waybar-clock โ it's the clock module for waybar ๐ (like, the bar itself is waybar, and this is the clock part of it, iykyk).
๐ธ DESCRIPTION ๐ธ
The clock module is literally the main character that just... shows you the current date and time ๐โจ That's it. That's the whole job. It's giving simple, it's giving reliable, it's giving "what time is it bestie" energy and honestly? Obsessed. ๐
๐ FILES ๐
$XDG_CONFIG_HOME/waybar/configโ the per-user configuration file, aka where you get to tell the clock module what to do ๐ซถ this is your config era, your moment, your time to shine ๐
Heads up bestie:$XDG_CONFIG_HOMEis an environment variable, so it expands to whatever your system says it is (for a lot of people that's~/.config, but don't @ me โ check your env, fr fr) ๐
๐ CONFIGURATION ๐
- Addressed by
clock
okay bestie, these are your settings for the clock module, the ones you drop inside "clock": { ... }. every single one, no skips, let's go ๐ซถ
interval(integer, default60) โ how often (in, like, a unit of time) the info gets polled. every poll = a fresh lil peek at what time it is โจformat(string, default{:%H:%M}) โ the format, aka how the date and time should be displayed. it's giving strftime energy. see the format options below for all the letters you can use ๐ธtimezone(string) โ the timezone to display the time in, e.g.America/New_York. an empty string""represents the system's local timezone. there's a Wikipedia unofficial list of timezones athttps://en.wikipedia.org/wiki/List_of_tz_database_time_zonesif you need to find yours ๐timezones(list of strings) โ a list of timezones (same idea astimezone) to use for time display, and you flip between them with the scroll wheel ๐ฑ๏ธโจ. do not specify thetimezoneoption whentimezonesis specified, fr fr, pick one. and""represents the system's local timezonetimezone-tooltip-format(string) โ format to use for displaying timezones in the tooltip. when it's set, this lets you show timezone info (like timezone abbreviations) in the tooltip while keeping the main display clean ๐. uses the same format options asformatlocale(string) โ a locale to be used to display the time. intended to render times in custom timezones with the proper language and format ๐max-length(integer) โ the maximum length in character the module should display (yes, "character", singular, that's literally what it says)rotate(integer) โ positive value to rotate the text label (in 90 degree increments). yes this is real and yes it slays ๐on-click(string) โ command to execute when clicked on the moduleon-click-middle(string) โ command to execute when you middle clicked on the module using mousewheelon-click-right(string) โ command to execute when you right-click on the moduleon-scroll-up(string) โ command to execute when scrolling up on the moduleon-scroll-down(string) โ command to execute when scrolling down on the modulesmooth-scrolling-threshold(double) โ threshold to be used when scrolling
tooltipโ bool, defaulttrue. Wanna have a lil tooltip pop up when you hover? Yeah you do. This turns it on/off. ๐ซถtooltip-formatโ string, default is the same asformat. This is the text that shows up in the hover tooltip, so you can make it different from the bar text itself. Obsessed with that flexibility ngl ๐menuโ string. The action that pops the menu open. ๐menu-fileโ string. Where your menu descriptor file lives. Heads up bestie, it needs to have aGtkMenuelement with the idmenuin there, or it's not gonna work. ๐menu-actionsโ array. The actions that line up with the buttons of the menu. One per button, iykyk.expand: โ bool, defaultfalse. Lets this module gobble up all the leftover space dynamically. Main character energy fr, it eats the extra room ๐
Wanna see every valid format option? Peep strftime(3) or go stare at https://en.cppreference.com/w/cpp/chrono/duration/formatter โจ
๐ธ 2. Addressed by clock: calendar ๐ธ
This is the stuff for the calendar module, bestie ๐
modeโ string, defaultmonth. The calendar view mode. Possible values:year|month๐๏ธmode-mon-colโ integer, default3. Only matters whenmode=year. It's the count of months per row.weeks-posโ string, no default. Where the week numbers should be displayed. It's disabled when it's empty. Possible values:left|right๐on-scrollโ integer, default1. The value to scroll months/years forward/backward by. Can be negative! And yes, it's configured under theon-scrolloption ๐ญiso8601โ bool, defaultfalse. When it's enabled, the calendar follows the ISO 8601 standard: weeks begin on Monday, and the first week of the year is numbered1. The default week format is{:%V}. So iconic of it honestly ๐
๐ 3. Addressed by clock: calendar: format ๐
Formatting the calendar's little text bits, let's go โจ
monthsโ string, no default. The format is applied to the months header (January,February,...etc.) ๐daysโ string, no default. The format is applied to days.weeksโ string, default{:%U}. The format is applied to week numbers. When the weekday format isn't provided, then the default format is used:{:%W}when the week starts with Monday,{:%U}otherwise. Yes bestie, that's two whole defaults doing different jobs, stay with me ๐weekdaysโ string, no default. The format is applied to the weeks header (Su,Mo,...etc.) ๐ฆtodayโ string, default<b><u>{}</u></b>. The format is applied to Today. That default is literally bold + underlined, slay ๐
โจ Actions โจ
ok so these are the strings you can hand to actions (or to any of the click/scroll thingies) and here's literally what each one does ๐
modeโ flips the calendar between year view and month view ๐๏ธtz_upโ jumps to the next timezone you providedtz_downโ jumps to the previously provided timezoneshift_upโ moves to the next calendar month/year โญ๏ธshift_downโ moves to the previous calendar month/year โฎ๏ธ
๐ FORMAT REPLACEMENTS ๐
these little placeholder besties go in your format strings โจ
{calendar}โ the current month calendar ๐๏ธ{tz_list}โ a list of the time in the rest of the timezones, but only if you've set more than one timezone in the config{ordinal_date}โ today's date in (English) ordinal form, like21st๐
๐ EXAMPLES ๐
1. General
"clock": {
"interval": 60,
"format": "{:%H:%M}",
"max-length": 25
}
2. Calendar
"clock": {
"format": "{:%H:%M} ",
"format-alt": "{:%A, %B %d, %Y (%R)} ",
"tooltip-format": "<tt><small>{calendar}</small></tt>",
"calendar": {
"mode" : "year",
"mode-mon-col" : 3,
"weeks-pos" : "right",
"on-scroll" : 1,
"on-click-right": "mode",
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-click-forward": "tz_up",
"on-click-backward": "tz_down",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
},
3. Full date on hover
"clock": {
"interval": 60,
"tooltip": true,
"format": "{:%H.%M}",
"tooltip-format": "{:%Y-%m-%d}",
}
4. Show timezone in tooltip only
"clock": {
"interval": 60,
"format": "{:%H:%M}",
"timezone-tooltip-format": "{:%H:%M %Z}",
"timezones": [
"",
"America/Chicago",
"America/Los_Angeles",
"Europe/Paris",
"UTC"
],
"tooltip": true,
"tooltip-format": "{tz_list}"
}
๐ STYLE ๐
#clock
๐ฉบ Troubleshooting
so likeโฆ if your clock module just refuses to show up at startup and throws a locale::facet::_S_create_c_locale / name not valid error message at you ๐ญ then try one of these bestie:
- check that
LC_TIMEis set properly (that's the glibc route) - set the locale to
Cin the config file (that's the musl route)
heads up!! thelocaleoption must be set for{calendar}to use the correct start-of-week, no matter what your system locale says. no cap. ๐
๐ธ Calendar in Chinese. Alignment ๐ธ
if you want a Chinese calendar that's actually aligned and not giving chaos, here are some genuinely useful recommendations ๐ซถ
- use
"WenQuanYi Zen Hei Mono"โ it ships with most Linux distributions, iconic of them honestly - try different font sizes and find the best one for you.
size = 9ptshould be fine โจ - if
"WenQuanYi Zen Hei Mono"is the font you're using, disable the monospace font pango tag
Example of working config ๐
"clock": {
"format": "{:%H:%M} ",
"format-alt": "{:%A, %B %d, %Y (%R)} ",
"tooltip-format": "n<span size='9pt' font='WenQuanYi Zen Hei Mono'>{calendar}</span>",
"calendar": {
"mode" : "year",
"mode-mon-col" : 3,
"weeks-pos" : "right",
"on-scroll" : 1,
"on-click-right": "mode",
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-click-forward": "tz_up",
"on-click-backward": "tz_down",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
},
๐ AUTHOR ๐
Alexis Rouillard <contact@arouillard.fr> โ absolute legend, we stan ๐ซถ
and that's the whole page bestie!! you made it to the end ๐ this is waybar-clock, page waybar-clock(5), dated 2026-02-08 โ go forth and make your bar adorable, you got this fr fr ๐โจ๐ฆ
๐ฆ where this page comes from
- ubuntu resolute: waybar 0.15.0-1 ยท MIT
- ubuntu stonking: waybar 0.15.0-1 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms