drcika / apc-extension

https://marketplace.visualstudio.com/items?itemName=drcika.apc-extension
MIT License
670 stars 26 forks source link

Custom text in sidebar title #132

Open darianmorat opened 9 months ago

darianmorat commented 9 months ago

I would like to know if it's possible to change the text of the sidebar title. I don't want to show anything, but a custom text like: file explorer, or my name:

Screenshot 2024-01-18 143823

where the 3 dots are I have this settings:

"window.titleBarStyle": "native",
   "apc.menubar.compact": true,
   "apc.electron": {
      "frame": false,
   },
   "apc.header": {
      "height": 33
   },
   "apc.sidebar.titlebar": {
      "height": 33
   },

   "apc.stylesheet": {
      ".title-label": "display: none !important",
      ".composite.title": "display: block !important",
      ".monaco-workbench .part.sidebar .title-actions .actions-container": "justify-content: space-around !important;",
   },

If I change the last line I can remove the 3 dots, but I would like to be able to add a custom text, is that possible?

".monaco-workbench .part.sidebar .title-actions .actions-container": "display: none !important;"

Screenshot 2024-01-18 144134

HiperDoo commented 9 months ago

Thanks for sharing this resource, I saw what you did and I also wanted to implement it, I think this is the solution you were looking for. image image

darianmorat commented 9 months ago

Thanks a lot, the only detail I could notice is that in the "extension" part it has a limit of characters:

Screenshot 2024-01-19 094112

btw also idk if u know about the Border top not appearing when in window mode. I can only see the active border top when is in full screen, other way i can't it just removes that, probably those are limitations with the extension?

Screenshot 2024-01-19 094459

Screenshot 2024-01-19 094516

HiperDoo commented 9 months ago

I don't know if it is possible to alter the maximum number of characters that can be displayed in that text (perhaps a trick can be applied with CSS so that it is rendered above all the objects and maintains their position).

And regarding the border I have no idea, maybe it could also be fixed with a little CSS in case there is no option (I recommend you see how the properties of those objects are altered in CSS in the two states of the window).

mrityu4 commented 4 months ago

Instead of static text, is it possible to show the root folder?

i have tried "apc.sidebar.titlebar": { "content": "${rootName}" }, "apc.stylesheet": { ".title-label h2:after": "content: \"@{rootName}\"" },

rez1coder commented 2 months ago

@mrityu4 Uncheck Open Editors

1

Shows Folder Name

2