Skip to content
Edith

Docs

Command reference

Desk Loom

Desk Loom saves and restores named desks of app windows. Enable deskLoom, then use ed invoke. Every payload is a JSON object, and desk operations take a deskID from the desks list in any snapshot.

Terminal
ed invoke deskLoom deskLoom.readed invoke deskLoom deskLoom.capture --json '{"name":"Coding"}'ed invoke deskLoom deskLoom.preview --json '{"deskID":"<id>"}'ed invoke deskLoom deskLoom.restore --json '{"deskID":"<id>"}'ed invoke deskLoom deskLoom.displaysed invoke deskLoom deskLoom.brightness --json '{"displayID":"<id>","percent":60}'

Operations

Operation Payload Result
deskLoom.read {} The snapshot: permission, desks, displays, preview, report, issue, restoring
deskLoom.capture optional name; optional deskID to replace that desk's windows; optional includeBrightness Saves the open windows as a new desk, or replaces an existing one; returns the snapshot
deskLoom.preview deskID Matches the desk against the open windows without moving any; returns the snapshot with preview
deskLoom.restore deskID, optional previewID Moves the matched windows and returns the report
deskLoom.rename deskID, name Renames the desk; returns the snapshot
deskLoom.delete deskID Deletes the desk; returns the snapshot
deskLoom.automation deskID, optional restoreOnConnect, optional restoreOnWake Changes the desk's automatic restores; returns the snapshot
deskLoom.dismiss {} Clears the preview and any storage issue; returns the snapshot
deskLoom.permission {} Asks macOS for Accessibility and opens its settings; returns the snapshot
deskLoom.displays {} Reads each connected display's brightness; returns displays and tool
deskLoom.brightness displayID, percent from 0 to 100 Sets that display's brightness; returns the same result as displays

Each entry in desks has id, name, savedAt, displays, up to 12 apps, windows, restoreOnConnect, restoreOnWake, matchesDisplays (the connected displays are the ones the desk was saved on) and includesBrightness. read never lists windows or reads brightness, so it is cheap to poll.

capture without a name uses the connected display names, numbered when that name is taken; with a name that another desk already uses (in any case) it fails unless deskID names that desk. Names are one line of up to 120 characters.

A preview has id, deskID, deskName, results, missingDisplays and matchesArrangement. Each result has id, app, title, bundleID, the matched windowID and process, the target frame and displayID, a status and a detail. Preview statuses are ready, missing, ambiguous, unsupported and permission.

restore with the previewID from the last preview moves only windows whose match and target are unchanged and reports the others as stale; without it the desk is matched again and restored at once. A report has deskID, deskName, trigger (page, action, connect or wake), finishedAt and results, whose statuses add moved, adjusted (the app limited the size or position), stale, cancelled and failed.

Turning restoreOnConnect or restoreOnWake on for a desk turns it off for other desks saved on the same displays.

Brightness

deskLoom.displays returns one entry per connected display with id, name, primary, builtIn, percent (null when it cannot be read), path (native, ddc or unavailable) and reason. tool is installed, missing (a display that needs DDC is connected but m1ddc is not on the tool path), unsupported (an Intel Mac) or notNeeded (every display works without DDC). Displays the system DisplayServices framework can drive, such as the built-in display and Apple displays, use it first. Other external displays use DDC through m1ddc display uuid=<id> get|max|set luminance, each call with a three second timeout and no retry. Reading an external display takes two calls the first time and one after that.

capture with includeBrightness: true saves the brightness of every display Edith can control; false drops it. Without the key a new desk saves none and a replaced desk keeps its earlier choice. A restore (from the page, a catalog action, a display connect or a wake) then sets each saved display back after the windows move, and the report's brightness lists displayID, name, percent, applied and detail for each. A brightness failure never fails the restore.

actions.catalog lists save and restore:<deskID> for Bifrost and Launchweave, plus brightness.up and brightness.down (10% on the main display) and brightness.set:25, :50, :75 and :100; run one with actions.perform and {"actionID":"restore:<id>"}. The brightness actions are disabled, with the reason, when the main display's brightness cannot be changed. A catalog restore waits up to six seconds for missing windows and fails only when no window moved or Accessibility is missing.