Handle border options for gaps

Fixes `hide_edge_borders smart` when gaps are in use.
Implements `hide_edge_borders smart_no_gaps` and `smart_borders
on|no_gaps|off`.

Since `smart_borders on` is equivalent to `hide_edge_borders smart`
and `smart_borders no_gaps` is equivalent to `hide_edge_borders
smart_no_gaps`, I opted to just save the last value set for
`hide_edge_borders` and restore that on `smart_borders off`. This
simplifies the conditions for setting the border.
This commit is contained in:
Brian Ashworth 2018-10-01 12:56:27 -04:00
parent b542c5413e
commit bb25194844
9 changed files with 68 additions and 20 deletions

View file

@ -431,7 +431,7 @@ The default colors are:
Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the
_current_ workspace.
*hide\_edge\_borders* none|vertical|horizontal|both|smart
*hide\_edge\_borders* none|vertical|horizontal|both|smart|smart\_no\_gaps
Hides window borders adjacent to the screen edges. Default is _none_.
*input* <input\_device> <input-subcommands...>
@ -456,6 +456,12 @@ The default colors are:
*kill*
Kills (closes) the currently focused container and all of its children.
*smart\_borders* on|no\_gaps|off
If smart\_borders are _on_, borders will only be enabled if the workspace
only has one visible child (identical to _hide\_edge\_borders_ smart). If
smart\_borders is set to _no\_gaps_, borders will only be enabled if the
workspace only has one visible child and gaps greater than zero.
*smart\_gaps* on|off
If smart\_gaps are _on_ gaps will only be enabled if a workspace has more
than one child.