The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

How'd I move 4 windows in a 2x2 grid?

asked 2014-08-20 15:52:22 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

How'd I move 4 windows in a 2x2 grid?

edit retag flag offensive close merge delete

Comments

This depends highly on your starting layout and the settings of `workspace_layout` and probably `default_orientation`.

Adaephon gravatar imageAdaephon ( 2014-08-21 05:35:41 +0000 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-08-21 05:59:42 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

I usually work with workspace_layout stacked and default_orientation vertical. That means any new container is at first stacked. I also rarely have horizontal split containers, so if I move a window to the left or right it usually goes into another container or opens a new one.

The most likely starting position for four windows in my setup is all of them stacked in a single container:

+-window 1----------------+
+-window 2----------------+
+-window 3----------------+
+-window 4----------------+
|                         |
|                         |
+-------------------------+

To get them in a 2x2 grid, I first would focus the window I want on the right top and move it to the right.

Lets say currently "window 4" is selected and I want "window 3" on the top right. So I would do:

focus up
move right

This would get me this layout:

+-window 1---+-window 3---+
+-window 2---+            |
+-window 4---+            |
|            |            |
|            |            |
|            |            |
+------------+------------+

Then I would focus the window I want in the bottom right corner and also move it right.

Lets say "window 4"

focus left
move right

"window 4" is immediately focused in the left container because it was the last focused window before "window 3". The layout now looks like this:

+-window 1---+-window 3---+
+-window 2---+-window 4---+
|            |            |
|            |            |
|            |            |
|            |            |
+------------+------------+

All that remains to be done is setting the layout of both containers to splitv

layout splitv
focus left 
layout splitv

The screen now looks like the intended 2x2 grid. It consists of two vertically split containers side-by-side.

+-window 1---+-window 3---+
|            |            |
|            |            |
+-window 2---+-window 4---+
|            |            |
|            |            |
+------------+------------+
edit flag offensive delete link more
0

answered 2014-08-28 23:12:24 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

I also have this problem. I noticed that it's really helpful to pack window into container. In this problem you do this:

  1. Move window outside
  2. Set needed layout
  3. Pack it into container
  4. Move another window - it will land into container
  5. You're done

I can make a movie about these steps. Note this is generalization of Adaephon post. Third step is done thanks to stacked layout, but I need a shortcut for this.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-08-20 15:52:22 +0000

Seen: 631 times

Last updated: Aug 28 '14