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 } ]}{ "end": [ { "type": "script", "cmd": "/home/jake/.local/bin/phone-battery", "mode": "poll", "interval": 5000 } ]}end: - type: script cmd: /home/jake/.local/bin/phone-battery mode: poll interval: 5000[[end]]type = "script"cmd = "/home/jake/.local/bin/phone-battery"mode = "poll"interval = 5_000Configuration
Type:
script
Path to script to execute.
This can be an absolute path, or relative to the working directory.
Required
Type: string
Default: None
interval
Section titled “interval”Time in milliseconds between executions.
Type: integer
Default: 5000
justify
Section titled “justify”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
orientation
Section titled “orientation”The orientation to display the widget contents. Setting to vertical will rotate text 90 degrees.
Type: 'horizontal' | 'vertical'
Default: 'horizontal'
Styling
| Selector | Description |
|---|---|
.script | Script widget label |
For more information on styling, please see the styling guide.