A full man<->code consistency audit surfaced options, format placeholders
and CSS classes that were implemented but undocumented, documented but not
implemented (some causing fmt crashes when copied from examples), and
defaults that disagreed with the code. This aligns the docs with the code
and fixes a few genuine code gaps.
Docs:
- Add the missing waybar-user(5) man page (and register it in meson.build)
- Document previously-undocumented options/placeholders/CSS across many
modules (custom image-path/image-name/icon-size, graph_type/width/
datapoints; battery smooth-power; wireplumber format-source/only-physical;
mpris {position}/prefer-album-artist; network {signalStrengthApp}/compact
bandwidth; pulseaudio {source_volume}/{source_desc}; upower {temperature}/
{model}/{native-path}; wwan {power_state}/{imei}; tray ignore-list; and
many CSS state classes: .sink-muted, .source-muted, .workspace-hover, etc.)
- Correct documented defaults to match the code (hyprland format {name},
gamemode {count}, cpu-graph interval 5, cava input_delay 4, niri taskbar
icon-size 16, disk/gps/wayfire formats, menu-actions object type, ...)
- Remove placeholders/options that do not apply (custom-graph {icon}/format/
format-icons/rotate) and fix crashing examples (wwan {mode}, gps
format-no-fix); note cava background/foreground/continuous_rendering are
cava-config-file options
Code:
- bluetooth: accept the documented `controller` key as a synonym of
`controller-alias` (the option was silently ignored)
- mango/workspaces: supply the documented `{name}` fmt arg (was missing ->
fmt::format threw)
- privacy: read `tooltip` as a bool (was guarded on isString(), so the
documented `tooltip: false` was silently ignored)
All man pages validated with scdoc 1.11.4. Not compiled locally (no gtkmm);
C++ build relies on CI.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
76 lines
2.0 KiB
Scdoc
76 lines
2.0 KiB
Scdoc
waybar-mango-layout(5)
|
|
|
|
# NAME
|
|
|
|
waybar - mango layout module
|
|
|
|
# DESCRIPTION
|
|
|
|
The *layout* module displays the current layout symbol of the monitor (e.g. "S", "M") in the Mango compositor.
|
|
It supports dynamic CSS classes and custom formats based on the active layout symbol.
|
|
|
|
# CONFIGURATION
|
|
|
|
Addressed by *mango/layout*
|
|
|
|
*format*: ++
|
|
typeof: string ++
|
|
default: {} ++
|
|
The default format, how the layout symbol should be displayed. The positional *{}* (the default) and *{symbol}* are both replaced by the current layout symbol.
|
|
|
|
*format-<symbol>*: ++
|
|
typeof: string ++
|
|
default: *none* ++
|
|
The custom format to use when a specific layout symbol is active (e.g., *format-S*, *format-M*). Note that the symbol string is strictly case-sensitive. If no match is found, it falls back to *format*.
|
|
|
|
*expand*: ++
|
|
typeof: bool ++
|
|
default: false ++
|
|
Enables the module to consume all leftover space.
|
|
|
|
# FORMAT REPLACEMENTS
|
|
|
|
*{symbol}*: The layout symbol reported by Mango (e.g., "S", "M", "Dwindle").
|
|
|
|
# CUSTOM FORMATS
|
|
|
|
You can define specific formats for different layouts by appending the exact layout symbol to the *format-* key in your configuration.
|
|
|
|
For example, if your Mango compositor reports the symbol "S" for a spiral layout and "M" for a master layout, you can use *format-S* and *format-M* to define unique icons or text for each. Keep in mind that JSON keys are case-sensitive, so if the compositor sends "S", the key must be exactly *format-S*.
|
|
|
|
# STYLE
|
|
|
|
The layout module provides dynamic CSS classes based on the current layout symbol, allowing you to style each layout differently.
|
|
|
|
* *#layout*
|
|
* *.<symbol>* - The current layout symbol is dynamically added as a CSS class name (e.g., *.S*, *.M*).
|
|
|
|
# EXAMPLES
|
|
|
|
```
|
|
"mango/layout": {
|
|
"format": "[] {symbol}",
|
|
"format-S": " {symbol}",
|
|
"format-M": " {symbol}"
|
|
}
|
|
```
|
|
|
|
## CSS Example
|
|
|
|
```
|
|
#layout {
|
|
color: #ffffff;
|
|
padding: 0 5px;
|
|
}
|
|
|
|
/* Specific color for the "S" layout */
|
|
#layout.S {
|
|
color: #a6e3a1;
|
|
}
|
|
|
|
/* Specific color for the "M" layout */
|
|
#layout.M {
|
|
color: #f38ba8;
|
|
}
|
|
```
|