zigalenarcic / mangl

An enhanced man page viewer for linux and BSD systems based on OpenGL and mandoc libraries
Other
39 stars 7 forks source link

Automatic page width #8

Closed vaygr closed 4 months ago

vaygr commented 1 year ago

In tiling window managers it's common that app window is maximized resulting in awkward-looking manpage display by mangl.

I wonder if it'd be easy to make manpage width automatic based on the window width.

shot-2022-09-24_201634

christian-burger commented 11 months ago

In that regard I'd like to point out that there is an "optimal" line length for convenient reading. And it seems to me, that mangl fits that criteria.

Maybe just center the whole block instead? Might look less awkward. :shrug:

Or: When there is enough width: Show multiple columns. Though I guess, that's a pretty heavy feature with a lot of side effects, complicating the matter very much.

zigalenarcic commented 7 months ago

In v1.1.3 there is now automatic centering of the text. The number of characters in a line (78) however is still fixed due to the reason mentioned by @christian-burger - long lines are harder to read. If necessary I can add an option (either in settings or as a key command) to change the line length.

zigalenarcic commented 6 months ago

I've added support for:

I think it will help with these issues.

vaygr commented 6 months ago

This is excellent @zigalenarcic, thanks. Tested, works as expected. Maybe it makes sense to add a shortcut to get back to default view or have = as a toggle?

zigalenarcic commented 4 months ago

Hi I made it toggle the width in commit 0f3db125ea3e385ac07b69fc1a505049c06cf165