Man page - waybar-clock(5)
Packages contains this manual
- waybar-backlight-slider(5)
- waybar-river-layout(5)
- waybar-sway-scratchpad(5)
- waybar-pulseaudio-slider(5)
- waybar-hyprland-submap(5)
- waybar-river-mode(5)
- waybar-keyboard-state(5)
- waybar-cffi(5)
- waybar-pulseaudio(5)
- waybar-states(5)
- waybar-clock(5)
- waybar(5)
- waybar-dwl-tags(5)
- waybar-niri-window(5)
- waybar-niri-workspaces(5)
- waybar-dwl-window(5)
- waybar-sndio(5)
- waybar-niri-language(5)
- waybar-hyprland-language(5)
- waybar-wireplumber(5)
- waybar-mpris(5)
- waybar-gamemode(5)
- waybar-sway-language(5)
- waybar-hyprland-workspaces(5)
- waybar-power-profiles-daemon(5)
- waybar-battery(5)
- waybar-wlr-taskbar(5)
- waybar-tray(5)
- waybar-menu(5)
- waybar-sway-workspaces(5)
- waybar-styles(5)
- waybar-sway-mode(5)
- waybar-cpu(5)
- waybar-river-window(5)
- waybar-mpd(5)
- waybar-hyprland-window(5)
- waybar-sway-window(5)
- waybar-network(5)
- waybar-systemd-failed-units(5)
- waybar-jack(5)
- waybar-temperature(5)
- waybar-river-tags(5)
- waybar-custom(5)
- waybar-idle-inhibitor(5)
- waybar-bluetooth(5)
- waybar-privacy(5)
- waybar-backlight(5)
- waybar-inhibitor(5)
- waybar-image(5)
- waybar-upower(5)
- waybar-disk(5)
- waybar-memory(5)
apt-get install waybar
Manual
waybar-clock
NAMEDESCRIPTION
FILES
CONFIGURATION
Actions
FORMAT REPLACEMENTS
EXAMPLES
STYLE
Troubleshooting
Calendar in Chinese. Alignment
AUTHOR
NAME
waybar - clock module
DESCRIPTION
clock module displays current date and time
FILES
$XDG_CONFIG_HOME/waybar/config
|
Per user configuration file |
CONFIGURATION
|
1. Addressed by clock |
View all valid format options in strftime(3) or have a look https://en.cppreference.com/w/cpp/chrono/duration/formatter
|
2. Addressed by clock: calendar |
|
3. Addressed by clock: calendar: format |
Actions
FORMAT REPLACEMENTS
|
β’ |
{calendar} : Current month calendar |
||
|
β’ |
{tz_list} : List of time in the rest timezones, if more than one timezone is set in the config |
||
|
β’ |
{ordinal_date} : The current day in (English) ordinal form, e.g. 21st |
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}", |
}
STYLE
|
β’ |
#clock |
Troubleshooting
If clock module
is disabled at startup with
locale::facet::_S_create_c_locale
name not valid error message try one of the following:
|
β’ |
check if LC_TIME is set properly (glibc) |
|||
|
β’ |
set locale to C in the config file (musl) |
The locale option must be set for {calendar} to use the correct start-of-week, regardless of system locale.
Calendar in Chinese. Alignment
In order to have aligned Chinese calendar there are some useful recommendations:
|
1. |
Use "WenQuanYi Zen Hei Mono" which is provided in most Linux distributions |
||
|
2. |
Try different font sizes and find best for you. size = 9pt should be fine |
||
|
3. |
In case when "WenQuanYi Zen Hei Mono" font is used disable 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>