Add time_format config for custom strftime strings

This lets the user change to any time format they want in the bar.
As part of this, we also change the bar to re-draw every second (to
allow using seconds in the time format string).
This commit is contained in:
Ben Buhse 2026-02-27 10:51:42 -06:00
commit 0e7d652d24
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
7 changed files with 50 additions and 11 deletions

View file

@ -147,6 +147,7 @@ bar {
| `position` | enum | `top` | Bar position (`top` or `bottom`) |
| `vertical_padding` | u8 | `5` | Vertical padding above and below text |
| `horizontal_padding` | u8 | `5` | Horizontal padding between bar edges and text |
| `time_format` | string | `%Y-%m-%d %H:%M, %A` | strftime format string for the clock display (an empty string hides the clock) |
### Margins