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

Register a layout for long/vertical/portrait monitors #16

Open
yamsu opened this issue Dec 17, 2024 · 0 comments
Open

Register a layout for long/vertical/portrait monitors #16

yamsu opened this issue Dec 17, 2024 · 0 comments

Comments

@yamsu
Copy link

yamsu commented Dec 17, 2024

Hi, this is a terrific addon to i3wm. The following might be useful for folks who have rotated their monitors.

@register_layout
class Layout_MainTop:

    name = "mainTop"
    aliases = ["mt"]
    description = """\
            One large window to the top at 50%,
            all others stacked to the right horizontally.

            -------------
            |           |
            |     1     |
            |           |
            |-----|-----|
            |  2  |  3  |
            -------------
            """

    def get_json(self, window_count):
        return node(
            1,
            "splitv",
            False,
            [node(0.5, "splith", True, []), get_stack(window_count - 1, "splith")],
        )

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

No branches or pull requests

1 participant