Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
org.plasmazones.Snap

Snap-mode window placement: commit/uncommit confirmations, the snap-restore resolution chain, resnap and snap-all batch placement, daemon-driven navigation (move/focus/swap/push/by-number/rotate/cycle/restore), and snap-mode float. Geometry application flows BACK to the compositor over org.plasmazones.WindowTracking (applyGeometryRequested, applyGeometriesBatch) — this interface carries no signals.

Well-known name org.plasmazones.Snap
Source XML org.plasmazones.Snap.xml
Methods 29
Signals 0
Properties 0

Methods

<tt>windowSnapped()</tt>

Confirm a single-zone snap from the compositor effect.

Arg Direction Type Description
windowId in s *(string)*
zoneId in s *(string)*
screenId in s *(string)*

<tt>windowSnappedMultiZone()</tt>

Confirm a multi-zone (zone-span) snap from the compositor effect.

Arg Direction Type Description
windowId in s *(string)*
zoneIds in as *(array<string>)*
screenId in s *(string)*

<tt>windowUnsnapped()</tt>

Confirm an unsnap from the compositor effect.

Arg Direction Type Description
windowId in s *(string)*

<tt>windowsSnappedBatch()</tt>

Batch snap confirmations (rotate/resnap/snap-all completion).

Arg Direction Type Description
entries in a(sssb) *(array<struct(string,string,string,bool)>)* Array of (windowId, zoneId, screenId, isRestore).

<tt>recordSnapIntent()</tt>

Record that a window class was USER-snapped (not auto-snapped) — feeds the snap-intent (user-snapped-class) learning.

Arg Direction Type Description
windowId in s *(string)*
wasUserInitiated in b *(bool)*

<tt>snapToLastZone()</tt>

Resolve a snap into the last used zone. Out-args carry the target geometry; shouldSnap=false means no placement applies.

Arg Direction Type Description
windowId in s *(string)*
windowScreenId in s *(string)*
sticky in b *(bool)*
snapX out i *(int32)*
snapY out i *(int32)*
snapWidth out i *(int32)*
snapHeight out i *(int32)*
shouldSnap out b *(bool)*

<tt>snapToAppRule()</tt>

Resolve a snap into the window's SnapToZone-rule-defined zone(s).

Arg Direction Type Description
windowId in s *(string)*
windowScreenName in s *(string)*
sticky in b *(bool)*
snapX out i *(int32)*
snapY out i *(int32)*
snapWidth out i *(int32)*
snapHeight out i *(int32)*
shouldSnap out b *(bool)*

<tt>snapToEmptyZone()</tt>

Resolve a snap into the first empty zone.

Arg Direction Type Description
windowId in s *(string)*
windowScreenId in s *(string)*
sticky in b *(bool)*
snapX out i *(int32)*
snapY out i *(int32)*
snapWidth out i *(int32)*
snapHeight out i *(int32)*
shouldSnap out b *(bool)*

<tt>resolveWindowRestore()</tt>

Run the full snap-restore resolution (placement-store restore + placement-rule / empty-zone / last-zone fallback chain) in one call.

Arg Direction Type Description
windowId in s *(string)*
screenId in s *(string)*
sticky in b *(bool)*
windowKind in i *(int32)* Structural kind of the opening window (0=Unknown, 1=Normal, 2=Transient).
snapX out i *(int32)*
snapY out i *(int32)*
snapWidth out i *(int32)*
snapHeight out i *(int32)*
shouldSnap out b *(bool)*

<tt>resnapToNewLayout()</tt>

Resnap all windows from the previous layout to the current layout.

No arguments.

<tt>resnapCurrentAssignments()</tt>

Resnap windows to their current zone assignments.

Arg Direction Type Description
screenFilter in s *(string)* When non-empty, only resnap windows on this screen.

<tt>resnapFromAutotileOrder()</tt>

Resnap windows from autotile to manual zones using the explicit autotile window order.

Arg Direction Type Description
autotileWindowOrder in as *(array<string>)*
screenId in s *(string)*

<tt>calculateSnapAllWindows()</tt>

Calculate zone assignments for all provided windows (effect-local snap_all path applies the geometries).

Arg Direction Type Description
windowIds in as *(array<string>)*
screenId in s *(string)*
results out a(sssiiii) *(array<struct(string,string,string,int32,int32,int32,int32)>)* Array of (windowId, targetZoneId, sourceZoneId, x, y, width, height).

<tt>snapAllWindows()</tt>

Trigger snap-all-windows from a daemon shortcut (emits WindowTracking.snapAllWindowsRequested toward the effect).

Arg Direction Type Description
screenId in s *(string)*

<tt>handleBatchedResnap()</tt>

Process a batch of resnap entries (JSON payload) and emit the resulting WindowTracking.applyGeometriesBatch.

Arg Direction Type Description
resnapData in s *(string)*

<tt>moveWindowToAdjacentZone()</tt>

Move the focused window to an adjacent zone.

Arg Direction Type Description
direction in s *(string)* left, right, up, or down.

<tt>focusAdjacentZone()</tt>

Focus a window in an adjacent zone.

Arg Direction Type Description
direction in s *(string)*

<tt>pushToEmptyZone()</tt>

Push the focused window to the first empty zone.

Arg Direction Type Description
screenId in s *(string)* Screen to resolve layout/geometry for (empty = active layout).

<tt>restoreWindowSize()</tt>

Restore the focused window to its original size.

No arguments.

<tt>swapWindowWithAdjacentZone()</tt>

Swap the focused window with the window in an adjacent zone.

Arg Direction Type Description
direction in s *(string)*

<tt>snapToZoneByNumber()</tt>

Snap the focused window to a zone by its number.

Arg Direction Type Description
zoneNumber in i *(int32)* Zone number (1-9).
screenId in s *(string)*

<tt>rotateWindowsInLayout()</tt>

Rotate windows in the layout for a screen.

Arg Direction Type Description
clockwise in b *(bool)*
screenId in s *(string)* Screen to rotate on (empty = all screens).

<tt>cycleWindowsInZone()</tt>

Cycle focus between windows stacked in the same zone.

Arg Direction Type Description
forward in b *(bool)*

<tt>moveWindowToZone()</tt>

Snap a specific window to a specific zone by ID.

Arg Direction Type Description
windowId in s *(string)*
zoneId in s *(string)*

<tt>swapWindowsById()</tt>

Swap two specific windows by ID.

Arg Direction Type Description
windowId1 in s *(string)*
windowId2 in s *(string)*

<tt>toggleFloatForWindow()</tt>

Daemon-driven float toggle for snap-mode screens.

Arg Direction Type Description
windowId in s *(string)*
screenId in s *(string)*

<tt>setWindowFloat()</tt>

Set a window's floating state directly (snap mode).

Arg Direction Type Description
windowId in s *(string)*
floating in b *(bool)*

<tt>calculateUnfloatRestore()</tt>

Calculate unfloat restore geometry and zone IDs in a single call.

Arg Direction Type Description
windowId in s *(string)*
screenId in s *(string)*
result out (bassiiii) *(struct(bool,array<string>,string,int32,int32,int32,int32))* Struct: (found, zoneIds, screenName, x, y, width, height).

<tt>windowUnsnappedForFloat()</tt>

Unsnap a window for floating: saves its zone so unfloat can restore it.

Arg Direction Type Description
windowId in s *(string)*