Layout management: CRUD, screen and virtual-desktop assignments, quick layout slots (1-9), KDE Activities, and editor launch.
| Well-known name | org.plasmazones.LayoutRegistry |
| Source XML | org.plasmazones.LayoutRegistry.xml |
| Methods | 52 |
| Signals | 10 |
| Properties | 0 |
Returns the currently active layout as JSON (id, name, zones, etc.).
| Arg | Direction | Type | Description |
|---|---|---|---|
layoutJson | out | s *(string)* | Full layout as JSON (id, name, zones, etc.). |
Returns a list of all available layout IDs (or JSON array of layout objects, depending on implementation).
| Arg | Direction | Type | Description |
|---|---|---|---|
layouts | out | as *(array<string>)* | List of layout IDs or JSON array of layout objects. |
Source-agnostic list of renderer-ready previews across manual zone layouts and autotile algorithms. Each entry is a PhosphorLayout::LayoutPreview serialised to JSON (id, displayName, zones[]{x,y,width,height}, isAutotile, optional algorithm{...} metadata for autotile entries). Renderers consume uniformly without branching on the underlying source. Returns '[]' when no source is wired (early startup).
| Arg | Direction | Type | Description |
|---|---|---|---|
previewListJson | out | s *(string)* | JSON array of LayoutPreview objects. |
Source-agnostic preview for a single entry. id must match one returned by getLayoutPreviewList. windowCount is honoured by autotile sources (algorithm runs at that count); manual sources ignore it. Returns '{}' when id is unknown or no source is wired.
| Arg | Direction | Type | Description |
|---|---|---|---|
id | in | s *(string)* | Preview id (manual layout UUID with braces, or 'autotile:<algorithmId>'). |
windowCount | in | i *(int32)* | Window count to render autotile algorithms with. Ignored by manual sources. |
previewJson | out | s *(string)* | LayoutPreview serialised to JSON, or '{}' if not found. |
Returns a specific layout by ID as JSON. Empty string if not found.
| Arg | Direction | Type | Description |
|---|---|---|---|
id | in | s *(string)* | Layout UUID. |
layoutJson | out | s *(string)* | Full layout as JSON, or empty if not found. |
Switch to the layout with the given UUID.
| Arg | Direction | Type | Description |
|---|---|---|---|
id | in | s *(string)* | Layout UUID to activate. |
Apply quick layout slot (1-9) to the given screen.
| Arg | Direction | Type | Description |
|---|---|---|---|
number | in | i *(int32)* | Slot number (1-9). |
screenName | in | s *(string)* | Target screen name (e.g. DP-1). |
Create a new empty layout. Returns the new layout UUID.
| Arg | Direction | Type | Description |
|---|---|---|---|
name | in | s *(string)* | Display name for the layout. |
type | in | s *(string)* | Layout type (e.g. custom). |
layoutId | out | s *(string)* | UUID of the created layout. |
Permanently delete the layout with the given ID.
| Arg | Direction | Type | Description |
|---|---|---|---|
id | in | s *(string)* | Layout UUID to delete. |
Create a copy of an existing layout. Returns the new layout UUID.
| Arg | Direction | Type | Description |
|---|---|---|---|
id | in | s *(string)* | Layout UUID to duplicate. |
layoutId | out | s *(string)* | UUID of the new layout copy. |
Import a layout from a JSON file. Returns the imported layout UUID.
| Arg | Direction | Type | Description |
|---|---|---|---|
filePath | in | s *(string)* | Absolute path to the JSON file. |
layoutId | out | s *(string)* | UUID of the imported layout. |
Export a layout to a JSON file at the given path.
| Arg | Direction | Type | Description |
|---|---|---|---|
layoutId | in | s *(string)* | Layout UUID to export. |
filePath | in | s *(string)* | Destination file path. |
Set whether a layout is hidden from the zone selector.
| Arg | Direction | Type | Description |
|---|---|---|---|
layoutId | in | s *(string)* | Layout UUID. |
hidden | in | b *(bool)* | True to hide from zone selector. |
Set whether a layout auto-assigns new windows to empty zones.
| Arg | Direction | Type | Description |
|---|---|---|---|
layoutId | in | s *(string)* | Layout UUID. |
enabled | in | b *(bool)* | True to enable auto-assign. |
Launch the layout editor for the active layout.
No arguments.
Launch the layout editor for the layout assigned to the given screen.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen to edit layout for (e.g. DP-1). |
Get the layout currently in use on a screen (resolves with current virtual desktop and activity context).
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen name (e.g. DP-1). |
layoutId | out | s *(string)* | Layout UUID or empty string. |
Assign a layout to a screen for all virtual desktops.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Target screen name. |
layoutId | in | s *(string)* | Layout UUID to assign. |
Remove the layout assignment from a screen.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen to clear assignment for. |
Batch set all base screen assignments (saves once). Clears existing base assignments first.
| Arg | Direction | Type | Description |
|---|---|---|---|
assignments | in | a{ss} *(dict<string,string>)* | Map of screenName to layoutId. |
Get layout for a specific screen and virtual desktop (1-based).
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen name (e.g. DP-1). |
virtualDesktop | in | i *(int32)* | Virtual desktop index (1-based). |
layoutId | out | s *(string)* | Layout UUID or empty string. |
Assign layout to a specific screen and virtual desktop.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Target screen name. |
virtualDesktop | in | i *(int32)* | Virtual desktop index (1-based). |
layoutId | in | s *(string)* | Layout UUID to assign. |
Clear layout assignment for a screen/desktop combination.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen name. |
virtualDesktop | in | i *(int32)* | Virtual desktop index (1-based). |
True if there is an explicit assignment (not inherited) for this screen/desktop.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen name. |
virtualDesktop | in | i *(int32)* | Virtual desktop index (1-based). |
hasAssignment | out | b *(bool)* | True if explicit assignment exists. |
Get the current mode (0=Snapping, 1=Autotile) for a screen/desktop.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | |
virtualDesktop | in | i *(int32)* | |
mode | out | i *(int32)* |
Get the snapping layout UUID for a screen/desktop (regardless of current mode).
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | |
virtualDesktop | in | i *(int32)* | |
layoutId | out | s *(string)* |
Get the tiling algorithm ID for a screen/desktop (regardless of current mode).
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | |
virtualDesktop | in | i *(int32)* | |
algorithm | out | s *(string)* |
Batch set all per-desktop assignments (saves once). Key format: screenName:desktopNumber.
| Arg | Direction | Type | Description |
|---|---|---|---|
assignments | in | a{ss} *(dict<string,string>)* | Map of 'screen:desktop' to layoutId. |
Get all per-desktop assignments.
| Arg | Direction | Type | Description |
|---|---|---|---|
assignments | out | a{ss} *(dict<string,string>)* | Map of 'screen:desktop' to layoutId. |
Returns the number of virtual desktops.
| Arg | Direction | Type | Description |
|---|---|---|---|
count | out | i *(int32)* | Number of virtual desktops. |
Returns the names of all virtual desktops.
| Arg | Direction | Type | Description |
|---|---|---|---|
names | out | as *(array<string>)* | Array of desktop names. |
Returns the daemon's effective screen ids — one entry per physical monitor PLUS any virtual-screen subdivisions configured on top. Use this for screen enumeration in UI / settings panels; getAllScreenAssignments is the assignment-state readback and emits only screens with stored entries.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenIds | out | as *(array<string>)* | Stable screen ids (e.g. '{edid-uuid}' for physical, '{edid-uuid}/vs:0' for virtual subdivisions). Order follows the daemon's effective-screen iteration. |
Returns all screen-to-layout assignments as JSON. The JSON is a view of stored assignment state (suitable for round-trip back through setAllScreenAssignments) — synthesized level-1 global-default fallbacks are deliberately NOT serialized, so callers that need the resolved mode for an unconfigured screen must use the per-context lookup methods instead. Only screens with at least one stored entry (base or per-desktop) appear; for screen enumeration use getAvailableScreenIds.
| Arg | Direction | Type | Description |
|---|---|---|---|
assignmentsJson | out | s *(string)* | JSON object keyed by connector name, containing one entry per screen with stored assignments. Each entry includes {"screenId": <stable-id>}. Screens with an explicit base-level assignment additionally include {"default", "snappingLayout", "tilingAlgorithm", "mode"}; screens with explicit per-desktop assignments include numeric-string keys ("1", "2", …) mapping to the assigned layout id. Screens with no stored entries are omitted entirely — DO NOT use this method to enumerate available screens; call getAvailableScreenIds instead. |
Get the layout ID assigned to a quick slot (1-9).
| Arg | Direction | Type | Description |
|---|---|---|---|
slotNumber | in | i *(int32)* | Slot number (1-9). |
layoutId | out | s *(string)* | Layout UUID or empty string. |
Assign a layout to a quick slot (1-9).
| Arg | Direction | Type | Description |
|---|---|---|---|
slotNumber | in | i *(int32)* | Slot number (1-9). |
layoutId | in | s *(string)* | Layout UUID to assign (empty to clear). |
Batch set all quick layout slots (saves once).
| Arg | Direction | Type | Description |
|---|---|---|---|
slots | in | a{ss} *(dict<string,string>)* | Map of slot number (as string) to layoutId. |
Get all quick layout slot assignments.
| Arg | Direction | Type | Description |
|---|---|---|---|
slots | out | a{ss} *(dict<string,string>)* | Map of slot number (as string) to layoutId. |
Get the current virtual desktop number (1-indexed). Returns 0 if unavailable.
| Arg | Direction | Type | Description |
|---|---|---|---|
desktop | out | i *(int32)* | Current virtual desktop number (1-based), or 0 if unavailable. |
True if KDE Activities are available.
| Arg | Direction | Type | Description |
|---|---|---|---|
available | out | b *(bool)* | True if Activities are available. |
Returns the list of activity IDs.
| Arg | Direction | Type | Description |
|---|---|---|---|
activityIds | out | as *(array<string>)* | List of activity IDs. |
Returns the current activity ID.
| Arg | Direction | Type | Description |
|---|---|---|---|
activityId | out | s *(string)* | Current activity ID. |
Returns activity metadata as JSON for the given activity ID.
| Arg | Direction | Type | Description |
|---|---|---|---|
activityId | in | s *(string)* | Activity ID to query. |
activityJson | out | s *(string)* | Activity metadata as JSON. |
Returns metadata for all activities as JSON.
| Arg | Direction | Type | Description |
|---|---|---|---|
activitiesJson | out | s *(string)* | All activities metadata as JSON. |
Get layout for a screen and activity (any desktop).
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen name (e.g. DP-1). |
activityId | in | s *(string)* | KDE Activity ID. |
layoutId | out | s *(string)* | Layout UUID or empty string. |
Assign layout to a screen and activity.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Target screen name. |
activityId | in | s *(string)* | KDE Activity ID. |
layoutId | in | s *(string)* | Layout UUID to assign. |
Clear layout assignment for a screen/activity combination.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen name. |
activityId | in | s *(string)* | KDE Activity ID. |
True if there is an explicit assignment for this screen/activity.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen name. |
activityId | in | s *(string)* | KDE Activity ID. |
hasAssignment | out | b *(bool)* | True if explicit assignment exists. |
Batch set all per-activity assignments (saves once). Key format: screenName:activityId.
| Arg | Direction | Type | Description |
|---|---|---|---|
assignments | in | a{ss} *(dict<string,string>)* | Map of 'screen:activity' to layoutId. |
Get all per-activity assignments.
| Arg | Direction | Type | Description |
|---|---|---|---|
assignments | out | a{ss} *(dict<string,string>)* | Map of 'screen:activity' to layoutId. |
Get layout for screen, virtual desktop, and activity.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen name (e.g. DP-1). |
virtualDesktop | in | i *(int32)* | Virtual desktop index (1-based). |
activityId | in | s *(string)* | KDE Activity ID. |
layoutId | out | s *(string)* | Layout UUID or empty string. |
Assign layout to screen, desktop, and activity.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Target screen name. |
virtualDesktop | in | i *(int32)* | Virtual desktop index (1-based). |
activityId | in | s *(string)* | KDE Activity ID. |
layoutId | in | s *(string)* | Layout UUID to assign. |
Clear layout assignment for screen/desktop/activity.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | in | s *(string)* | Screen name. |
virtualDesktop | in | i *(int32)* | Virtual desktop index (1-based). |
activityId | in | s *(string)* | KDE Activity ID. |
Emitted when the current KDE Activity changes.
| Arg | Direction | Type | Description |
|---|---|---|---|
activityId | out | s *(string)* | New current activity ID. |
Emitted when the list of activities changes.
No payload.
Emitted when the number of virtual desktops changes.
| Arg | Direction | Type | Description |
|---|---|---|---|
count | out | i *(int32)* | New virtual desktop count. |
Emitted on structural layout mutations (editor save, updateLayout, createLayoutFromJson). Carries the full layout JSON payload. Scalar property mutations (hidden, autoAssign, aspectRatioClass) emit layoutPropertyChanged instead to avoid the full serialization.
| Arg | Direction | Type | Description |
|---|---|---|---|
layoutJson | out | s *(string)* | Full layout as JSON. |
Cheap context-switch notification: emitted alongside layoutChanged(json) on every active-layout switch, but carries only the layout UUID instead of the full JSON payload. Subscribers that re-load from disk (e.g. the editor) can bind to this signal and ignore the heavier layoutChanged emit.
| Arg | Direction | Type | Description |
|---|---|---|---|
layoutId | out | s *(string)* | UUID of the newly active layout. |
Compact per-property change notification. Replaces layoutChanged(json) for setLayoutHidden, setLayoutAutoAssign, and setLayoutAspectRatioClass. Subscribers that want the full shape should pull it via getLayout(layoutId) — the adaptor's cache is invalidated before the signal fires.
| Arg | Direction | Type | Description |
|---|---|---|---|
layoutId | out | s *(string)* | Layout UUID whose property changed. |
property | out | s *(string)* | Property name: 'hidden', 'autoAssign', or 'aspectRatioClass'. |
value | out | v *(variant)* | New value as a variant (bool or int). |
Emitted when the list of layouts changes.
No payload.
Emitted when a new layout is created (createLayout, createLayoutFromJson, duplicateLayout, importLayout). Carries the new layout's UUID.
| Arg | Direction | Type | Description |
|---|---|---|---|
layoutId | out | s *(string)* | UUID of the newly created layout. |
Emitted when a layout is deleted. Carries the UUID of the deleted layout.
| Arg | Direction | Type | Description |
|---|---|---|---|
layoutId | out | s *(string)* | UUID of the deleted layout. |
Emitted when a screen's layout assignment changes.
| Arg | Direction | Type | Description |
|---|---|---|---|
screenName | out | s *(string)* | Screen whose assignment changed. |
layoutId | out | s *(string)* | Assigned layout UUID. |
virtualDesktop | out | i *(int32)* | Virtual desktop number (0 = display default). |