Events¶
Generated from LuaLS aliases and event namespace classes.
EasyBarEventName¶
Canonical runtime event-name strings carried inside EasyBarEventToken.name.
In normal widget code, prefer easybar.events.* tokens over comparing raw strings.
| Value | Meaning |
|---|---|
"interval" |
Internal timer callback name used when interval and on_interval are configured on a node. |
"forced" |
Fired when EasyBar or easybar triggers a manual refresh. |
"system_woke" |
Fired after the system wakes from sleep. |
"sleep" |
Fired before the system goes to sleep. |
"space_change" |
Fired when the active macOS space changes. |
"app_switch" |
Fired when the frontmost app changes. |
"display_change" |
Fired when attached displays change. |
"power_source_change" |
Fired when the power source changes. |
"charging_state_change" |
Fired when charging starts or stops. |
"wifi_change" |
Fired when Wi-Fi state or SSID changes. |
"network_change" |
Fired when network routing or tunnel state changes. |
"volume_change" |
Fired when output volume changes. |
"mute_change" |
Fired when mute state changes. |
"minute_tick" |
Fired once per minute. |
"second_tick" |
Fired once per second. |
"calendar_change" |
Fired when the calendar snapshot updates. |
"focus_change" |
Fired when workspace focus changes. |
"workspace_change" |
Fired when workspace layout or selection changes. |
"space_mode_change" |
Fired when the AeroSpace layout mode changes. |
"mouse.entered" |
Fired when the pointer enters the subscribed node frame. |
"mouse.exited" |
Fired when the pointer leaves the subscribed node frame. |
"mouse.clicked" |
Fired when the subscribed node is clicked. |
"mouse.down" |
Fired on mouse button press over the subscribed node. |
"mouse.up" |
Fired on mouse button release over the subscribed node. |
"mouse.scrolled" |
Fired when the pointer scrolls over the subscribed node. |
"slider.preview" |
Fired while a slider is being previewed or dragged. |
"slider.changed" |
Fired when a slider value is committed. |
Supporting Aliases¶
EasyBarEventHandler¶
The callback signature used by node:subscribe(...) and easybar.subscribe(...).
| Value |
|---|
fun(event: EasyBarEvent) |
EasyBarMouseButton¶
Mouse button names that may appear in event payloads.
| Value | Meaning |
|---|---|
"left" |
Primary mouse button. |
"right" |
Secondary mouse button. |
"middle" |
Middle mouse button. |
EasyBarScrollDirection¶
Scroll directions that may appear in event payloads.
| Value | Meaning |
|---|---|
"up" |
Upward scrolling. |
"down" |
Downward scrolling. |
"left" |
Leftward scrolling. |
"right" |
Rightward scrolling. |
EasyBarEvent¶
The event payload object delivered to event handlers. Different event families populate different optional fields.
| Property | Type | Description |
|---|---|---|
name |
string |
The dispatched event name. |
widget_id (optional) |
string |
The subscribed widget id receiving the event. |
target_widget_id (optional) |
string |
The concrete node id that received the interaction. |
app_name (optional) |
string |
The focused app name for app-switch style events. |
button (optional) |
EasyBarMouseButton\|string |
The mouse button name, usually left, right, or middle. |
direction (optional) |
EasyBarScrollDirection\|string |
The scroll direction, usually up, down, left, or right. |
value (optional) |
number\|string\|boolean |
The event value for slider and driver updates. |
delta_x (optional) |
number |
Horizontal scroll delta. |
delta_y (optional) |
number |
Vertical scroll delta. |
network (optional) |
EasyBarNetworkEventData |
Structured network event data. |
power (optional) |
EasyBarPowerEventData |
Structured power event data. |
audio (optional) |
EasyBarAudioEventData |
Structured audio event data. |
EasyBarEventToken¶
Opaque subscribe token object passed through from easybar.events.*.
| Property | Type | Description |
|---|---|---|
name |
EasyBarEventName |
The canonical runtime event name sent by EasyBar. |
EasyBarEvents¶
Namespace object exposed as easybar.events.
Use these tokens when subscribing widgets instead of hard-coding event-name strings.
| Property | Type | Description |
|---|---|---|
forced (optional) |
EasyBarEventToken |
Fired when EasyBar or easybar triggers a manual refresh. |
system_woke (optional) |
EasyBarEventToken |
Fired after the system wakes from sleep. |
sleep (optional) |
EasyBarEventToken |
Fired before the system goes to sleep. |
space_change (optional) |
EasyBarEventToken |
Fired when the active macOS space changes. |
app_switch (optional) |
EasyBarEventToken |
Fired when the frontmost app changes. |
display_change (optional) |
EasyBarEventToken |
Fired when attached displays change. |
power_source_change (optional) |
EasyBarEventToken |
Fired when the power source changes. |
charging_state_change (optional) |
EasyBarEventToken |
Fired when charging starts or stops. |
wifi_change (optional) |
EasyBarEventToken |
Fired when Wi-Fi state or SSID changes. |
network_change (optional) |
EasyBarEventToken |
Fired when network routing or tunnel state changes. |
volume_change (optional) |
EasyBarEventToken |
Fired when output volume changes. |
mute_change (optional) |
EasyBarEventToken |
Fired when mute state changes. |
minute_tick (optional) |
EasyBarEventToken |
Fired once per minute. |
second_tick (optional) |
EasyBarEventToken |
Fired once per second. |
calendar_change (optional) |
EasyBarEventToken |
Fired when the calendar snapshot updates. |
focus_change (optional) |
EasyBarEventToken |
Fired when workspace focus changes. |
workspace_change (optional) |
EasyBarEventToken |
Fired when workspace layout or selection changes. |
space_mode_change (optional) |
EasyBarEventToken |
Fired when the AeroSpace layout mode changes. |
mouse (optional) |
EasyBarMouseEvents |
Mouse interaction event tokens and constants. |
slider (optional) |
EasyBarSliderEvents |
Slider interaction event tokens. |
EasyBarMouseEvents¶
Mouse-specific interaction tokens and convenience constants nested under easybar.events.mouse.
| Property | Type | Description |
|---|---|---|
entered (optional) |
EasyBarEventToken |
Fired when the pointer enters the subscribed node frame. |
exited (optional) |
EasyBarEventToken |
Fired when the pointer leaves the subscribed node frame. |
clicked (optional) |
EasyBarEventToken |
Fired when the subscribed node is clicked. |
down (optional) |
EasyBarEventToken |
Fired on mouse button press over the subscribed node. |
up (optional) |
EasyBarEventToken |
Fired on mouse button release over the subscribed node. |
scrolled (optional) |
EasyBarEventToken |
Fired when the pointer scrolls over the subscribed node. |
left_button |
EasyBarMouseButton |
Constant for event.button == "left". |
right_button |
EasyBarMouseButton |
Constant for event.button == "right". |
middle_button |
EasyBarMouseButton |
Constant for event.button == "middle". |
up_scroll |
EasyBarScrollDirection |
Constant for event.direction == "up". |
down_scroll |
EasyBarScrollDirection |
Constant for event.direction == "down". |
left_scroll |
EasyBarScrollDirection |
Constant for event.direction == "left". |
right_scroll |
EasyBarScrollDirection |
Constant for event.direction == "right". |
buttons |
EasyBarMouseButtons |
Nested mouse-button constants. |
directions |
EasyBarScrollDirections |
Nested scroll-direction constants. |
EasyBarSliderEvents¶
Slider-specific interaction tokens nested under easybar.events.slider.
| Property | Type | Description |
|---|---|---|
preview (optional) |
EasyBarEventToken |
Fired while a slider is being previewed or dragged. |
changed (optional) |
EasyBarEventToken |
Fired when a slider value is committed. |
EasyBarMouseButtons¶
Convenience constants mirrored under easybar.events.mouse.buttons.
| Property | Type | Description |
|---|---|---|
left |
EasyBarMouseButton |
Matches the primary mouse button. |
right |
EasyBarMouseButton |
Matches the secondary mouse button. |
middle |
EasyBarMouseButton |
Matches the middle mouse button. |
EasyBarScrollDirections¶
Convenience constants mirrored under easybar.events.mouse.directions.
| Property | Type | Description |
|---|---|---|
up |
EasyBarScrollDirection |
Matches upward scrolling. |
down |
EasyBarScrollDirection |
Matches downward scrolling. |
left |
EasyBarScrollDirection |
Matches leftward scrolling. |
right |
EasyBarScrollDirection |
Matches rightward scrolling. |
EasyBarNetworkEventData¶
Structured network-specific fields that may be present on network-related events.
| Property | Type | Description |
|---|---|---|
primary_interface_is_tunnel (optional) |
boolean |
Whether the current primary network interface is a tunnel. |
interface_name (optional) |
string |
The network interface name when provided. |
EasyBarPowerEventData¶
Structured power-specific fields that may be present on charging or power-source events.
| Property | Type | Description |
|---|---|---|
charging (optional) |
boolean |
Whether the current power source is charging. |
EasyBarAudioEventData¶
Structured audio-specific fields that may be present on mute or volume events.
| Property | Type | Description |
|---|---|---|
muted (optional) |
boolean |
Whether the current audio output is muted. |
value (optional) |
number |
The current audio-related value when provided. |