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

How do I change the orientation of an existing container?

asked Jun 7 '12

spion gravatar image

Using mod+h and mod+v splits the current container. What if I want to change the orientation from horizontal to vertical or vice-versa?

4 answers

Sort by » oldest newest most voted
5

answered Jul 30 '13

vandannen gravatar image

In order to toggle between vertical and horizontal split layout in the currently focused container, you could just use the i3 command layout toggle split.

1

answered Jun 7 '12

If you have a container with 2 windows A and B split vertically (B under A), and you want to change it to horizontally, just:

  • focus on A
  • mod+h
  • move focus to B
  • mod+Shift+Arrow (move B "into" A)

this should do the trick.

Sometimes, when I want to move a window into different containers, I usually move them to floating mode, go to the new container (and set the mode h/v) and focus back on the floating window and move it to tiled again. Very cool the things you can do with these simple commands!

0

answered Jul 30 '13

denten gravatar image

Use mod + shift + j|k|l|; to switch the orientation dynamically once you have a split.

0

answered Jul 5 '14

Hibou57 gravatar image

updated Jul 5 '14

You can use the layout command with a splitv or splith argument (here, without a space before H or V!). You can bind a keystroke to these commands if you wish, in your i3's configuration file.

As an example, here is what stands in my configuration (I got ride of $mod+e):

bindsym $mod+v layout splitv
bindsym $mod+h layout splith
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed

bindsym $mod+Shift+h split h
bindsym $mod+Shift+v split v

With this, $mod+h and $mod+v acts for the tilling orientation like $mod+w and $mod+s act for the overlapping orientation (not toggling, directly specifying an orientation instead), and creation of a split container is as before, except it needs a shift modifier.

Question Tools

Stats

Asked: Jun 7 '12

Seen: 5,242 times

Last updated: Jul 05 '14