Implement resize <grow|shrink> <width|height>, use it in the default config
Fixes: #576
This commit is contained in:
@ -1365,11 +1365,13 @@ If you want to resize containers/windows using your keyboard, you can use the
|
||||
resize <grow|shrink> <direction> [<px> px] [or <ppt> ppt]
|
||||
---------------------------------------------------------
|
||||
|
||||
Direction can be one of +up+, +down+, +left+ or +right+. The optional pixel
|
||||
argument specifies by how many pixels a *floating container* should be grown or
|
||||
shrunk (the default is 10 pixels). The ppt argument means percentage points
|
||||
and specifies by how many percentage points a *tiling container* should be
|
||||
grown or shrunk (the default is 10 percentage points).
|
||||
Direction can either be one of +up+, +down+, +left+ or +right+. Or you can be
|
||||
less specific and use +width+ or +height+, in which case i3 will take/give
|
||||
space from all the other containers. The optional pixel argument specifies by
|
||||
how many pixels a *floating container* should be grown or shrunk (the default
|
||||
is 10 pixels). The ppt argument means percentage points and specifies by how
|
||||
many percentage points a *tiling container* should be grown or shrunk (the
|
||||
default is 10 percentage points).
|
||||
|
||||
I recommend using the resize command inside a so called +mode+:
|
||||
|
||||
@ -1378,21 +1380,20 @@ I recommend using the resize command inside a so called +mode+:
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# They resize the border in the direction you pressed, e.g.
|
||||
# when pressing left, the window is resized so that it has
|
||||
# more space on its left
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym j resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym l resize shrink height 10 px or 10 ppt
|
||||
bindsym semicolon resize grow width 10 px or 10 ppt
|
||||
|
||||
bindsym j resize shrink left
|
||||
bindsym Shift+j resize grow left
|
||||
|
||||
bindsym k resize grow down
|
||||
bindsym Shift+k resize shrink down
|
||||
|
||||
bindsym l resize shrink up
|
||||
bindsym Shift+l resize grow up
|
||||
|
||||
bindsym semicolon resize grow right
|
||||
bindsym Shift+semicolon resize shrink right
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
|
Reference in New Issue
Block a user