Ant
November 25, 2023, 8:36pm
1
Use case or problem
Pinned notes take up valuable space which can be used to show the titles of other non pinned tabs.
Proposed solution
The horizontal size of a pinned tab should be smaller than a normal tab. This behavior should mimic that of Chrome or Firefox where a pinned tab’s size is only big enough for the first couple letters of the name.
Current workaround (optional)
All pinned notes are opened in their own window which i manually shrink. If i need to reference those notes I expand the panel.
8 Likes
woofy31
November 25, 2023, 8:48pm
2
You can always make a permanent CSS snippet if this won’t get implemented, as follows
.workspace-tab-header:has(.mod-pinned) {
/* shrink if pinned */
max-width: 60px !important;
/* also hide the title of pinned tabs */
& .workspace-tab-header-inner-title {
display: none;
}
}
Result (far better than using extra windows, right?) :
…there is still a tooltip shown if you hover the shrunk tab, and unpinning reverts the tab as expected
Heck, I’m keeping this in my vault - can’t believe I haven’t thought about it before.
8 Likes
Ant
December 20, 2023, 11:47pm
3
Thats a great idea. Thanks for the snippet.
1 Like
+1
this would be really nice
ptr
May 17, 2024, 4:48am
5
How do you get the file icon in tabs?
Hello there!
Here is my first plugin, inspired by the @woofy31 snippet above.
I added a setting to show or hide the tab title.
You can checkout it (or see screenshots) here: GitHub - nicosomb/obsidian-shrink-pinned-tabs: Obsidian plugin to shrink pinned tabs in order to save screen space
I have still some work to do on it (I found a bug) but it works at 90%
I will publish it soon.
Have a nice day.
2 Likes
I’ve improved upon your snippet to work better with prefix emojis and to resemble Chromium pinned tabs:
.workspace-tab-header:has(.mod-pinned) {
/* shrink if pinned, to the size of an emoji */
max-width: 36px !important;
& .workspace-tab-header-inner-title {
/* hide the title of pinned tabs (optional) */
/* display: none; !important*/
/* hide ellipsis character */
text-overflow: clip !important;
}
/* hide pin icon */
& .workspace-tab-header-status-container {
display: none !important;
}
}
Result: