Events
Generated from LuaLS aliases and event namespace classes.
EasyBarEventHandler
The callback signature used by node:subscribe(...) and easybar.subscribe(...).
| Value |
fun(event: EasyBarEvent) |
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 delivered to the widget whose own interval schedule elapsed. |
"forced" |
Fired when EasyBar or easybar triggers a manual refresh. |
"system_woke" |
Fired after the system wakes from sleep. |
"session_active" |
Fired when the macOS user session becomes active. |
"session_inactive" |
Fired when the macOS user session resigns active status. |
"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. |
"capture_devices_changed" |
Fired when a camera or microphone connects or disconnects. |
"capture_activity_changed" |
Fired when camera or microphone activity state changes. |
"camera_activity_changed" |
Fired when camera activity state changes. |
"microphone_activity_changed" |
Fired when microphone activity state changes. |
"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. |
"context_menu.clicked" |
Fired when a native widget context menu action is selected. |
"inbox.action" |
Fired when a native inbox action is selected. Prefer easybar.inbox.on_action for source routing. |
"inbox.context_action" |
Fired when a publisher-provided inbox context-menu action is selected. Prefer easybar.inbox.on_context_action for source routing. |
"slider.preview" |
Fired while a slider is being previewed or dragged. |
"slider.changed" |
Fired when a slider value is committed. |
Mouse button names that may appear in event payloads.
| Value |
Meaning |
"left" |
Primary mouse button. |
"right" |
Secondary mouse button. |
"middle" |
Middle mouse button. |
Scroll directions that may appear in event payloads.
| Value |
Meaning |
"up" |
Upward scrolling. |
"down" |
Downward scrolling. |
"left" |
Leftward scrolling. |
"right" |
Rightward scrolling. |
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. |
EasyBarCaptureEventData
Normalized camera and microphone inventory and activity state.
| Property |
Type |
Description |
active |
boolean |
Whether any camera or microphone is active. |
camera_active |
boolean |
Whether at least one camera is active. |
microphone_active |
boolean |
Whether at least one microphone is active. |
cameras |
EasyBarCaptureDeviceData[] |
Connected cameras. |
microphones |
EasyBarCaptureDeviceData[] |
Connected microphones. |
Native widget context menu events.
| Property |
Type |
Description |
clicked (optional) |
EasyBarEventToken |
Fired when a native widget context menu action is selected. |
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. |
source (optional) |
string |
Diagnostic source that caused EasyBar to emit the event. |
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. |
action_id (optional) |
string |
Selected native context-menu action id. |
network (optional) |
EasyBarNetworkEventData |
Structured network event data. |
power (optional) |
EasyBarPowerEventData |
Structured power event data. |
audio (optional) |
EasyBarAudioEventData |
Structured audio event data. |
capture (optional) |
EasyBarCaptureEventData |
Structured camera and microphone state. |
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. |
session_active (optional) |
EasyBarEventToken |
Fired when the macOS user session becomes active. |
session_inactive (optional) |
EasyBarEventToken |
Fired when the macOS user session resigns active status. |
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. |
capture_devices_changed (optional) |
EasyBarEventToken |
Fired when a camera or microphone connects or disconnects. |
capture_activity_changed (optional) |
EasyBarEventToken |
Fired when camera or microphone activity state changes. |
camera_activity_changed (optional) |
EasyBarEventToken |
Fired when camera activity state changes. |
microphone_activity_changed (optional) |
EasyBarEventToken |
Fired when microphone activity state changes. |
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. |
context_menu (optional) |
EasyBarContextMenuEvents |
Native widget context menu events. |
inbox (optional) |
EasyBarInboxEvents |
Native shared inbox events. |
slider (optional) |
EasyBarSliderEvents |
Slider interaction event tokens. |
EasyBarInboxActionEvent
| Property |
Type |
Description |
name |
'inbox.action' |
|
source |
string |
Publisher source. |
target_widget_id |
string |
Inbox item id. |
action_id |
string |
Selected action id. |
EasyBarInboxContextActionEvent
| Property |
Type |
Description |
name |
'inbox.context_action' |
|
source |
string |
Publisher source. |
action_id |
string |
Selected source action id. |
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. |
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. |
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. |