Skip to content

Instantly share code, notes, and snippets.

@ildyria
Last active April 7, 2019 16:28
Show Gist options
  • Save ildyria/b37ac5a7c2ee1334bba334a3ae4ea930 to your computer and use it in GitHub Desktop.
Save ildyria/b37ac5a7c2ee1334bba334a3ae4ea930 to your computer and use it in GitHub Desktop.
set $win Mod4
set $alt Mod1
##
## resize mode
##
bindsym $win+r mode "resize"
mode "resize" {
# same bindings, but for the arrow keys
bindsym Left resize shrink width 1 px or 1 ppt
bindsym Down resize grow height 1 px or 1 ppt
bindsym Up resize shrink height 1 px or 1 ppt
bindsym Right resize grow width 1 px or 1 ppt
# same bindings, but for the arrow keys
bindsym Control+Left resize shrink width 5 px or 5 ppt
bindsym Control+Down resize grow height 5 px or 5 ppt
bindsym Control+Up resize shrink height 5 px or 5 ppt
bindsym Control+Right resize grow width 5 px or 5 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
## Title / show / hide border ##
bindsym o border toggle
## Back to normal ##
bindsym $win+r mode "default"
}
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $alt+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment