Layout
A layout says where the columns and cards of a space sit around the hub. Every space has one. It is stored in the space's file or the setup's file. See Spaces and setups.
Structure
A window is one row: card columns, the hub, then more card columns.
{
"leading": [
{ "id": "6F1C…", "width": 300, "cards": ["chatwoot-conversations", "commands", "files"] },
{ "id": "B07E…", "width": 440, "cards": ["chatwoot-chat"] }
],
"trailing": []
}
| Field | Meaning |
|---|---|
leading |
The card columns left of the hub, left to right. |
trailing |
The card columns right of the hub, left to right. |
The hub is not listed. It sits between leading and trailing, so it always exists exactly once. Putting every column on one side puts the hub at the other edge.
A column has:
| Field | Meaning |
|---|---|
id |
A unique ID. |
width |
The column's width in points. |
cards |
The cards in the column, top to bottom, by card ID. |
weights |
Optional. The fill cards' weights after a resize, by card ID. |
When Rune reads a layout, it removes a card listed twice, a column with no cards, and a column whose ID repeats. It raises any width below the minimum to the minimum. It removes a weight that is not positive or whose card is not in the column.
A card ID that Rune does not recognise is kept. It is most likely a custom card whose file is missing. It shows as a placeholder until the file returns or the card is removed.
A layout with no cards at all is valid. The window then shows only the hub.
Widths
- The space between columns, and around the whole row, is 8 points.
- A card column is at least 160 points wide. A new column starts at 240.
- A card column takes at most 40% of the window's width, whatever its stored width.
- The hub takes all the width the columns leave.
Dragging the gap between a column and its neighbour toward the hub resizes that column. The new width is saved when the drag ends.
Narrow windows
The hub always stays fully visible. It is guaranteed 480 points, or 40% of the window when the window is too narrow for that.
When the columns would leave the hub less than that, columns collapse one at a time until it fits:
- The side with more columns gives up its outermost one.
- If both sides have the same number, the rightmost column collapses first.
A collapsed column is hidden. Its cards stay alive off screen and return when the window is wide enough. There is no control yet for showing a collapsed column in a narrow window.
Card heights
A card declares how it takes height in its column.
- Fixed. The card takes the height of its content.
- Fill. The card takes a share of the remaining height. It has a minimum height and a weight.
| Card | Sizing | Minimum | Weight |
|---|---|---|---|
| Commands | Fixed | ||
| Files | Fill | 160 | 1 |
| Changes | Fill | 200 | 2 |
| History | Fill | 120 | 1 |
| Usage | Fixed | ||
| A custom card | Fill unless it says fixed |
120 | 1 |
Dragging the gap between two cards trades height between the nearest fill card above it and the nearest fill card below it. A fixed card between them keeps its height. Neither fill card goes below its minimum. The gap has no handle if a fill card is missing on either side.
The drag sets a weight for every fill card in the column, so the heights scale with the window. The weights are saved when the drag ends. Double-clicking the gap removes them and restores the default weights. A card that moves into the column uses its default weight.
A column's heights are worked out in this order:
- Fixed cards take their content height, top to bottom. A fixed card is cut short if the column runs out of room.
- Fill cards share the remaining height by weight.
- If a fill card's share is below its minimum, it takes the minimum, and the other fill cards share what is left.
- If the column is too short for every minimum, the fill cards share by weight alone.
Cards in a column are 8 points apart. A column never has a gap between cards. A column holding only fixed cards leaves its spare room at the bottom.
Moving a pane
Drag a split pane by its header to move it. A drag starts after 6 points of movement, so a click on a header button still works. A zoomed pane does not move, and neither does the only pane of a tab.
While a pane is dragged:
- The pane shrinks and follows the pointer. It stays inside the hub.
- A dashed outline stays where the pane was.
- A highlight shows where the pane will land.
Nothing else moves until the drop.
The pointer's position decides the landing place:
| Pointer is over | The pane lands |
|---|---|
| The dragged pane's own place | Nowhere. Nothing happens. |
| Another pane's header | In that pane's place. The two panes swap, and all sizes stay. |
| The middle of another pane | In that pane's place, the same swap. |
| The outer 30% of another pane, by the nearest side | On that side of that pane |
| Within 28 points of the hub's left, right or bottom edge | Along that whole edge |
| Up to 48 points past any hub edge | Along that whole edge |
To turn two columns into two rows, drag one pane onto the top or bottom part of the other.
A pane that stays in its own row or column keeps its size, and so do the others. A pane that joins another row takes an equal share of it. A pane dropped on a side of another pane takes half of that pane.
Press Escape, or release more than 48 points outside the hub, and the pane returns to its place. The drag also cancels if the tab's panes change or the tab switches.
Terminals resize once, on the drop. The panes then slide to their new places.
Moving a card
Drag a card by its header band, the top 40 points of the card. The rest of a card scrolls and selects as usual. A drag starts after 6 points of movement, so a click on a header button still works.
While a card is dragged:
- The card follows the pointer.
- A dashed outline stays where the card was.
- A thin line shows where the card will land.
The pointer's position decides the landing place:
| Pointer is over | The card lands |
|---|---|
| The middle of a column | In that column, above the first card whose middle is below the pointer, or at the bottom |
| Within 28 points of a column's left or right edge | In a new column on that side of it |
| The left half of the hub | In a new column directly left of the hub |
| The right half of the hub | In a new column directly right of the hub |
| The window's left or right margin | In a new outermost column |
No line shows, and nothing happens on release, when the drop would leave the card where it is. That covers a card dropped onto its own place, and a card alone in its column dropped beside that column.
When a card leaves a column empty, the column disappears and the hub takes the space.
Every move saves the layout at once.
A card keeps its state when it moves to another column. A commit message being typed in the Changes card survives the move.
Removing and adding cards
To remove a card, right-click it and choose Remove Card, or use Remove Card… in the command palette. Rows inside a card keep their own menus, so right-click the card's header or an empty area.
To add a card, use Add Card in any card's right-click menu, or Show Card… in the command palette. Both list the built-in cards that are not on screen and every custom card file.
An added card goes to the bottom of the outermost column on its usual side. Commands and Files go left. Every other card goes right. If that side has no column, the card gets a new one.
If every card has been removed, there is no card to right-click. Use the palette.
Terminals in the hub
A window always has a terminal. It opens with one tab, and every tab behaves the same way.
If you close the last terminal, or its shell exits, a fresh shell replaces it. If that fresh shell exits within 5 seconds, it stays on screen with a Restart Terminal button, so a failing shell does not restart forever.
⌘` switches between the two most recent terminals.
Drag a tab along the tab row to move it. It stays inside the row, and the tabs it passes slide out of its way. ⌘1–9 and ⇧⌘[ ] follow the order of the row, so the numbers always read 1, 2, 3 from the left.