[i3] Simplify gap management, improve mode naming
i3 now uses mod4[+shift]+g to increase/decrease inner gaps and +b to do the same for outer gaps. The mode name for media has been put into a variable to make potential dynamic namings possible and avoid duplication.
This commit is contained in:
parent
4191ed430b
commit
92d5155aca
1 changed files with 10 additions and 8 deletions
|
@ -88,14 +88,15 @@ bindsym $mod+a focus child
|
||||||
# GAP MANAGEMENT
|
# GAP MANAGEMENT
|
||||||
# disable titles and borders, necessary for i3gaps to work apparently
|
# disable titles and borders, necessary for i3gaps to work apparently
|
||||||
for_window [class="^.*"] border pixel 0
|
for_window [class="^.*"] border pixel 0
|
||||||
# no gaps if there is only 1 window
|
# by default set no gaps when multiple windows are on the workspace
|
||||||
smart_gaps on
|
|
||||||
# by default set some gaps when multiple windows are on the workspace
|
|
||||||
gaps inner 0
|
gaps inner 0
|
||||||
gaps outer 0
|
gaps outer 0
|
||||||
# enable / disable gaps (g disables, G enables)
|
# increase/decrease inner gapping
|
||||||
bindsym $mod+shift+g gaps inner current set 15; gaps outer current set 0
|
bindsym $mod+shift+g gaps inner current plus 10
|
||||||
bindsym $mod+g gaps inner current set 0; gaps outer current set 0
|
bindsym $mod+g gaps inner current minus 10
|
||||||
|
# increase/decrease outer gapping
|
||||||
|
bindsym $mod+shift+b gaps outer current plus 10
|
||||||
|
bindsym $mod+b gaps outer current minus 10
|
||||||
|
|
||||||
# Define names for default workspaces for which we configure key bindings later on.
|
# Define names for default workspaces for which we configure key bindings later on.
|
||||||
# We use variables to avoid repeating the names in multiple places.
|
# We use variables to avoid repeating the names in multiple places.
|
||||||
|
@ -165,7 +166,8 @@ mode "resize" {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mode "media" {
|
set $mode_media "Media"
|
||||||
|
mode $mode_media {
|
||||||
# Pressing left will move 5s back
|
# Pressing left will move 5s back
|
||||||
bindsym h exec playerctl position 5-
|
bindsym h exec playerctl position 5-
|
||||||
bindsym Shift+h exec playerctl position 15-
|
bindsym Shift+h exec playerctl position 15-
|
||||||
|
@ -192,7 +194,7 @@ mode "media" {
|
||||||
}
|
}
|
||||||
|
|
||||||
bindsym $modemod+r mode "resize"
|
bindsym $modemod+r mode "resize"
|
||||||
bindsym $modemod+m mode "media"
|
bindsym $modemod+m mode $mode_media
|
||||||
|
|
||||||
# reload the configuration file
|
# reload the configuration file
|
||||||
bindsym $mod+Shift+y reload
|
bindsym $mod+Shift+y reload
|
||||||
|
|
Loading…
Reference in a new issue