Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement per side and per direction outer gaps #3087

Merged
merged 1 commit into from
Nov 8, 2018

Conversation

RedSoxFan
Copy link
Member

Closes #3059

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.

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.
@RyanDwyer RyanDwyer merged commit aad2f44 into swaywm:master Nov 8, 2018
@RyanDwyer
Copy link
Member

Thanks!

@RedSoxFan RedSoxFan deleted the side-gaps branch November 8, 2018 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

gaps: support side-specific gap configuration
3 participants