2021-01-13 07:10:31 +00:00
|
|
|
# resize window (you can also use the mouse for that)
|
2023-12-27 13:41:07 +00:00
|
|
|
set $mode_resize "Resize mode (p to enter precise mode, Enter or ESC to exit)"
|
|
|
|
set $mode_resize_precise "Precise resize mode (p to enter regular resize mode, Enter or ESC to exit)"
|
|
|
|
|
|
|
|
mode $mode_resize {
|
2021-01-13 07:10:31 +00:00
|
|
|
# resize with arrow keys
|
|
|
|
bindsym Left resize shrink width 10 px or 10 ppt
|
2023-12-27 13:41:07 +00:00
|
|
|
bindsym Down resize shrink height 10 px or 10 ppt
|
|
|
|
bindsym Up resize grow height 10 px or 10 ppt
|
2021-01-13 07:10:31 +00:00
|
|
|
bindsym Right resize grow width 10 px or 10 ppt
|
|
|
|
|
2021-01-24 20:56:41 +00:00
|
|
|
# resize with vim keys
|
|
|
|
bindsym $left resize shrink width 10 px or 10 ppt
|
2023-12-27 13:41:07 +00:00
|
|
|
bindsym $down resize shrink height 10 px or 10 ppt
|
|
|
|
bindsym $up resize grow height 10 px or 10 ppt
|
2021-01-24 20:56:41 +00:00
|
|
|
bindsym $right resize grow width 10 px or 10 ppt
|
|
|
|
|
2021-01-13 07:10:31 +00:00
|
|
|
# press p to enter precise resize mode
|
2023-12-27 13:41:07 +00:00
|
|
|
bindsym p mode $mode_resize_precise
|
2021-01-13 07:10:31 +00:00
|
|
|
|
|
|
|
# back to normal: Enter or Escape
|
|
|
|
bindsym Return mode "default"
|
|
|
|
bindsym Escape mode "default"
|
|
|
|
}
|
|
|
|
|
2023-12-27 13:41:07 +00:00
|
|
|
mode $mode_resize_precise {
|
2021-01-13 07:10:31 +00:00
|
|
|
# resize with arrow keys
|
|
|
|
bindsym Left resize shrink width 1 px or 1 ppt
|
2023-12-27 13:41:07 +00:00
|
|
|
bindsym Down resize shrink height 1 px or 1 ppt
|
|
|
|
bindsym Up resize grow height 1 px or 1 ppt
|
2021-01-13 07:10:31 +00:00
|
|
|
bindsym Right resize grow width 1 px or 1 ppt
|
|
|
|
|
2021-01-24 20:56:41 +00:00
|
|
|
# resize with vim keys
|
|
|
|
bindsym $left resize shrink width 1 px or 1 ppt
|
2023-12-27 13:41:07 +00:00
|
|
|
bindsym $down resize shrink height 1 px or 1 ppt
|
|
|
|
bindsym $up resize grow height 1 px or 1 ppt
|
2021-01-24 20:56:41 +00:00
|
|
|
bindsym $right resize grow width 1 px or 1 ppt
|
|
|
|
|
2021-01-13 07:10:31 +00:00
|
|
|
# go back to normal resize mode with p
|
2023-12-27 13:41:07 +00:00
|
|
|
bindsym p mode $mode_resize
|
2021-01-13 07:10:31 +00:00
|
|
|
|
|
|
|
# back to normal with Enter or Escape
|
|
|
|
bindsym Return mode "default"
|
|
|
|
bindsym Escape mode "default"
|
|
|
|
}
|
|
|
|
|
|
|
|
# enter resize mode with r
|
2023-12-27 13:41:07 +00:00
|
|
|
bindsym $mod+r mode $mode_resize
|