From 92d5155aca940bee97847372d12b1f3f6b945483 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 19 Feb 2020 00:19:54 +0100 Subject: [PATCH] [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. --- i3/.config/i3/config | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 3b7318d..581a9a4 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -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