Shell File¶
Note
A shell file (root block Shell { }, suffix _Shell.tdl, written in TDL, ADR-0014 Shell File Language) defines the surfaces on one or more monitors and places modules in them. The whole shell is one such file, or a Main_Shell.tdl that imports others. The metadata block, the registry and the monitor selectors are in TDL Language; this note lists the Monitor block and the surface keys. Decided keys come from ADR-0007 Shell UI Layer and the 2026-10-29 layout rules (ADR-0014 Shell File Language > Layout Rules); the surface property names mirror tre's LayerWindow settings (TRE-REQ-001 Layer Surface Window) and were accepted by the maintainer on 2026-10-29. Examples are illustrations.
Structure¶
---
TDL: 0.2
TEL: 0.1
TRE: 0.5.9
Shell: 0.1
Name: Root_Shell
---
Shell {
Monitor {
Name: DP1
Connector: DP-1
Children {
# one file, or a list
Import: TopBar_Shell.tdl
Bar {
Name: Top_Bar
Edge: TOP
Width: EXPAND
Height: 32
Gap: 4
Style: Dock_Style.tdl
# a module is called by its name; Import embeds a module file
Children {
Import: [Clock_Module.tdl, Audio_Module.tdl]
}
}
Panel {
Name: Launcher
Layer: OVERLAY
Keyboard: EXCLUSIVE
Anchor: [TOP, LEFT]
Inset: [24, 40, 0, 0]
Padding: [8, 8, 8, 8]
Children {
Import: Applications_Module.tdl
}
}
}
}
Monitor {
Name: Others
Index: default
Children {
Import: TopBar_Shell.tdl
}
}
}
- A file is the metadata block, then one root block (TDL Language > A File). The root block of a shell file is
Shell { }; it holdsMonitorblocks. The metadata keys (TDL, the version pins,Name,UID) are in TDL Language > The Metadata Block. TheName:is the root of the dotted path (Root_Shell.DP1.Top_Bar). Monitorholds one monitor's tree.Name:is its unique name; a selector binds it to a monitor;Childrenis a block.- The Panel's
Inset: [24, 40, 0, 0]is left 24, top 40 (left, top, right, bottom). The shell passes tremarginin tre's order, top, right, bottom, left. - A child is a surface: a block whose head is its type (
Bar,Frame,Panel,Popup), with a uniqueName:.Import:insideChildrenpulls in surfaces from another_Shell.tdl. An imported file holds surface blocks only, sits under a Monitor'sChildrenand takes that Monitor's monitor (D22 in ADR-0014 Shell File Language > Decisions on the Open Items (2026-10-30)). - Surfaces are siblings and never nest (Common Keys and Conventions > Names and References).
Monitor Keys¶
| Key | Meaning | Status |
|---|---|---|
Name |
Required; unique across the shell (full path for repeated uses, see ADR-0007 Shell UI Layer > Open items) | Decided (the rule); path form proposed |
Index, Connector, Description |
The selectors. The meaning of each, Index: default, and the rule for a Monitor with no selector and the order in which several selectors are tried are in TDL Language > Monitors (Shell Schema) |
Decided (2026-10-29) |
Children |
Surfaces and imports | Decided |
Surface Keys¶
A surface is one of four block types. The head is the type; there is no Kind: or Type: on it.
| Head | Surface |
|---|---|
Bar |
A surface on one edge |
Frame |
A surface on all four edges |
Panel |
Attached to another surface, or floating |
Popup |
A surface hung off another one |
The details of each are in Surface Types.
| Key | Meaning | Applies to | Status |
|---|---|---|---|
Name |
Required; the surface's unique name | All | Decided (2026-10-29) |
Layer |
BACKGROUND, BOTTOM, TOP, OVERLAY |
All | Decided (the key) |
Style |
A style file or an inline Style { } block |
All | Decided |
Children |
The surface's contents: blocks (containers included) and module uses. Children is the only holder; modules: is gone (maintainer, 2026-10-26). A module use is written with the module's name as the head (Module File > Using a Module) |
All | Decided |
Edge |
The edge a Bar attaches to: TOP, BOTTOM, LEFT, RIGHT |
Bar | Decided (2026-10-30; replaces the raw Anchor) |
Width, Height |
Pixels, 50%, AUTO (shrink to content on that axis) or EXPAND (on a Bar: stretch edge to edge along the attached Edge; not defined on a Panel or Popup). A top Bar with Height: EXPAND cannot stretch: it resolves to Max_Height, else Min_Height, else 0 px (TDL Language > Sizes (Shell Schema)). On a Panel or Popup, each is its own key and replaces the pair Size (renamed 2026-11-02); 0 on a Panel stretches between two opposite anchored edges, as Size did (a Bar with 0 is not created) |
Bar, Panel, Popup | Decided (D34, D46) |
Max_Width, Max_Height, Min_Width, Min_Height |
Bounds on the size, in pixels. A Popup has Max_Width and Max_Height (the largest AUTO may reach; replaces Max_Size) |
Bar, Popup | Decided (D34) |
Alignment |
A Bar: where it sits along its Edge. A Panel or Popup: how it lines up along the edge it shares with its target. START, CENTER, END; a Bar defaults to CENTER and it has no effect on an EXPAND axis (D55). One name for the same idea on all three |
Bar, Panel, Popup | Decided (2026-10-30; Panel and Popup renamed from Align, 2026-11-02) |
Offset |
A Bar: one number that moves it along the Edge: positive towards the end, negative towards the start (D87) | Bar | |
Inset |
A Panel: four-sided (left, top, right, bottom), positions it from its anchored edges; this replaces the Panel's old Margin (D43) and its four-sided Offset (D89) |
Panel | |
Gap |
The distance to what the surface is attached to. A Bar: one number, the space between the Edge and the Bar. A Popup: to its anchor. A Panel: to a target that is not a Frame (D49). Never a layout's child spacing, which is Spacing |
Bar, Popup, Panel | Decided (D49) |
Anchor |
Edges a Panel attaches to when floating: TOP, BOTTOM, LEFT, RIGHT (one or a list) |
Panel | Decided (key name accepted 2026-10-29) |
Exclusive_Zone |
Space reserved along the attached edge, in pixels; a Bar's zone includes its Gap. Only allowed on Layer: TOP; on any other layer it is a load error (maintainer, 2026-10-26) |
Bar, Panel, Frame | Rule decided; key accepted 2026-10-29 |
Auto_Hide, Auto_Hide_Delay, Reveal_Key, Reserve |
The Bar's hide and reserve behaviour; details in Surface Types | Bar | Kept from the earlier layout |
Margin |
Transparent space around the element itself; four-sided (left, top, right, bottom), or named sides (Margin { Top: 8, Left: 24 }, D7). A Bar has no Margin. A Panel attached to a Frame: Margin on the sides facing the Frame separates the two, and with a margin there they do not meld (the Frame edge continues straight and the Panel's corners round as a floating Panel's do); with no margin they meld. A Frame: space between its outer sides and the display edge; it adds to the Frame's size (Thickness 10 with Margin: [5, 5, 5, 5] is 15 per side, 17 with a 2 px border, and the reserved zone is that total) |
Panel, Frame | Decided (D41 to D45) |
Padding |
Transparent space between the children and the element's four sides; four-sided (left, top, right, bottom). On every element that has Children. A Frame's Padding applies only to a side used as a strip (a side whose Children are enabled) |
Bar, Panel, Frame, Popup | Decided (D41 to D45) |
Attach_To, Attach, Alignment |
A Panel attached to a non-Frame target names it (Attach_To), the side (Attach: TOP, BOTTOM, LEFT, RIGHT) and the alignment along it (Alignment: START, CENTER, END). A Popup keeps Attach, Alignment and Gap (see Gap) |
Panel, Popup | Decided (key names accepted 2026-10-29; D49; Align renamed 2026-11-02) |
Keyboard |
NONE, ON_DEMAND, EXCLUSIVE |
All | Decided (key name accepted 2026-10-29) (EXCLUSIVE used for the launcher) |
Input_Region |
Where input lands: the whole surface, nothing, rectangles, or auto |
All | Decided (key name accepted 2026-10-29) |
Movable |
A Panel the mouse can move; its position is saved | Panel | Decided (key name accepted 2026-10-29) |
Visible |
true (the default) starts the surface shown; false starts it hidden. The opposite of the earlier Hidden |
All | Decided (key name accepted 2026-10-29; renamed from Hidden, 2026-11-02) |
Attach_To |
The name of the surface a Panel attaches to (decided: attachment is by naming the surface); see also the row above. On a Popup, the name of the surface it hangs off; optional, because the caller's surface is the parent (Popup > Parent and anchor). A Popup has Attach (a side) and Attach_To (a target), as a Panel does |
Panel, Popup | Decided (key name accepted 2026-10-29; the Popup's Anchor_To renamed 2026-11-02) |
A Bar with a resolved size of 0 on the axis it is attached along is not created: the shell warns, names the Bar and says to set Min_Height (or Min_Width). The check runs at creation only and does not stop hide, peek, expand or contract of a Bar or Frame strip (D46).
The shell maps the TDL keys to tre's LayerWindow settings (tre-side names, lowercase, in tre's order):
| TDL (this file) | tre side |
|---|---|
Edge, Width, Height, Alignment, Offset, Gap (Bar) |
anchor, size and margin; the exact mapping is open, like the Panel attachment geometry (#needs-verification) |
Inset (Panel, left, top, right, bottom) |
margin (top, right, bottom, left); the shell reorders |
Exclusive_Zone |
exclusive_zone |
Layer, Keyboard (OVERLAY, EXCLUSIVE) |
layer, keyboard (overlay, exclusive) |
Per-type keys (a Frame's side thicknesses and corner shapes, a Popup's gravity) are listed in the per-type specs once written (Surface Types). Names are Capitalised here and lowercase in tre (TDL Language > Names and the Registry).
Monitors¶
- A shell file holds one
Monitorblock per monitor, and several may appear in one file (decided 2026-10-29). A monitor no block names gets theIndex: defaultblock if there is one, and nothing otherwise. - A surface set for one monitor can be shared by several
Monitorblocks by importing the same_Shell.tdl, which holds surface blocks only (D22). - A Popup opens only on the monitor of the surface that called it (Surface Types > Open questions).
Index:is a position, not a stable name;Connector:andDescription:are the stable selectors (Risk Register R-21).
Errors Specific to Shell Files¶
- A surface or Monitor with no
Name, or two with the same name: error, both places named. - Two
Monitorblocks that name the same monitor: error, both places named. - A block head that is not in the registry: error with the list of surface types and block names that fit at that place.
- A root block that disagrees with the suffix (
Shell { }inClock_Module.tdl): error naming both. - A module use whose file is not found: error with the search paths tried.
- An
Attach_Tothat never resolves: error at load; a target that disappears while running: warning, the surface stays hidden. - A module with no matching
.py: error naming both files.
Importing Another Shell File (Built in M7f, code session's report of tess-shell PR #69, 2026-11-17; not run in the vault)¶
- A Monitor's
ChildrenwriteImport: path_Shell.tdl(one file or a list). The imported file'sShell { }root (surface blocks and furtherImports, noMonitor) comes in at that position on that Monitor; imports nest. - The path goes through the config confinement helper (Security Model, control 3): an import outside the config folder is
path-outside-config. - An error inside an imported file is reported at that file's own
path:line:column, withimport-failedat theImport. - New rules:
import-cycle(the chain printed),import-not-found(the path looked at),import-twice,import-monitor,import-misplaced,main-shell-surfaces. A name used in two files is the existingname-duplicateerror naming both positions. The not-built error for thisImportis gone. The namesimport-failed,import-twice,import-monitor,import-misplacedandmain-shell-surfacesare the code session's own;import-cycleandimport-not-foundreuse the module-import codes. - Hot reload: the watcher adds the directory of every imported file that no folder watch covers, refreshed after every scan (a refused one included), so saving an imported file reloads the shell. Imported files outside
Shells/also get aUID:. - Schema export 1.11 (an addition: a new root
Imported_Shell).tess-ui's fixture needs re-recording at 1.11, after 1.10. - The guide's page 4 has a section and the example
guide/examples/04-surfaces/split; 25 new tests, the live ones and the de-duplication mutation-checked.
Questions from the Build¶
- May one file be imported under two Monitors? Context: V1 Scope says a surface is defined once and referenced from several monitors (the maintainer's requirement of 2026-10-25), and the vault's own example does it. As built, the second
Importof a file, under two Monitors or in a diamond, isimport-twicenaming the first. A file's names are the root of a dotted path (TDL Language > The Metadata Block,RootShell.DP1.Top_Bar), so under two Monitors the same surface already has two distinct paths. Recommendation: allow the same file under different Monitors, with each instance addressed by its Monitor's path; keepimport-twicefor the same file imported twice under one Monitor (a diamond). - Is the imported root
Shell { surfaces and Imports }directly, with noChildrenwrapper and no Monitor? Recommendation: yes, as built. - A
_Shell.tdlinShells/that nothing imports: the note says it is not loaded, with an info line; the code, before and after, checks every shell file and logs no info line. Recommendation: build what the note says: check it, but do not load it, and say so once. - A surfaces-only file is also read alone and then follows no import, so cross-file checks (
name-duplicate,Attach_To,import-twice, cycles) happen only through an importer; a cycle between two files nothing imports is not reported. Recommendation: accept; report a cycle only when a Monitor reaches it. - Hot Reload names an importer map while D24 says a full rescan. Built: D24 plus watching the imported directories. Recommendation: as built.
- A symlinked import is watched at the link's own directory only (the report is cut off after this point in what the vault read). Recommendation: accept, and record the limit.
-
IfandForamong surfaces stay not built. Recommendation: unchanged.
Open¶
- Several
rootblocks in one file: now severalMonitorblocks, allowed (decided 2026-10-29, ADR-0014 Shell File Language > Layout Rules, item 9). - Where shell files live:
$HOME/.config/tesserae-shell/Shells/, or the directorysettings.tdlnames (decided 2026-10-27, Settings File). - The top-level shell file is
Main_Shellinsettings.tdl, defaultMain_Shell.tdl; it names the file only (Settings File). - The names of the surface keys: accepted by the maintainer on 2026-10-29. Their types follow the per-type specs.
- How a surface lays out its modules (order, spacing, alignment): a surface layout key, or the surface being a container widget.
- The keys each surface type adds (Surface Types).
- How
Edge,Width,Height,Alignment,OffsetandGapmap to tre: accepted in Bar > Mapping to tre (D61) and built in M1 (bar_geometry, tested on the worked examples). - Whether a surface is named by the word before the brace or by a key: the head is the type and
Name:is the unique name (ADR-0014, item 6). - The order in which the shell tries several monitor selectors on one block:
Connector, thenDescription, thenIndex(ADR-0014 Layout Rules, item 15, decided 2026-10-30). - What an imported
_Shell.tdlcontains: surface blocks only, which take the importing Monitor's monitor (D22, ADR-0014 Shell File Language > Decisions on the Open Items (2026-10-30)).