1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 11:24:24 +02:00
ironbar/docs/modules/Label.md
Jake Stanger dea66415c2
feat: module-level name and class options
BREAKING CHANGE: To allow for the `name` property, any widgets that were previously targeted by name should be targeted by class instead. This affects **all modules and all popups**, as well as several widgets inside modules. **This will break a lot of rules in your stylesheet**. To attempt to mitigate the damage, a migration script can be found [here](https://raw.githubusercontent.com/JakeStanger/ironbar/master/scripts/migrate-styles.sh) that should get you most of the way.

Resolves #75.
2023-05-06 13:22:35 +01:00

1.3 KiB

Displays custom text, with the ability to embed scripts.

Configuration

Type: label

Name Type Default Description
label string null Text, optionally with embedded scripts.
JSON
{
  "end": [
    {
      "type": "label",
      "label": "random num: {{500:echo $RANDOM}}"
    }
  ]
}

TOML
[[end]]
type = "label"
label = "random num: {{500:echo $RANDOM}}"
YAML
end:
  - type: "label"
    label: "random num: {{500:echo $RANDOM}}"
Corn
{
  end = [
    {
      type = "label"
      label = "random num: {{500:echo $RANDOM}}"
    }
  ]
}

Styling

Selector Description
.label Label widget

For more information on styling, please see the styling guide.