mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 18:51:04 +02:00
feat: new label module
Takes a text label, with the ability to include embedded scripts. Resolves #80.
This commit is contained in:
parent
55c06c4766
commit
6c622864b3
11 changed files with 153 additions and 1 deletions
70
docs/modules/Label.md
Normal file
70
docs/modules/Label.md
Normal file
|
@ -0,0 +1,70 @@
|
|||
Displays custom text, with the ability to embed [scripts](https://github.com/JakeStanger/ironbar/wiki/scripts#embedding).
|
||||
|
||||
## Configuration
|
||||
|
||||
> Type: `label`
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|---------|----------|---------|-----------------------------------------|
|
||||
| `label` | `string` | `null` | Text, optionally with embedded scripts. |
|
||||
|
||||
<details>
|
||||
<summary>JSON</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"end": [
|
||||
{
|
||||
"type": "label",
|
||||
"label": "random num: {{500:echo $RANDOM}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>TOML</summary>
|
||||
|
||||
```toml
|
||||
[[end]]
|
||||
type = "label"
|
||||
label = "random num: {{500:echo $RANDOM}}"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>YAML</summary>
|
||||
|
||||
```yaml
|
||||
end:
|
||||
- type: "label"
|
||||
label: "random num: {{500:echo $RANDOM}}"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Corn</summary>
|
||||
|
||||
```corn
|
||||
{
|
||||
end = [
|
||||
{
|
||||
type = "label"
|
||||
label = "random num: {{500:echo $RANDOM}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Styling
|
||||
|
||||
| Selector | Description |
|
||||
|--------------------------------|------------------------------------------------------------------------------------|
|
||||
| `#label` | Label widget |
|
Loading…
Add table
Add a link
Reference in a new issue