Files
Waybar/man/waybar-clock.5.scd
ignormies a05c7bc28f chore: Stop using deprecated/removed Nerdfonts codepoints
These Nerdfonts codepoints were removed in [3.0.0](https://www.nerdfonts.com/releases#v3.0.0):

> **Breaking 2: Material Design Icons Codepoints**
>
> The old Material Design Icon codepoints are finally dropped. Due to an historic mistake we placed them in between some asiatic glyphs, breaking that script. Since v2.3.0 the (updated and expanded) Material Design Icons have new codepoints in the 5 digit region.
>
> - Dropped codepoints `F500`… and class names `nf-mdi-*`
> - New codepoints `F0001`… and class names `nf-md-*`
> - The whole discussions are here: https://github.com/ryanoasis/nerd-fonts/issues/365
> - A translation table is available here: https://github.com/ryanoasis/nerd-fonts/issues/1059#issuecomment-1404891287
> - There are tools out there that probably can update your configuration.

For the majority of the removed symbols, it was as easy as finding the
replacement with the exact same name. For example, `f76b` (`nf-mdi-format_header_2`)
became `f026c` (`nf-md-format_header_2`).

There was one symbol that was completely removed (it was removed from
Material Design): `f5fc` (`nf-mdi-camcorder_box`). I have substituted it
with `f03d` (`nf-fa-video_camera`) which is not Material Design, but the
closest icon I could find.

Here's some example output from [nerdfix](https://github.com/loichyan/nerdfix)
```
╭─(ignormies)(~/g/fork-waybar)  removed-nerdfonts-codepoints
╰──▪ nix-shell -p nerdfix --run "nerdfix check resources/config.jsonc"
 INFO Check input from 'resources/config.jsonc'
  ☞ Found obsolete icon U+F76B
     ╭─[resources/config.jsonc:131:27]
 130 │         "format": "{temperatureC}°C {icon}",
 131 │         "format-icons": ["", "", ""]
     ·                           ┬
     ·                           ╰── Icon 'mdi-format_header_2' is marked as obsolete
 132 │     },
     ╰────
  help: You could replace it with:
          1. 󰉬 U+F026C md-format_header_2
          2. 󰉫 U+F026B md-format_header_1
          3. 󰉭 U+F026D md-format_header_3
          4. 󰉮 U+F026E md-format_header_4

  ☞ Found obsolete icon U+F769
     ╭─[resources/config.jsonc:131:41]
 130 │         "format": "{temperatureC}°C {icon}",
 131 │         "format-icons": ["", "", ""]
     ·                                     ┬
     ·                                     ╰── Icon 'mdi-format_float_right' is marked as obsolete
 132 │     },
     ╰────
  help: You could replace it with:
          1. 󰉪 U+F026A md-format_float_right
          2. 󰉨 U+F0268 md-format_float_left
          3. 󰉩 U+F0269 md-format_float_none
          4. 󰉣 U+F0263 md-format_align_right

  ☞ Found obsolete icon U+F5E7
     ╭─[resources/config.jsonc:146:41]
 145 │         "format-full": "{capacity}% {icon}",
 146 │         "format-charging": "{capacity}% ",
     ·                                         ┬
     ·                                         ╰── Icon 'mdi-cached' is marked as obsolete
 147 │         "format-plugged": "{capacity}% ",
     ╰────
  help: You could replace it with:
          1. 󰃨 U+F00E8 md-cached

  ☞ Found obsolete icon U+F796
     ╭─[resources/config.jsonc:170:45]
 169 │         "format-wifi": "{essid} ({signalStrength}%) ",
 170 │         "format-ethernet": "{ipaddr}/{cidr} ",
     ·                                             ┬
     ·                                             ╰── Icon 'mdi-gamepad_variant' is marked as obsolete
 171 │         "tooltip-format": "{ifname} via {gwaddr} ",
     ╰────
  help: You could replace it with:
          1. 󰊗 U+F0297 md-gamepad_variant
          2. 󰺷 U+F0EB7 md-gamepad_variant_outline
          3. 󰑢 U+F0462 md-road_variant
          4. 󰉜 U+F025C md-food_variant

  ☞ Found obsolete icon U+F796
     ╭─[resources/config.jsonc:171:50]
 170 │         "format-ethernet": "{ipaddr}/{cidr} ",
 171 │         "tooltip-format": "{ifname} via {gwaddr} ",
     ·                                                  ┬
     ·                                                  ╰── Icon 'mdi-gamepad_variant' is marked as obsolete
 172 │         "format-linked": "{ifname} (No IP) ",
     ╰────
  help: You could replace it with:
          1. 󰊗 U+F0297 md-gamepad_variant
          2. 󰺷 U+F0EB7 md-gamepad_variant_outline
          3. 󰑢 U+F0462 md-road_variant
          4. 󰉜 U+F025C md-food_variant

  ☞ Found obsolete icon U+F796
     ╭─[resources/config.jsonc:172:44]
 171 │         "tooltip-format": "{ifname} via {gwaddr} ",
 172 │         "format-linked": "{ifname} (No IP) ",
     ·                                            ┬
     ·                                            ╰── Icon 'mdi-gamepad_variant' is marked as obsolete
 173 │         "format-disconnected": "Disconnected ⚠",
     ╰────
  help: You could replace it with:
          1. 󰊗 U+F0297 md-gamepad_variant
          2. 󰺷 U+F0EB7 md-gamepad_variant_outline
          3. 󰑢 U+F0462 md-road_variant
          4. 󰉜 U+F025C md-food_variant

  ☞ Found obsolete icon U+F6A9
     ╭─[resources/config.jsonc:180:36]
 179 │         "format-bluetooth": "{volume}% {icon} {format_source}",
 180 │         "format-bluetooth-muted": " {icon} {format_source}",
     ·                                    ┬
     ·                                    ╰── Icon 'mdi-cup' is marked as obsolete
 181 │         "format-muted": " {format_source}",
     ╰────
  help: You could replace it with:
          1. 󰆪 U+F01AA md-cup

  ☞ Found obsolete icon U+F6A9
     ╭─[resources/config.jsonc:181:26]
 180 │         "format-bluetooth-muted": " {icon} {format_source}",
 181 │         "format-muted": " {format_source}",
     ·                          ┬
     ·                          ╰── Icon 'mdi-cup' is marked as obsolete
 182 │         "format-source": "{volume}% ",
     ╰────
  help: You could replace it with:
          1. 󰆪 U+F01AA md-cup

  ☞ Found obsolete icon U+F590
     ╭─[resources/config.jsonc:186:28]
 185 │             "headphone": "",
 186 │             "hands-free": "",
     ·                            ┬
     ·                            ╰── Icon 'mdi-battery_unknown' is marked as obsolete
 187 │             "headset": "",
     ╰────
  help: You could replace it with:
          1. 󰂑 U+F0091 md-battery_unknown
          2. 󰥊 U+F094A md-battery_unknown_bluetooth
          3. 󱟞 U+F17DE md-battery_arrow_down
          4. 󰝐 U+F0750 md-microsoft_xbox_controller_battery_unknown

  ☞ Found obsolete icon U+F590
     ╭─[resources/config.jsonc:187:25]
 186 │             "hands-free": "",
 187 │             "headset": "",
     ·                         ┬
     ·                         ╰── Icon 'mdi-battery_unknown' is marked as obsolete
 188 │             "phone": "",
     ╰────
  help: You could replace it with:
          1. 󰂑 U+F0091 md-battery_unknown
          2. 󰥊 U+F094A md-battery_unknown_bluetooth
          3. 󱟞 U+F17DE md-battery_arrow_down
          4. 󰝐 U+F0750 md-microsoft_xbox_controller_battery_unknown
```
2026-03-19 17:39:57 -07:00

331 lines
7.6 KiB
Markdown

waybar-clock(5) "waybar-clock" "User Manual"
# 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*
[- *Option*
:- *Typeof*
:- *Default*
:- *Description*
|[ *interval*
:[ integer
:[ 60
:[ The interval in which the information gets polled
|[ *format*
:[ string
:[ *{:%H:%M}*
:[ The format, how the date and time should be displayed. See format options below
|[ *timezone*
:[ string
:[
:[ The timezone to display the time in, e.g. America/New_York. "" represents
the system's local timezone. See Wikipedia's unofficial list of timezones <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>
|[ *timezones*
:[ list of strings
:[
:[ A list of timezones (as in *timezone*) to use for time display, changed using
the scroll wheel. Do not specify *timezone* option when *timezones* is specified.
"" represents the system's local timezone
|[ *timezone-tooltip-format*
:[ string
:[
:[ Format to use for displaying timezones in the tooltip. When set, this allows showing
timezone information (like timezone abbreviations) in the tooltip while keeping the
main display clean. Uses the same format options as *format*
|[ *locale*
:[ 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
|[ *rotate*
:[ integer
:[
:[ Positive value to rotate the text label (in 90 degree increments)
|[ *on-click*
:[ string
:[
:[ Command to execute when clicked on the module
|[ *on-click-middle*
:[ string
:[
:[ Command to execute when you middle clicked on the module using mousewheel
|[ *on-click-right*
:[ string
:[
:[ Command to execute when you right-click on the module
|[ *on-scroll-up*
:[ string
:[
:[ Command to execute when scrolling up on the module
|[ *on-scroll-down*
:[ string
:[
:[ Command to execute when scrolling down on the module
|[ *smooth-scrolling-threshold*
:[ double
:[
:[ Threshold to be used when scrolling
|[ *tooltip*
:[ bool
:[ true
:[ Option to enable tooltip on hover
|[ *tooltip-format*
:[ string
:[ same as format
:[ Tooltip on hover
|[ *menu*
:[ string
:[
:[ Action that popups the menu.
|[ *menu-file*
:[ string
:[
:[ Location of the menu descriptor file. There need to be an element of type GtkMenu with id *menu*
|[ *menu-actions*
:[ array
:[
:[ The actions corresponding to the buttons of the menu.
|[ *expand*:
:[ bool
:[ false
:[ Enables this module to consume all left over space dynamically.
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*
[- *Option*
:- *Typeof*
:- *Default*
:- *Description*
|[ *mode*
:[ string
:[ month
:[ Calendar view mode. Possible values: year|month
|[ *mode-mon-col*
:[ integer
:[ 3
:[ Relevant for *mode=year*. Count of months per row
|[ *weeks-pos*
:[ string
:[
:[ The position where week numbers should be displayed. Disabled when is empty.
Possible values: left|right
|[ *on-scroll*
:[ integer
:[ 1
:[ Value to scroll months/years forward/backward. Can be negative. Is
configured under *on-scroll* option
|[ *iso8601*
:[ bool
:[ false
:[ When enabled, the calendar follows the ISO 8601 standard: weeks begin on
Monday, and the first week of the year is numbered 1. The default week format is
'{:%V}'.
3. Addressed by *clock: calendar: format*
[- *Option*
:- *Typeof*
:- *Default*
:- *Description*
|[ *months*
:[ string
:[
:[ Format is applied to months header(January, February,...etc.)
|[ *days*
:[ string
:[
:[ Format is applied to days
|[ *weeks*
:[ string
:[ *{:%U}*
:[ Format is applied to week numbers. When weekday format is not provided then
is used default format: '{:%W}' when week starts with Monday, '{:%U}' otherwise
|[ *weekdays*
:[ string
:[
:[ Format is applied to weeks header(Su,Mo,...etc.)
|[ *today*
:[ string
:[ *<b><u>{}</u></b>*
:[ Format is applied to Today
## Actions
[- *String*
:- *Action*
|[ *mode*
:[ Switch calendar mode between year/month
|[ *tz_up*
:[ Switch to the next provided time zone
|[ *tz_down*
:[ Switch to the previously provided time zone
|[ *shift_up*
:[ Switch to the next calendar month/year
|[ *shift_down*
:[ Switch to the previous calendar month/year
# 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}",
}
```
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}"
}
```
5. Simple calendar tooltip
```
"clock": {
"format": "{:%H:%M}",
"tooltip-format": "<tt>{calendar}</tt>",
"calendar": {
"format": {
"today": "<span color='#ffcc66'><b>{}</b></span>"
}
}
}
```
# 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:
. Use "WenQuanYi Zen Hei Mono" which is provided in most Linux distributions
. Try different font sizes and find best for you. size = 9pt should be fine
. 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>