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

@ -143,6 +143,11 @@ bar {
*horizontal_padding* _pixels_
Horizontal padding between bar edges and text. (Default: 5)
*time_format* _format_
strftime format string for the clock display. Invalid format strings
are ignored and the default is used instead. Set to an empty string
to hide the clock. (Default: "%Y-%m-%d %H:%M, %A")
The bar also supports *margins* and *anchors* child blocks; see *TAG OVERLAY*
for their format.