dj95 / zjstatus

A configurable statusbar plugin for zellij
MIT License
489 stars 9 forks source link

Tab truncate is broken #91

Closed Eloquencere closed 3 weeks ago

Eloquencere commented 3 weeks ago

Description

I understand that there's an option called tab_display_count but, the original zellij status bars don't suffer from that issue, I doubt that someone set a max tab_display_count because in my experience, they all dynamically allocate tabs to the screen space available. So, it would be great to see a dynamic number of tabs based on their character lengths to allocate them on the screen.

dj95 commented 3 weeks ago

Hi and thank you for the feature request.

The original status bar does not suffer from this issue, as it has a static layout.

In case of zjstatus, it's not really possible to calculate the space available for tabs, as parts of the statusbar are rendered one by one and you can place tabs basically everywhere. It's really hard to calculate the max width, as the tabs could grow even with a widget after them. But how should it the grow in case of other widgets also growing? In this case you need some precedence and all of this gets really complex, which I don't really see as an appropriate solution for this particular problem.

I hope that you are fine with the current options to limit tabs because I won't implement this. If you are aware of a less complex solution, I'd be happy to discuss it or review it in a pull request.