Skip to content

Commit 7b3a965

Browse files
committed
docs(v5): add info about '\n support for clock
1 parent 87423ff commit 7b3a965

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/content/docs/v5/bar/widgets.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ Displays the current time.
3636

3737
| Setting | Type | Default | Description |
3838
|---------|------|---------|-------------|
39-
| `format` | string | `{:%H:%M}` | `std::format`-style chrono format string (horizontal bars and vertical fallback). Bare chrono specs such as `%H:%M` are also accepted. Numeric specifiers support the strftime-style no-pad modifier, e.g. `{:%-I:%M %p}`. |
39+
| `format` | string | `{:%H:%M}` | `std::format`-style chrono format string (horizontal bars and vertical fallback). Use `\n` for multiple lines; multiple chrono fields such as `{:%H:%M}\n{:%d/%m}` are supported. Bare chrono specs such as `%H:%M` are also accepted. Numeric specifiers support the strftime-style no-pad modifier, e.g. `{:%-I:%M %p}`. |
4040
| `vertical_format` | string | `""` | Format used when the bar is vertical. When empty, falls back to `format` with `:` replaced by line breaks. Supports the same chrono syntax as `format`. |
4141

4242
```toml
4343
[widget.clock]
44-
format = "{:%H:%M}"
44+
format = "{:%H:%M}\n{:%d/%m}"
4545
vertical_format = "{:%H\n%M}"
4646

4747
[widget.clock-12h]

0 commit comments

Comments
 (0)