Merge pull request #822 from mayhewj/add-resize-to-config

Add resize mode to the default config file
master
Drew DeVault 8 years ago committed by GitHub
commit c970d45d74

@ -8,6 +8,11 @@
# #
# Logo key. Use Mod1 for Alt. # Logo key. Use Mod1 for Alt.
set $mod Mod4 set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator # Your preferred terminal emulator
set $term urxvt set $term urxvt
# Your preferred application launcher # Your preferred application launcher
@ -52,11 +57,11 @@ output * bg /usr/share/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# #
# Moving around: # Moving around:
# #
# Move your focus around with $mod+[h|j|k|l], like vim # Move your focus around
bindsym $mod+h focus left bindsym $mod+$left focus left
bindsym $mod+j focus down bindsym $mod+$down focus down
bindsym $mod+k focus up bindsym $mod+$up focus up
bindsym $mod+l focus right bindsym $mod+$right focus right
# or use $mod+[up|down|left|right] # or use $mod+[up|down|left|right]
bindsym $mod+Left focus left bindsym $mod+Left focus left
bindsym $mod+Down focus down bindsym $mod+Down focus down
@ -64,10 +69,10 @@ output * bg /usr/share/sway/Sway_Wallpaper_Blue_1920x1080.png fill
bindsym $mod+Right focus right bindsym $mod+Right focus right
# _move_ the focused window with the same, but add Shift # _move_ the focused window with the same, but add Shift
bindsym $mod+Shift+h move left bindsym $mod+Shift+$left move left
bindsym $mod+Shift+j move down bindsym $mod+Shift+$down move down
bindsym $mod+Shift+k move up bindsym $mod+Shift+$up move up
bindsym $mod+Shift+l move right bindsym $mod+Shift+$right move right
# ditto, with arrow keys # ditto, with arrow keys
bindsym $mod+Shift+Left move left bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down bindsym $mod+Shift+Down move down
@ -137,6 +142,30 @@ output * bg /usr/share/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# Show the next scratchpad window or hide the focused scratchpad window. # Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them. # If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
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
# ditto, with 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
# return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# #
# Status Bar: # Status Bar:

Loading…
Cancel
Save