microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
158.92k stars 27.79k forks source link

[Feature Request] Allow us to choose custom or non-official icons for terminal and user profile icon #212043

Open gusbemacbe opened 1 week ago

gusbemacbe commented 1 week ago

Regarding https://github.com/microsoft/vscode/issues/199964, I was counselled to create an issue. I am not an expert on this issue, but I would like to invite the experts @Pkief and @lucas-labs (excellent at designing the icons) because they understand better the icon theme API, so they can test the new custom icons for terminal and user profile with the extension Material Product Icon Theme.

I am not sure if my issue is related to https://github.com/microsoft/vscode/issues/211811, but I am referring to the terminal and user profile icons and not to the VSCode GUI icons.

We would like to be able to choose our [own] custom icons for user profile and terminal icon? For example, Codicons does not have brain, flower, paint roller icons, unlike Font Awesome has. I am not sure if that they can be shipped with a product icon theme extension, like Philipp's.

DeltaRazero commented 1 week ago

Noticed this issue and as I'm in the process of making a product icon theme I thought I'd test the issue.

As far as I can see you can only select product icons for terminal profile icons (and I assume this to be the same for user profile icons). You can't add entirely new icons with solely a product icon theme. An extension has to add new icon IDs along with base icons via the following contribution point API https://code.visualstudio.com/api/references/contribution-points#contributes.icons

Of course a single extension can provide both product icon themes as well as new icons by combining the two contribution points. So the Material Product Icon Theme can add new icons just fine if you like, but if you end up not liking the theme but need the newly added icons, you'd still need the extension installed even if you don't have the product icon theme set active.

If you want to build your own extension solely for adding new icons, you basically only need the package.json and the icon svgs (ideally you'd add the icons embedded in a font so color themes can recolor them, as well as product icon themes can override them. You can check out this PR here https://github.com/microsoft/vscode-cmake-tools/pull/3737 for a FontForge script that does just that). You can build your extension locally and install it via the outputted VSIX file, or publish it to the VSCode extension marketplace