Change layout depending on window size

Board for discussions around the Epyrus mail and news client.

Moderator: athenian200

User avatar
PseudoDistant
Moonbather
Moonbather
Posts: 73
Joined: 2024-02-06, 20:19

Change layout depending on window size

Unread post by PseudoDistant » 2024-03-10, 21:40

I like to multitask a lot, so I very often spontaneously move and resize windows while working.
One thing I've always wanted from an email client was a way to adapt my layout while I did this.
The classic layout works very well when I move the window to occupy half my monitor's horizontal space, it gives enough space to the email for readability while still leaving room to move to a different email (or RSS feed).
The vertical layout is ideal for if the window is full screen, as most emails these days are optimized to be viewed on a phone, so keeping the classic layout results in a lot of emails having content along a narrow strip in the middle while a lot of screen space is wasted.
In Epyrus, I constantly find myself changing between different layouts as I do this, and it's rather annoying.
(I should specify that this isn't a complaint about Epyrus, Thunderbird had the same issue, and most other email clients I've tried don't even let you change the layout.)

Is there an extension that already automatically changes the layout depending on screen size?
If not, how can I change the layout via an extension? Is there some API for it?
Eat your school.
Eat your drugs.
Eat your teeth.

User avatar
Bilbo47
Fanatic
Fanatic
Posts: 240
Joined: 2017-11-18, 04:24

Re: Change layout depending on window size

Unread post by Bilbo47 » 2024-03-10, 22:06

PseudoDistant wrote:
2024-03-10, 21:40
I very often move and resize windows while working ... Is there an extension that automatically changes the layout
This doesn't answer the question directly, but it's useful when switching Epyrus and other apps from "front and center" mode to "half screen" mode, say when doing a teleconference meeting while actively using other windows at the same time. Sizer by BrianApps is indispensable, alongside my homegrown automatic window sizing utility.

User avatar
PseudoDistant
Moonbather
Moonbather
Posts: 73
Joined: 2024-02-06, 20:19

Re: Change layout depending on window size

Unread post by PseudoDistant » 2024-03-10, 22:24

Bilbo47 wrote:
2024-03-10, 22:06
PseudoDistant wrote:
2024-03-10, 21:40
I very often move and resize windows while working ... Is there an extension that automatically changes the layout
This doesn't answer the question directly, but it's useful when switching Epyrus and other apps from "front and center" mode to "half screen" mode, say when doing a teleconference meeting while actively using other windows at the same time. Sizer by BrianApps is indispensable, alongside my homegrown automatic window sizing utility.
I actually use a very similar tool.
I wrote it myself in Java, and it uses `wmctrl` as a backend. :)
I stopped using it as much when KDE Plasma added the ability to snap windows around with Meta + dir, but I still occasionally use it.
And if you think Java's bad (I don't, it's one of my favorite programming languages), the original one I made was written in Python (Which I used to use, and now detest).
Eat your school.
Eat your drugs.
Eat your teeth.