Move windows between boxes

You've got an editor on one side and a box of tabs on the other. Now let's move things around: a window out of the box and back in, the whole box at once, and then a box inside the box. By the end you'll know how to build any arrangement you like, and how to take it apart again.

We're picking up from the last page, with tests focused in a tabbed box. If you're coming back to this later, build that screen again first: editor and a box with logs, tests and shell in it.

Move windows in and out

Press Mod+Shift+o. That's lifting: tests moves out of the box, up one level, and lands right after it.

Now tests is a sibling of editor and the box, so your row has three columns. The box stays put with its other two tabs. tests keeps keyboard focus, and the stripes clear as soon as the lift lands on that window.

To put it back, press Mod+Control+Shift+h. That's joining: the window moves into the neighboring box on its left, and it's back among the tabs. Yes, that's a lot of fingers, but you already know the pattern. The last letter is a direction, so Mod+Control+Shift+j, Mod+Control+Shift+k and Mod+Control+Shift+l join the box below, above and to the right. Your two sides are even again: default rows and columns rebalance after a lift and join. Weights you set explicitly stay in effect.

Don't mix this up with Mod+Shift+h, which you met when you moved your first windows. That one trades places with a neighbor on the same level and never goes inside a box. Joining needs a box to go into: if your neighbor is a plain window, nothing happens. Tessera won't make up a box for you.

Move the whole group

This is where boxes pay off. Press Mod+o to select the box, then Mod+Shift+h.

The box of three tabs, under stripes, is now on the left, and the editor terminal is on the right.
The box and all three of its tabs traded places with editor in one move.

The whole group moved, and nothing inside it changed. The keys that move a window also move a box, because to Tessera a box is just another thing with a place in its parent. Press Mod+Shift+l to put it back, and Mod+i to go back in.

With a box selected, Mod+Shift+2 sends the whole group to workspace 2, keeping its layout and windows together. You stay on the source workspace, with its next window focused. The workspace's outermost box can't be sent; that binding leaves it where it is.

Boxes inside boxes

A box can hold other boxes. Say you want logs visible all the time, with tests and shell sharing the space below it. You can build that with keys you already know.

You should be on tests. Press Mod+t four times to turn the box into a column again. From top to bottom you'll have logs, shell and tests.

Now press Mod+Shift+i to wrap tests in a box of its own. Press Mod+k to move up to shell, then Mod+Control+Shift+j to join the box below.

You now have logs on top with two tabs below it: a box inside a box. shell has focus, so the stripes are gone. Press Mod+o to select the inner box if you want to see its path: 1 > row > column > tabbed. Then press Mod+i to return to shell before continuing. Your workspace is a row, one part of that row is a column, and one part of that column is a set of tabs. Here's the tree now:

workspace (row)
├── editor
└── box (column)
    ├── logs
    └── box (tabbed)
        ├── tests
        └── shell

Look at what you just did: you wrapped one window, then joined another to it. That's how you make a group out of any two windows. And every level works the same way, so Mod+o and Mod+i still take you up and down the tree, one step at a time.

Take it apart

You're on shell, in the inner box. Press Mod+Control+o. That's unwrapping: the box around your window goes away, and what was in it moves up a level. tests and shell are back in the column.

Press Mod+o to select the column, then Mod+Control+o again. Now all four terminals are siblings in your workspace's row.

Not one of your programs noticed. Wrapping, lifting, joining and unwrapping only change where windows sit, so you can always try an arrangement and undo it if you don't like it.

Closing works the way you'd expect. Mod+Shift+q closes one window, even with a box selected: the one you were last using in it. A box with one window left stays where it is, so the layout you picked is still there for the next window. Close that last window and the box goes too.

When to reach for a box

You don't need boxes for everything. If one layout suits a whole workspace, leave it alone. I'd reach for a box when one part of the screen wants a different layout from the rest. Here are a few arrangements to try:

  • An editor with a box of tabbed terminals beside it, like the one you just built.

  • A browser with a column of two terminals beside it, so you can read something and try it out at the same time.

  • A grid with a box of tabs in one corner, for the things you check now and then, like mail and chat.

The keys in one place

Keys

What they do

Mod+Shift+i

Wrap the selection in a new box

Mod+o

Go out one level

Mod+i

Go in one level

Mod+h, Mod+j, Mod+k, Mod+l

Focus in that direction, escaping box edges and remembering windows

Mod+Shift+h, Mod+Shift+j, Mod+Shift+k, Mod+Shift+l

Trade places with a sibling, for a window or a whole box

Mod+Shift+o

Lift the selection out of its box

Mod+Control+Shift+h, Mod+Control+Shift+j, Mod+Control+Shift+k, Mod+Control+Shift+l

Join the neighboring box in that direction

Mod+Control+o

Unwrap: remove a box and keep what's in it

Mod+t

Change the layout of the current box

Where to next

That's all of it: boxes hold windows, every box has its own layout, and you move between levels with Mod+o and Mod+i. You don't have to remember it all today. Try it with the programs you use together, and the keys will come.

The arrangements you've made so far last until you log out. If you want a workspace set up the same way every time, Tessera can do that from your configuration. First you'll need a configuration, so let's make Tessera yours.