-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Show tabnumbers #1601
Comments
This is especially useful for the handful of "pinned tabs" which can be accessed with shortcuts |
Exactly! Users of for example vimium-ff (like me) can also go to tab by numbers: |
It seems possible via user-defined style rules like: #tabbar {
counter-reset: tabs;
}
.tab:not(.collapsed) {
counter-increment: tabs;
}
.tab .active-marker::before {
background: Highlight;
color: HighlightText;
content: counter(tabs);
font-size: x-small;
right: 0.2em;
padding: 0.2em;
pointer-events none;
position: absolute;
bottom: 0.2em;
} |
@piroor cool! Could we get this as a real option in TST, or at least added to the wiki? =) https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules |
The suggested CSS code doesn't seem to update correctly when a tab is closed. The tab counter will still count any tab that is closed after you start using it. This can easily be seen by closing a tab and then looking at the neighbors of that tab. This bug can also be seen by repeatedly opening a new tab and closing it. |
@erikw OK, I've added this to the code snippets as https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#numbering-of-tabs-1601 |
sorrry to spam this, but how can I know to which version that code corresponds to ? I would like to have the tab numbers, but only when the fixed version is available 😃 |
@cipri-tom did you want to know the version of TST including #1601 (comment) ? Then it is not released yet as a public version. Only development version is available: https://piro.sakura.ne.jp/xul/xpi/nightly/treestyletab-we.xpi |
Is is possible to add a Ctrl+<123> shortcut for a multidigit number typed within say a one second time interval? |
Tab numbers could also show up only on pressing and holding the modifier key. |
For vi-like extensions, I would be especially interested in relative tab numbers from the currently active one, as proximity to the active tab is usually higher for tabs I'm interested in. With just the CSS, I can browse any tab currently using |
Here is a modified version of https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#tab-numbering-and-counting showing numbers only the active tab and its followers: #tabbar,
tab-item.active {
counter-reset: vtabs atabs tabs;
/* vtabs tracks visible tabs, atabs tracks active tabs, tabs tracks all tabs */
}
tab-item:not(.collapsed):not(.discarded) {
counter-increment: vtabs atabs tabs;
}
tab-item:not(.collapsed) {
counter-increment: vtabs tabs;
}
tab-item:not(.discarded) {
counter-increment: atabs tabs;
}
tab-item {
counter-increment: tabs;
}
tab-item .extra-items-container.behind {
z-index: unset !important;
}
tab-item.active .extra-items-container.behind::after,
tab-item.active ~ tab-item .extra-items-container.behind::after {
background: Highlight;
color: HighlightText;
content: counter(vtabs);
font-size: x-small;
right: 0.2em;
padding: 0.2em;
pointer-events: none;
position: absolute;
bottom: 0.2em;
z-index: 1000;
} But it doesn't allow you to move back to the parent tab, hmm... |
Since users of treestyletab are uses who have a lot of tabs open, it would be useful to display the tabnumber, from 1.. upwards.
Use cases:
....
Being a long-time vimperator user in the past, before FX57, this is something I miss, and that I think TST could possibly provide :).
The text was updated successfully, but these errors were encountered: