The currently active client, monitor, and workspace.
All known Hyprland clients (windows).
Check if service has been disposed
All known Hyprland monitors.
All known Hyprland workspaces.
Creates a Binding for a property on this service.
The property to bind
A Binding that can be used in widget constructors
Notifies listeners that a property changed and emits the 'changed' signal.
The property name that changed
Connects a callback to a signal on this service.
The signal name (defaults to 'changed')
The callback to invoke when the signal is emitted
The signal connection ID
Creates an incremental list binding that reuses existing widgets.
Instead of recreating all widgets on every update, this method caches widgets by a key function and only creates new widgets for new items, destroying widgets for removed items.
A Binding that produces an array of widgets
ProtecteddisconnectClean up all tracked signal connections Call this in service-specific dispose implementations
ReadonlydispatchRuns a legacy text-protocol dispatch command (e.g. workspace 1),
translating it to the Lua dispatcher API.
A legacy dispatcher invocation without the dispatch prefix
Hyprland 0.55 removed the text dispatch protocol. Use the typed Hyprland.dispatch API instead.
Dispose of service resources Override in subclasses to add specific cleanup
Emits a signal, warning if the signal was not registered via Service.register.
The warning is cheap (a Set lookup per emit) and helps catch typos
and missing signal declarations that silently break .bind().
ReadonlyevalEvaluates a raw Lua string via the command socket's eval request.
Returns ok or the raised error.
The Lua source to execute
ReadonlygetRetrieves a client by its hex address.
The client address (e.g. "0x...")
The Client data or undefined
ReadonlygetReturns the GDK monitor corresponding to a Hyprland monitor ID.
The Hyprland monitor ID
The Gdk.Monitor or null
ReadonlygetRetrieves a monitor by its numeric ID.
The monitor ID
The Monitor data or undefined
ReadonlygetRetrieves a workspace by its numeric ID.
The workspace ID
The Workspace data or undefined
ReadonlymessageSends a synchronous IPC command to Hyprland.
The Hyprland IPC command string (e.g. "j/monitors")
The response string
ReadonlymessageProtectedretryProtectedtrackTrack a signal connection for automatic cleanup
The object the signal is connected to (defaults to this)
The signal connection ID
Track a signal connection for automatic cleanup
The signal connection ID
Updates a property value and emits a notify signal if the value changed.
Performs a deep equality check via JSON serialization to avoid unnecessary notifications.
The property name in kebab-case
The new value
StaticimportStaticpspecStaticregisterReadonlydispatchTyped, Lua-native dispatch API mirroring Hyprland's hl.dsp.*
dispatchers (Hyprland 0.55+). Example: hyprland.dispatch.focus({ workspace: '3' }).
Move the cursor to an absolute coordinate.
Move the cursor to a corner of the window (corner 0-3).
Toggle monitors on/off.
Send an event to socket2.
Execute a command via sh -c. Optional window rules table.
Execute a raw command without sh -c.
Quit Hyprland. Prefer hyprshutdown.
Move focus (by direction, monitor, workspace, window, etc.).
Set elapsed time for all idle timers.
Activate a D-Bus global shortcut.
Focus a window in a group by index.
Lock a group.
Lock the active group.
Move a window within the group order.
Focus the next window in a group.
Focus the previous window in a group.
Toggle a group.
Send a layout message string to the active layout.
Does nothing; useful for conditional binds.
Escape hatch: dispatch a raw hl.dsp.* expression string.
Switch to a submap.
Alter a window's z-order (mode: "top" or "bottom").
Center the current window.
Clear all tags from a window.
Gracefully request the window to close.
Begin an interactive drag (mouse binds).
Set a window's floating state (action: toggle/true/false).
Set a window's fullscreen state.
Set a window's fullscreen state with internal/client precision.
Kill the window's process with SIGKILL.
Move a window (direction/workspace/monitor/coords/group).
Pin a window across workspaces.
Set a window's pseudotiling state.
Resize a window, or begin an interactive resize with no args.
Set a window property.
Send a POSIX signal to the window's process.
Swap the active window with another.
Tag a window.
Toggle all swallowed windows visible.
Move a workspace to a monitor.
Rename a workspace.
Swap the current workspaces of two monitors.
Toggle a named special workspace.
Hyprland Compositor Service
Service for interacting with the Hyprland compositor via its IPC socket.
Lifecycle:
Fires
event - Emitted for every Hyprland event (eventType: string, params: string)
Fires
urgent-window - Emitted when window becomes urgent (address: string)
Fires
submap - Emitted on submap change (submapName: string)
Fires
keyboard-layout - Emitted on layout change (deviceName: string, layoutName: string)
Fires
monitor-added - Emitted when monitor is added (monitorName: string)
Fires
monitor-removed - Emitted when monitor is removed (monitorName: string)
Fires
workspace-added - Emitted when workspace is created (workspaceId: string)
Fires
workspace-removed - Emitted when workspace is destroyed (workspaceId: string)
Fires
client-added - Emitted when window is opened (address: string)
Fires
client-removed - Emitted when window is closed (address: string)
Fires
fullscreen - Emitted on fullscreen state change (isFullscreen: boolean)
Fires
screencast - Emitted on screencast change (state: boolean, owner: number, target: string)
Fires
activespecial - Emitted on special workspace change (workspaceName: string, monitorName: string)
Fires
pin - Emitted on window pin change (address: string, pinned: boolean)
Fires
minimized - Emitted on window minimize change (address: string, minimized: boolean)
Fires
bell - Emitted on window bell (address: string)
Fires
configreloaded - Emitted when config is reloaded
Fires
empty - Emitted when workspace becomes empty (workspaceId: string)
Fires
kill - Emitted when window is killed (address: string)
Fires
changed - Emitted when any state changes