Add new input to resize window with keyboard in sway

This commit is contained in:
Xamora 2024-01-08 15:09:19 +01:00
parent f36946e768
commit 3084469436

View file

@ -35,8 +35,8 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# #
# Example configuration: # Example configuration:
# #
#exec swayidle -w \ exec swayidle -w \
# timeout 300 'swaylock -c "#000000"' \ timeout 300 'swaylock -c "#000000"' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ # timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000' # before-sleep 'swaylock -f -c 000000'
@ -111,6 +111,8 @@ input * {
bindsym $mod+Shift+Down move down bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right bindsym $mod+Shift+Right move right
bindsym $mod+Shift+w unfocus
# #
# Workspaces: # Workspaces:
# #
@ -178,6 +180,7 @@ input * {
# #
# Resizing containers: # Resizing containers:
# #
bindsym $mod+r mode "resize"
mode "resize" { mode "resize" {
# left will shrink the containers width # left will shrink the containers width
# right will grow the containers width # right will grow the containers width
@ -194,11 +197,15 @@ mode "resize" {
bindsym Up resize shrink height 10px bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px bindsym Right resize grow width 10px
bindsym Shift+Left resize shrink width 50px
bindsym Shift+Down resize grow height 50px
bindsym Shift+Up resize shrink height 50px
bindsym Shift+Right resize grow width 50px
# Return to default mode # Return to default mode
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindsym $mod+r mode "resize"
# #
# Layout window # Layout window