Profiles
Window
The window block, the five layout presets and raw tmux layout strings.
A window holds one or more panes and decides how they are arranged. Most of the time you want one of the five tmux presets and you can stop reading after the table. The rest of the page is about the raw layout string, which exists so that glaze save can give you back the exact geometry you had, warts and all.
Example
window {
name = "ice-breaker"
layout = "main-vertical" # even-horizontal | even-vertical | main-horizontal | main-vertical | tiled | a raw tmux layout string
focus = true # make this the active window
starting_directory = "ice" # relative to the profile; the default value is the session directory
hooks = { "window-renamed" = "display 'trace detected'" }
options = { "automatic-rename" = "off" }
pane {
# ...at least one pane is required
}
}Attributes
| Attribute | Type | Notes |
|---|---|---|
name | string | The window name. The default value is default. A backslash and a control character become -, with a warning. |
starting_directory | string | The directory must exist. A relative path is relative to the directory of the profile. The default value is the directory of the session. |
layout | string | A named preset or a raw tmux layout string. The default value is tiled. See below. |
focus | bool | Make this the active window. |
hooks | map(string) | A map of a tmux hook name to a tmux command. The name must be one that tmux 3.2a to 3.7c knows. See Hooks and options. |
options | map(string) | A map of a tmux option name to a value. See Hooks and options. |
pane | block(s) | One or more panes. At least one pane is required. See Pane. |
Layout presets
The default layout is tiled. There are five presets:
| Preset | Arrangement |
|---|---|
even-horizontal | Panes side by side, each the same width. |
even-vertical | Panes top to bottom, each the same height. |
main-horizontal | One large pane at the top, the others below it. |
main-vertical | One large pane on the left, the others to the right of it. |
tiled | Panes in a grid, as even as possible. |
Glazier applies the layout after it creates every pane of the window. A pane size or adjust block then refines the result. See Pane.
Raw layout strings
The layout attribute also accepts a raw tmux layout string, for example "bb62,80x24,0,0". This is the form that tmux itself reports for a window. The rules:
glaze savecaptures this string from a live window.glaze upreplays the string without change.- Glazier validates the structure of the string at parse time. A malformed string is an error.
- The string must describe as many panes as the window declares. A mismatch is an error, because tmux applies such a layout only in part or rejects it.
- The four hex characters at the front are a checksum. Glazier does not check it. tmux recomputes it. If you edit the geometry by hand and make an error, tmux rejects the layout when
upruns. - A raw string fixes the size of every pane. In a window with a raw layout, Glazier ignores
sizeandadjustand shows a warning that names the pane.
For a profile that you write by hand, use a named preset.
JSON layouts on tmux 3.9
tmux 3.9 and later print a layout as JSON, for example {"V":2,"L":{"t":"h","w":80,"h":24,...}}. Glazier accepts this form too. glaze save writes the form that your tmux prints. A JSON layout has no checksum, but a profile with one needs tmux 3.9 or later. tmux 3.9 also accepts the classic string. To share a saved profile with users of an older tmux, replace the JSON layout with a named preset.
Why keep the raw string at all? tmux reports a window layout only as that coordinate string. It never says “this is main-vertical”, so save cannot recover a preset without guessing. Rather than guess or drop the geometry, save writes down exactly what tmux said and up hands it straight back. It is exact and it is unreadable, and the second part is why the presets exist.
Focus
Set focus = true on one window to make it the active window after up. Set focus = true on one pane inside it to make that pane the active pane. glaze save captures both as focus = true.
A hook that renames the window
A hook or an option in your tmux.conf can rename a window after Glazier creates it, for example set-hook -g after-new-window 'rename-window x'. up then shows a warning with the declared name and the new name. Glazier does not rename the window back, because your configuration can rename it again.