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 2012-06-07 01:02:53 +0000

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?

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
5

answered 2013-07-30 10:23:46 +0000

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.

edit flag offensive delete link more
1

answered 2012-06-07 05:53:15 +0000

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!

edit flag offensive delete link more
0

answered 2013-07-30 07:02:13 +0000

denten gravatar image

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

edit flag offensive delete link more
0

answered 2014-07-05 17:12:04 +0000

Hibou57 gravatar image

updated 2014-07-05 17:13:46 +0000

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-06-07 01:02:53 +0000

Seen: 5,242 times

Last updated: Jul 05 '14