Profiles
Pane
The pane block, its commands and the size and adjust blocks.
A pane is where the work happens: it is the shell that runs your commands. The block is small. The part that needs a few words is resizing, because tmux resizes a pane by moving the border it shares with a neighbour, and that has consequences that are not obvious until a pane refuses to budge.
Example
pane {
name = "breach-protocol"
focus = true
commands = ["nvim ./daemons", "echo upload ready"]
size { # absolute resize; x, y or both
x = "60%" # cells ("80") or a percentage ("60%")
y = "100"
}
adjust { # directional resize; a maximum of four blocks in order
direction = "left" # up | down | left | right
amount = "5" # cells only
}
options = { "remain-on-exit" = "on" }
}Attributes
| Attribute | Type | Notes |
|---|---|---|
name | string | The pane title. 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 window. |
focus | bool | Make this the active pane. |
commands | list(string) | Commands for the pane, in order. See Commands. |
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. |
size | block | An absolute resize. See below. |
adjust | block(s) | A directional resize. A maximum of four blocks. See below. |
name sets the pane title. It is not a window name. glaze save leaves out a title that equals the host name, because that is the default title that tmux gives a pane.
Order of operations
Glazier creates every pane of a window first, in file order. It then runs the commands of each pane. It then applies the window layout. Then it applies the size block and the adjust blocks of each pane, in file order. Thus size and adjust refine the layout.
size
A size block must contain x, y or both. Glazier sends only the axes that you set.
| Attribute | Notes |
|---|---|
x | The width. A count of cells, for example "80", or a percentage of the window from "1%" to "100%". |
y | The height. A count of cells, for example "24", or a percentage of the window from "1%" to "100%". |
A count must be 1 or more. A value is a string in the profile.
adjust
An adjust block must contain direction and amount. A pane accepts a maximum of four adjust blocks. Glazier applies them in declaration order, after the size block.
| Attribute | Notes |
|---|---|
direction | One of up, down, left or right. |
amount | A count of cells, 1 or more, for example "5". A percentage is not accepted. |
The amount is cells only, because tmux moves a pane border by cells only.
What a resize can and cannot do
tmux can only move a border between two panes. A pane that changes size also changes the size of its neighbours, so a later pane can change an earlier result. A size that tmux cannot apply shows a warning. An adjust that tmux rejects stops up.
The default tiled layout stacks two panes one above the other. There is no vertical border to move, so an x size has no effect there. Set y instead, or pick a layout that puts the panes side by side.
In a window with a raw layout string, Glazier ignores size and adjust and shows a warning that names the pane. The raw string already fixes every pane. See Window.
The reason for the strict ordering is that a layout is a complete description of the window: if Glazier resized first and selected the layout second, the layout would quietly undo every resize. So the layout goes first and your adjustments go last. Resizing after the fact also means a pane with size on it can push a neighbour around, which is why two panes that both declare a width can end up arguing. Declare the size on the pane you care about and let the other one take what is left.