Functions¶
Generated from LuaLS function annotations.
EasyBar.add¶
Creates one EasyBar node and returns its handle.
Use easybar.kind.item for simple widgets, easybar.kind.group for shared containers,
and easybar.kind.row / easybar.kind.column for layout wrappers around child nodes.
When interval and on_interval are provided, EasyBar runs on_interval
on the configured cadence without requiring an event subscription.
Parameters¶
| Name | Type | Description |
|---|---|---|
kind |
EasyBarKind |
|
id |
string |
|
props (optional) |
EasyBarNodeProps |
Returns¶
EasyBarNodeHandle
EasyBar.clear_defaults¶
Clears previously configured widget defaults.
EasyBar.default¶
Sets per-widget default properties for future easybar.add(...) calls.
Defaults apply only within the current widget file.
Parameters¶
| Name | Type | Description |
|---|---|---|
props |
EasyBarNodeProps |
EasyBar.exec¶
Runs one shell command. When a callback is provided, the trimmed command output and exit code are passed to it.
Parameters¶
| Name | Type | Description |
|---|---|---|
command |
string |
|
callback (optional) |
fun(output: string, code: integer): any |
Returns¶
any
EasyBar.exec_async¶
Runs one shell command in the background. The callback receives trimmed output and the command exit code when the job finishes.
Parameters¶
| Name | Type | Description |
|---|---|---|
command |
string |
|
callback |
fun(output: string, code: integer): any |
Returns¶
string
EasyBar.get¶
Returns a copy of one existing node's current property table.
Parameters¶
| Name | Type | Description |
|---|---|---|
id |
string |
Returns¶
EasyBarNodeProps
EasyBar.log¶
Writes one widget-scoped log line to the EasyBar host logger.
Supported levels are trace, debug, info, warn, and error.
Which messages are actually emitted depends on the host logging level.
Parameters¶
| Name | Type | Description |
|---|---|---|
level |
EasyBarLevel\|string |
|
... |
any |
EasyBar.remove¶
Removes one existing node and all of its descendants by id.
Parameters¶
| Name | Type | Description |
|---|---|---|
id |
string |
EasyBar.set¶
Merges properties into one existing node by id.
Parameters¶
| Name | Type | Description |
|---|---|---|
id |
string |
|
props |
EasyBarNodeProps |
EasyBar.subscribe¶
Subscribes one existing node to one or more event tokens by id.
Parameters¶
| Name | Type | Description |
|---|---|---|
id |
string |
|
events |
EasyBarEventToken\|EasyBarEventToken[] |
|
handler |
EasyBarEventHandler |
EasyBarNodeHandle:get¶
Returns a copy of this node's current property table.
Returns¶
EasyBarNodeProps
EasyBarNodeHandle:remove¶
Removes this node and all of its descendants.
EasyBarNodeHandle:set¶
Merges properties into this node.
Parameters¶
| Name | Type | Description |
|---|---|---|
props |
EasyBarNodeProps |
EasyBarNodeHandle:subscribe¶
Subscribes this node to one or more event tokens. Interaction belongs to this node frame.
Parameters¶
| Name | Type | Description |
|---|---|---|
events |
EasyBarEventToken\|EasyBarEventToken[] |
|
handler |
EasyBarEventHandler |