aboutsummaryrefslogtreecommitdiffstats
path: root/sway/sway.5.scd
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-11-07 22:44:11 -0500
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-11-07 22:44:11 -0500
commit9e8aa3953098adb6175c26aebd984a32a2beccb0 (patch)
treeac64adf9f2720ddbb2476810f6ec05ec2a85a4ae /sway/sway.5.scd
parentAdd focus_follows_mouse always. (#3081) (diff)
downloadsway-9e8aa3953098adb6175c26aebd984a32a2beccb0.tar.gz
sway-9e8aa3953098adb6175c26aebd984a32a2beccb0.tar.zst
sway-9e8aa3953098adb6175c26aebd984a32a2beccb0.zip
Implement per side and per direction outer gaps
This introduces the following command extensions from `i3-gaps`: * `gaps horizontal|vertical|top|right|bottom|left <amount>` * `gaps horizontal|vertical|top|right|bottom|left all|current set|plus|minus <amount>` * `workspace <ws> gaps horizontal|vertical|top|right|bottom|left <amount>` `inner` and `outer` are also still available as options for all three of the above commands. `outer` now acts as a shorthand to set/alter all sides. Additionally, this fixes two bugs with the prevention of invalid gap configurations for workspace configs: 1. If outer gaps were not set and inner gaps were, the outer gaps would be snapped to the negation of the inner gaps due to `INT_MIN` being less than the negation. This took precedence over the default outer gaps. 2. Similarly, if inner gaps were not set and outer gaps were, inner gaps would be set to zero, which would take precedence over the default inner gaps. Fixing both of the above items also requires checking the gaps again when creating a workspace since the default outer gaps can be smaller than the negation of the workspace specific inner gaps.
Diffstat (limited to 'sway/sway.5.scd')
-rw-r--r--sway/sway.5.scd18
1 files changed, 12 insertions, 6 deletions
diff --git a/sway/sway.5.scd b/sway/sway.5.scd
index 4a645837..3bf6233d 100644
--- a/sway/sway.5.scd
+++ b/sway/sway.5.scd
@@ -133,9 +133,12 @@ They are expected to be used with *bindsym* or at runtime through *swaymsg*(1).
133*fullscreen* 133*fullscreen*
134 Toggles fullscreen for the focused view. 134 Toggles fullscreen for the focused view.
135 135
136*gaps* inner|outer all|current set|plus|minus <amount> 136*gaps* inner|outer|horizontal|vertical|top|right|bottom|left all|current
137set|plus|minus <amount>
137 Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the 138 Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the
138 _current_ workspace. 139 _current_ workspace. _outer_ gaps can be altered per side with _top_,
140 _right_, _bottom_, and _left_ or per direction with _horizontal_ and
141 _vertical_.
139 142
140*layout* default|splith|splitv|stacking|tabbed 143*layout* default|splith|splitv|stacking|tabbed
141 Sets the layout mode of the focused container. 144 Sets the layout mode of the focused container.
@@ -429,14 +432,16 @@ The default colors are:
429 _focus\_wrapping force_. This is only available for convenience. Please 432 _focus\_wrapping force_. This is only available for convenience. Please
430 use _focus\_wrapping_ instead when possible. 433 use _focus\_wrapping_ instead when possible.
431 434
432*gaps* inner|outer <amount> 435*gaps* inner|outer|horizontal|vertical|top|right|bottom|left <amount>
433 Sets default _amount_ pixels of _inner_ or _outer_ gap, where the inner 436 Sets default _amount_ pixels of _inner_ or _outer_ gap, where the inner
434 affects spacing around each view and outer affects the spacing around each 437 affects spacing around each view and outer affects the spacing around each
435 workspace. Outer gaps are in addition to inner gaps. To reduce or remove 438 workspace. Outer gaps are in addition to inner gaps. To reduce or remove
436 outer gaps, outer gaps can be set to a negative value. 439 outer gaps, outer gaps can be set to a negative value. _outer_ gaps can
440 also be specified per side with _top_, _right_, _bottom_, and _left_ or
441 per direction with _horizontal_ and _vertical_.
437 442
438 This affects new workspaces only, and is used when the workspace doesn't 443 This affects new workspaces only, and is used when the workspace doesn't
439 have its own gaps settings (see: workspace <ws> gaps inner|outer <amount>). 444 have its own gaps settings (see: workspace <ws> gaps ...).
440 445
441*hide\_edge\_borders* none|vertical|horizontal|both|smart|smart\_no\_gaps 446*hide\_edge\_borders* none|vertical|horizontal|both|smart|smart\_no\_gaps
442 Hides window borders adjacent to the screen edges. Default is _none_. 447 Hides window borders adjacent to the screen edges. Default is _none_.
@@ -549,7 +554,8 @@ The default colors are:
549*workspace* back\_and\_forth 554*workspace* back\_and\_forth
550 Switches to the previously focused workspace. 555 Switches to the previously focused workspace.
551 556
552*workspace* <name> gaps inner|outer <amount> 557*workspace* <name> gaps inner|outer|horizontal|vertical|top|right|bottom|left
558<amount>
553 Specifies that workspace _name_ should have the given gaps settings when it 559 Specifies that workspace _name_ should have the given gaps settings when it
554 is created. 560 is created.
555 561