Skip to content

Label

Displays custom text, with markup support.

If you only intend to run a single script, prefer the script module. For more advanced use-cases, use custom.

Configuration

Type: label

NameTypeDefaultDescription
labelDynamic StringnullText to show on label.
truncate'start' or 'middle' or 'end' or off or MapoffThe location of the ellipses and where to truncate text from. Leave null to avoid truncating. Use the long-hand Map version if specifying a length.
truncate.mode'start' or 'middle' or 'end' or offoffThe location of the ellipses and where to truncate text from. Leave null to avoid truncating.
truncate.lengthintegernullThe fixed width (in chars) of the widget. Leave blank to let GTK automatically handle.
truncate.max_lengthintegernullThe maximum number of characters before truncating. Leave blank to let GTK automatically handle.
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

SelectorDescription
.labelLabel widget

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