## Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
##
## Modes

## Resize container (you can also use the mouse for that)
mode "Resize" {
	# These bindings trigger as soon as you enter the 'Resize' mode	
	bindsym Left resize shrink width 50 px or 10 ppt
	bindsym Down resize grow height 50 px or 10 ppt
	bindsym Up resize shrink height 50 px or 10 ppt
	bindsym Right resize grow width 50 px or 10 ppt
	
	# back to normal: Enter or Escape or $MOD+r
	bindsym Return mode "default"
	bindsym Escape mode "default"
	bindsym $MOD+Shift+r mode "default"
}
bindsym $MOD+Shift+r mode "Resize"

#------

## Move container (you can also use the mouse for that)
mode "Move" {
	# These bindings trigger as soon as you enter the 'Move' mode
	bindsym Left move left 20px
	bindsym Down move down  20px
	bindsym Up move up 20px
	bindsym Right move right 20px
	
	# back to normal: Enter or Escape or $MOD+m
	bindsym Return mode "default"
	bindsym Escape mode "default"
	bindsym $MOD+Shift+m mode "default"
}
bindsym $MOD+Shift+m mode "Move"

#------

## Gaps
set $mode_gaps Gaps: (o)uter, (i)nner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)

## Outer Gaps
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 "$mode_gaps"
	bindsym Escape mode "default"
}

## Inner Gaps
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 "$mode_gaps"
	bindsym Escape mode "default"
}

mode "$mode_gaps" {
	bindsym o      mode "$mode_gaps_outer"
	bindsym i      mode "$mode_gaps_inner"
	bindsym Return mode "$mode_gaps"
	bindsym Escape mode "default"
}

bindsym $MOD+Shift+g mode "$mode_gaps"
