# tui/save Save the current workspace layout as a declarative spec to ~/.deft/workspaces/<name>.dft. ## Syntax
[tui/save]
## Returns bool ## Saved format The saved workspace is a declarative spec (`%{ ... }`) with nested panel descriptions. Each node may include: | Key | Description | |-----|-------------| | `:app "name"` | App name to launch | | `:package "owner/name"` | Portable package reference (saved for packaged apps) — preferred on load | | `:source "path"` | Path to app source file — saved for apps outside a package; may be added by hand as a fallback | | `:id "tag"` | Tag name for referencing the panel | | `:focus true` | Panel receives keyboard focus on load | | `:maximise true` | Leaf: maximised (siblings collapsed). Group: fills the workspace (every node outside the group collapses) | | `:collapsed true` | Leaf or group is minimised — collapsed to its title bar — on load | | `:toggle-visibility "key"` | Key binding to toggle panel visibility | Apps launched from a package save only the `:package` reference; it resolves across dev checkouts, `:pkgs` roots, and installed layouts (the same resolution the launcher and `deft compile --app` use). Add a `:source` path by hand when a fallback is wanted — loading tries the package first and falls back to the path. Top-level metadata: `:title`, `:theme "<name>"`, `:vars %{ ... }`, and `:font %{ :family "..." :cut :regular :size n }` — the applied font, restored on load (CLI `--font`/`--size` stay authoritative per field). The save records the portable family + cut, so the workspace loads on any distro; only a face reporting no family falls back to a resolved `:path`.