You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tab labels are composed in the renderer with a fixed four columns of padding, and every tab is floored at eight columns wide. Neither is reachable from config, so the only way to fit more tabs on a row is to shorten the tab names themselves.
On a narrow terminal, or with a lot of tabs open, that padding is most of what the tab bar is spending its width on. There is also no way to show the tab's index in the label, which makes prefix-number tab switching harder to use than it could be — you have to count positions rather than read the number off the tab.
This overlaps with #1176, which asks for a configurable tab bar more broadly and already has a prototype covering position, alignment and per-tab colours. I should have posted this there rather than opening a separate thread — apologies. What I am describing is one narrow axis of that: what the label is made of and how wide the tab is, rather than where the bar sits or how it is coloured. If #1176 grows a config surface for the tab bar, these two settings would fit naturally inside it. (#3195 raises a third axis again: label colours and hiding the + button.)
requested change
Two settings under [ui]:
tab_format — a format string for the label, with {name}, {index} and {zoom} placeholders, where spaces in the format are the tab's padding. "{name}{zoom}" gives flush labels with no padding; " {index}:{name} " gives tmux-style numbering.
tab_min_width — the floor below which a tab is not drawn, so short labels can be allowed to actually be short.
The defaults would render exactly as Herdr does today, including the centred labels and symmetric highlight padding from #2570.
why you want this
I run Herdr with many tabs on a laptop screen, and the fixed padding is a large share of each tab before any label is drawn — 4 of 11 columns for a tab named backend, 4 of 9 for herdr, and 7 of 8 for an unnamed tab showing just its number. Being able to set flush labels and a lower floor fits noticeably more tabs on screen without renaming anything.
The {index} placeholder is the other half of it: with the number visible in the label, prefix-number switching becomes something you can read rather than count.
existing implementation
I have both implemented, rebased on current master, with tests and defaults that render identically to today. The branch is on my fork if you want to build and try it:
If this is a direction you would consider, I would like to contribute it: I am not currently an approved contributor, so I am raising this here first rather than opening a pull request, and would be glad to submit one if you would like the change and are happy for me to.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
idea / problem
Tab labels are composed in the renderer with a fixed four columns of padding, and every tab is floored at eight columns wide. Neither is reachable from config, so the only way to fit more tabs on a row is to shorten the tab names themselves.
On a narrow terminal, or with a lot of tabs open, that padding is most of what the tab bar is spending its width on. There is also no way to show the tab's index in the label, which makes prefix-number tab switching harder to use than it could be — you have to count positions rather than read the number off the tab.
This overlaps with #1176, which asks for a configurable tab bar more broadly and already has a prototype covering position, alignment and per-tab colours. I should have posted this there rather than opening a separate thread — apologies. What I am describing is one narrow axis of that: what the label is made of and how wide the tab is, rather than where the bar sits or how it is coloured. If #1176 grows a config surface for the tab bar, these two settings would fit naturally inside it. (#3195 raises a third axis again: label colours and hiding the
+button.)requested change
Two settings under
[ui]:tab_format— a format string for the label, with{name},{index}and{zoom}placeholders, where spaces in the format are the tab's padding."{name}{zoom}"gives flush labels with no padding;" {index}:{name} "gives tmux-style numbering.tab_min_width— the floor below which a tab is not drawn, so short labels can be allowed to actually be short.The defaults would render exactly as Herdr does today, including the centred labels and symmetric highlight padding from #2570.
why you want this
I run Herdr with many tabs on a laptop screen, and the fixed padding is a large share of each tab before any label is drawn — 4 of 11 columns for a tab named
backend, 4 of 9 forherdr, and 7 of 8 for an unnamed tab showing just its number. Being able to set flush labels and a lower floor fits noticeably more tabs on screen without renaming anything.The
{index}placeholder is the other half of it: with the number visible in the label, prefix-number switching becomes something you can read rather than count.existing implementation
I have both implemented, rebased on current
master, with tests and defaults that render identically to today. The branch is on my fork if you want to build and try it:master...aspiers:herdr:feat/configurable-tab-format
If this is a direction you would consider, I would like to contribute it: I am not currently an approved contributor, so I am raising this here first rather than opening a pull request, and would be glad to submit one if you would like the change and are happy for me to.
All reactions