[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:
Marty Oehme 2020-02-19 00:19:54 +01:00
parent 4191ed430b
commit 92d5155aca
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A

View file

@ -88,14 +88,15 @@ bindsym $mod+a focus child
# GAP MANAGEMENT
# disable titles and borders, necessary for i3gaps to work apparently
for_window [class="^.*"] border pixel 0
# no gaps if there is only 1 window
smart_gaps on
# by default set some gaps when multiple windows are on the workspace
# by default set no gaps when multiple windows are on the workspace
gaps inner 0
gaps outer 0
# enable / disable gaps (g disables, G enables)
bindsym $mod+shift+g gaps inner current set 15; gaps outer current set 0
bindsym $mod+g gaps inner current set 0; gaps outer current set 0
# increase/decrease inner gapping
bindsym $mod+shift+g gaps inner current plus 10
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.
# 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
bindsym h exec playerctl position 5-
bindsym Shift+h exec playerctl position 15-
@ -192,7 +194,7 @@ mode "media" {
}
bindsym $modemod+r mode "resize"
bindsym $modemod+m mode "media"
bindsym $modemod+m mode $mode_media
# reload the configuration file
bindsym $mod+Shift+y reload