Feature 57 (config and provisioning): modules declare config and provisions, their files rendered from templates; synced with main (issues of feature 57, 874)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
The bars as a module (novox/hq ADR 0208, research 026/05).
|
||||
|
||||
- Installs `i3status-rust`. The update block's `checkupdates` comes from `pacman-contrib`, which the `pacman` module installs on every node; two modules declaring one package is refused at composition.
|
||||
Claims the mesh's `node-bar` seat (no verbs yet, ADR 0208 §2) and renders the blocks other modules
|
||||
Claims the mesh's `node-bar` seat (no verbs yet, ADR 0208 §2) and places the blocks other modules
|
||||
contribute to it (ADR 0255, below). Requires `x11-display` on its own
|
||||
machine: its bars are i3bar's.
|
||||
- Owns `~/.config/i3status-rust/`, both bars (`top-bar.toml`, `bottom-bar.toml`) and their icon set
|
||||
@@ -29,18 +29,19 @@ The bars as a module (novox/hq ADR 0208, research 026/05).
|
||||
## Blocks other modules contribute (novox/hq ADR 0255)
|
||||
|
||||
A block that depends on the machine's hardware is not written here. The module that knows the hardware
|
||||
contributes it to `node-bar` as data that says what it shows, and this module renders it:
|
||||
contributes it as text, in this module's grammar, to the bar's collection of blocks:
|
||||
|
||||
- **What a contribution says:** which bar (`bottom`, `top`), which place (`resources`, beside the
|
||||
processor, memory and disks; `status`, beside the sound), an order from 0 to 99, what it shows
|
||||
(`battery`, `command`) and that kind's options. Nothing in it is i3status-rust's.
|
||||
- **How it is rendered:** the claim's `renders.block` is a template (its source is `files/block.tmpl`)
|
||||
that turns one piece into a `[[block]]`. The controller runs it and places the result where each bar
|
||||
says `${contribution:node-bar:block:bar=…,place=…}`. Each bar places both of its places once; the
|
||||
catalogue check refuses a holder that misses one.
|
||||
- **Where it applies:** a contribution may name a capability the machine must report. The `power`
|
||||
module's battery block names `battery` and its power-draw block names `power-meter`, so the laptop's
|
||||
bar gets both and a desktop only the power draw.
|
||||
- **What a contributor gives:** an item of the collection `contribution:node-bar:block`, the block text in
|
||||
i3status-rust's grammar (a `[[block]]`), with the attributes `bar` (`bottom`, `top`), `place` (`resources`,
|
||||
beside the processor, memory and disks; `status`, beside the sound) and `order` (0 to 99), and, where the
|
||||
block depends on the hardware, the capability the machine must report.
|
||||
- **How it is placed:** each bar says `${collected:contribution:node-bar:block:bar=…,place=…}`, where the node's
|
||||
provisioner client fills the items that carry those attributes, in order, each under a line naming its
|
||||
contributor. Each bar places both of its places once. Where the client does not fill the file, the controller
|
||||
fills the same text the same way.
|
||||
- **Where it applies:** an item may name a capability the machine must report. The `power` module's battery item
|
||||
names `battery` and its power-draw item names `power-meter`, so the laptop's bar gets both and a desktop only
|
||||
the power draw.
|
||||
- **A value from the bus:** a block that `shows: state` names another module's state, such as
|
||||
`power.draw`. The mesh grants this module the read, because a module on its machine offers it; the
|
||||
manifest names no other module. This module's bundle watches it and leaves the value's text in the
|
||||
|
||||
Reference in New Issue
Block a user