Skip to content

Script

Executes a script and shows the result of stdout on a label. Pango markup is supported.

If you want to be able to embed multiple scripts and/or variables, prefer the label module. For more advanced use-cases, use custom.

Example

{
end = [
{
type = "script"
cmd = "/home/jake/.local/bin/phone-battery"
mode = "poll"
interval = 5000
}
]
}

Configuration

Type: script

Path to script to execute.

This can be an absolute path, or relative to the working directory.

Required

Type: string
Default: None

Time in milliseconds between executions.

Type: integer
Default: 5000

The justification (alignment) of the widget text shown on the bar.

Type: 'left' | 'right' | 'center' | 'fill'
Default: 'left'

Script execution mode. See modes for more info.


Type: 'poll' | 'watch'
Default: None

The orientation to display the widget contents. Setting to vertical will rotate text 90 degrees.

Type: 'horizontal' | 'vertical'
Default: 'horizontal'

Styling

SelectorDescription
.scriptScript widget label

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