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

[wip] Add ToggleSnapToEdge #1671

Closed

Conversation

Consolatis
Copy link
Member

@Consolatis Consolatis commented Mar 31, 2024

This allows to replace the usual maximize behavior that does not respect gaps with SnapToEdge direction="center" which does respect gaps. It can be bound to the SSD Maximize button and Title double click handlers in rc.xml.

Missing:

  • docs
  • some enum for <snapping topMaximize="yes|no"> like yes|no|respectGaps
  • an entry in the website FAQ like "How to make maximize respect gaps"

Ref: https://www.reddit.com/r/labwc/comments/1brvsj8/


Not sure when I'll be working on this again, if somebody else wants to take this over feel free.

To test:

<labwc_config>

    <keyboard>
        <default />
        <keybind key="W-a">
            <action name="ToggleSnapToEdge" direction="center" />
        </keybind>
    </keyboard>

    <mouse>
        <default />
        <context name="Maximize">
            <mousebind button="Left" action="Click">
                <action name="ToggleSnapToEdge" direction="center" />
            </mousebind>
        </context>

        <context name="Title">
            <mousebind button="Left" action="DoubleClick">
                <action name="ToggleSnapToEdge" direction="center" />
            </mousebind>
        </context>
    </mouse>

</labwc_config>

This allows to replace the usual maximize behavior that does not
respect gaps with SnapToEdge direction="center" which does respect
gaps. It can be bound to the SSD Maximize button and Title double
click handlers in rc.xml.

Missing:
- [ ] docs
- [ ] some enum for `<snapping topMaximize="yes|no">`
      like `yes|no|respect_gaps`

Ref: https://www.reddit.com/r/labwc/comments/1brvsj8/
@johanmalm
Copy link
Collaborator

Looks good.

I've been thinking that we ought to have a Normalize (or similar) action to restore natural geometry and unset tiled. I might implement that after this PR 😄

@tokyo4j
Copy link
Contributor

tokyo4j commented Aug 25, 2024

Perhaps I'll take over this PR if I find enough time since I found a Japanese tweet wanting this feature.

@tokyo4j
Copy link
Contributor

tokyo4j commented Sep 26, 2024

Superseded by #2154.

EDIT:

  • some enum for like yes|no|respectGaps
  • an entry in the website FAQ like "How to make maximize respect gaps"

These look interesting though.

@tokyo4j tokyo4j closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants