alefragnani / vscode-project-manager

Project Manager Extension for Visual Studio Code
GNU General Public License v3.0
1.89k stars 225 forks source link

[FEATURE] - Set different icons for different projects #647

Open fuzihaofzh opened 1 year ago

fuzihaofzh commented 1 year ago

Currently, I have to switch between different projects frequently. However, it takes a long time to find the correct project. Is it possible for us to set special icons automatically or manually so I can find the correct project quickly?

alefragnani commented 1 year ago

Hi @fuzihaofzh ,

No, you can't define icons for each project. Instead, the extension itself defines the icon based on the kind of project you have.

BTW, those icons respect the File Icon theme you use, providing you a smooth experience with the rest of VS Code icons.

You may look for the current project info in the Status Bar, as the extension provides this information there. And that element may also be used as a shortcut to switch the project. Just click on it and it will display the projects for you to pick.

Hope this helps

ThomasLandauer commented 1 year ago

What I would like to be able to (and I guess this is what @fuzihaofzh meant above) is to set a custom icon (=favicon) for each project in its settings. Something like:

{
    "name": "foobar",
    "rootPath": "...",
    "paths": [],
    "group": "",
    "enabled": true
    "icon": "favicon.png"  <== Path to some picture file
}
alefragnani commented 1 year ago

Hi @ThomasLandauer ,

A few releases ago, VS Code blocked extensions to refer external resources, and with that change, an extension is not allowed leave the user to provide any external resource (image) to be used by the extension. So, you wouldn't be able to provide an image that you have on your collection, to be used by the extension. Instead, the extension should provide its own set of images, or use codicons.

As I said, this custom icon per project feature is not supported, today. Is it doable, yes, it is.

So, I'll leave the issue open, so other users can provide more feedback and upvotes.

Hope this helps

alefragnani commented 1 year ago

And, I'm still waiting to confirm if that's what @fuzihaofzh asked for.

fuzihaofzh commented 1 year ago

Hi @alefragnani Thanks very much for your help on this issue. What I mean is the same as @ThomasLandauer mentioned. If we could somehow add an icon in the config, it could be quite helpful for us to find the correct project we are looking for. Currently, I am using a emoji in the folder name and found it is quite helpful after I switch between the projects many times. It's easy to recognize the icon than to read the project name. Thanks for letting us know that vscode forbids to use the of outside sources. I just wonder if we could set an emoji as the folder icon? If possible, making a selection panel in the config setting will also help a lot for us to set.

Example:

{
    "name": "foobar",
    "rootPath": "...",
    "paths": [],
    "group": "",
    "enabled": true,
    "emoji": "☎️"  
}
alefragnani commented 1 year ago

If I remember correctly, VS Code does not support any icon other than codicons, but I could take a look.

Thank you for the feedback