How to set the icon for a note on right side bar

Things I have tried

What I’m trying to do

I have several “special” notes that I’ve added to the right side bar (e.g. Goals.md). Since the title isn’t displayed, I rely on the icons to differentiate between the tabs in the side bar. But my 4 special notes all have the same icon. Is there a way to set the icon for a specific note when it’s on the side bar?

2 Likes

this is a custom snippet, you can add them to your snippets. To customize your icon, you should change the aria-label to your special note’s name and change the background-image :

.workspace-tab-header[aria-label^="Obsidian"]
> .workspace-tab-header-inner
> .workspace-tab-header-inner-icon
> .document{
    display: none;
}

.workspace-tab-header[aria-label^="Obsidian"]
> .workspace-tab-header-inner
> .workspace-tab-header-inner-icon{
    background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2NHB4IiBoZWlnaHQ9IjY0cHgiIHZpZXdCb3g9IjAgMCA2NCA2NCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNjQgNjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiAgPGltYWdlIGlkPSJpbWFnZTAiIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgeD0iMCIgeT0iMCIKICAgIGhyZWY9ImRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFBRUFBQUFCQUNBWUFBQUNxYVhIZUFBQUJUbWxEUTFCcFkyTU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pRQUFBQ1YwUlZoMFpHRjAKWlRwdGIyUnBabmtBTWpBeU1TMHdOUzB5TTFRd05UbzBNam8wTnlzd01Eb3dNRUY1TTlrQUFBQVNkRVZZZEdWNGFXWTZSWGhwWms5bQpabk5sZEFBeU5sTWJvbVVBQUFBWmRFVllkR1Y0YVdZNlVHbDRaV3hZUkdsdFpXNXphVzl1QURJd05EaS9uQkpjQUFBQUdYUkZXSFJsCmVHbG1PbEJwZUdWc1dVUnBiV1Z1YzJsdmJnQXlNRFE0Qm1mSnRBQUFBQ2gwUlZoMGFXTmpPbU52Y0hseWFXZG9kQUJEYjNCNWNtbG4KYUhRZ1FYQndiR1VnU1c1akxpd2dNakF4TjcvekdOQUFBQUFhZEVWWWRHbGpZenBrWlhOamNtbHdkR2x2YmdCRWFYTndiR0Y1SUZBegpqM203dkFBQUFBQkpSVTVFcmtKZ2dnPT0iIC8+Cjwvc3ZnPgo=");
    background-size: 17px 17px; /* adopt this to your file tree font height */
    transform: translate(0px, 5px); /* to position the icon */
    background-repeat: no-repeat;
    display: inline-block;
    height: 17px;
    width: 17px;
    margin: -4px 2px 0 0;
}

3 Likes

Thank you! I found an SVG icon library on gihub, and then used this tool to convert them to a Data URI for inclusion in the css. Perfect.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.