How do I change the orientation of an existing container?
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?
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?
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
.
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:
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!
Use mod + shift + j|k|l|; to switch the orientation dynamically once you have a split.
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.
Asked: 2012-06-07 01:02:53 +0000
Seen: 5,242 times
Last updated: Jul 05 '14