Add window title and wm info to Bar

This commit adds the focused window title to the left side of the bar
and some WM info (primary count/ratio and # of visible/total windows) to
the right side.

It also adds new vertical_padding and horizontal_padding config options
for the bar.
This commit is contained in:
Ben Buhse 2026-02-27 10:42:08 -06:00
commit efd0222899
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
9 changed files with 231 additions and 51 deletions

View file

@ -114,8 +114,10 @@ initialization do not re-trigger rules.
# BAR
The bar is an optional widget that shows the time. It is only created when a
*bar* block is present:
The bar is an optional widget that shows the focused window title on the left,
the date/time in the center, and layout info (primary count/ratio and visible
window count) on the right. It is only created when a *bar* block is present
in the config:
```
bar {
@ -135,9 +137,17 @@ bar {
*position* *top*|*bottom*
Bar position. (Default: *top*)
*vertical_padding* _pixels_
Vertical padding above and below text. (Default: 5)
*horizontal_padding* _pixels_
Horizontal padding between bar edges and text. (Default: 5)
The bar also supports *margins* and *anchors* child blocks; see *TAG OVERLAY*
for their format.
An empty block can be used to enable the widget with all defaults.
# TAG OVERLAY
The tag overlay is an optional widget that briefly shows tag state when