wustho / epy

CLI Ebook (epub2, epub3, fb2, mobi) Reader
GNU General Public License v3.0
928 stars 52 forks source link

[Feature Request] Reset margins when window is fullscreened again #91

Open kekkoudesu opened 1 year ago

kekkoudesu commented 1 year ago

I use Sway, a tiling window manager. I've also set the font size of my terminal, Alacritty, to 16pt, which means that, whenever I open up epy, the margins are shorter than the default. When I fullscreen the terminal window, the text retains the smaller margins as opposed to reducing the margins to the default amount. I need to press = every time I invoke epy to reset it.

This also defeats the purpose of reducing the margins even further, because every time I close epy and re-open it, the margins push in the text so it matches the half of my screen it takes up again.

How I Expect It To Behave:

When I open epy, the margins should push the text in so it fits the window, but when I fullscreen it, it should change the margins to the most recent user-set value. If I shrink the window again such that the margins need to push the text, it should increase the perceived margin, but retain the margin value I set before changing it. If, at any point, I change the margins again, this should update the user-set value.

It would also be nice to be able to set the margins inside the configuration file too if/when it works this way.