feat(river/layout): add format-icons

This commit is contained in:
AtomToast
2025-07-13 13:15:56 +02:00
parent 94777921d9
commit ad0d1350fd
2 changed files with 34 additions and 5 deletions
+31 -4
View File
@@ -16,9 +16,13 @@ Addressed by *river/layout*
*format*: ++
typeof: string ++
default: {} ++
default: {layout} ++
The format, how information should be displayed. On {} data gets inserted.
*format-icons*: ++
typeof: array ++
Based on the current layout, the corresponding icon gets selected.
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label (in 90 degree increments).
@@ -69,16 +73,39 @@ Addressed by *river/layout*
default: false ++
Enables this module to consume all left over space dynamically.
# EXAMPLE
# FORMAT REPLACEMENTS
*{layout}*: Layout, as defined by your layout generator. By default this will be *rivertile(1)*
*{icon}*: Icon, as defined in *format-icons*
# EXAMPLES
With layout name:
```
"river/layout": {
"format": "{}",
"format": "{layout}",
"min-length": 4,
"align": "right"
}
```
With icons, this sets icons for the 4 layouts available in rivertile:
```
"river/layout": {
"format": "{icon}",
"min-length": 3,
"format-icons": {
"left": "[]=",
"bottom": "TTT",
"top": "ꓕꓕꓕ",
"right": "=[]",
}
}
```
# STYLE
- *#layout*
@@ -86,4 +113,4 @@ Addressed by *river/layout*
# SEE ALSO
waybar(5), river(1)
waybar(5), river(1), rivertile(1)