Icon property should load asset from binary #4519

Open
opened 2026-01-30 23:49:35 +00:00 by claunia · 0 comments
Owner

Originally created by @LoadLibrary on GitHub (Oct 17, 2019).

Description of the new feature/enhancement

Windows Terminal allows creating new terminal entries with its JSON file configuration. One of the properties of the terminal entry is Icon that allows an arbitrary image being shown alongside the new terminal name.

Currently the Icon property seems to accept only images encoded as PNGs or JPGs. The Icon property should be capable of showing an asset from a binary as well. Think about how icons are storage as resources in .exe and .dll files. Since a binary might have multiple assets (user32.dll for example), asset number could be defined after a comma (just like shell does).

This would be useful, for example, for having different icons for Visual Studio Native Tools 2019 and 2017 consoles. Currently I have to find and download the PNGs for the VS logos instead of grabbing from the .exes.

Proposed technical implementation details (optional)

The final JSON could look like as follows:
{
// Visual Studio 2019 x64 Native Tools
"guid": "{6277D459-07EF-4AE4-91DF-A7ED9EB95EF6}",
"name": "VS2019 x64",
"commandline": "cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"",
"hidden": false,
"icon": ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe,0""
},
{
// Visual Studio 2017 x64 Native Tools
"guid": "{9A014D1D-85D7-4470-8178-4369B5D31A76}",
"name": "VS2017 x64",
"commandline": "cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"",
"hidden": false,
"icon": ""C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe,0""
},

Originally created by @LoadLibrary on GitHub (Oct 17, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Windows Terminal allows creating new terminal entries with its JSON file configuration. One of the properties of the terminal entry is Icon that allows an arbitrary image being shown alongside the new terminal name. Currently the Icon property seems to accept only images encoded as PNGs or JPGs. The Icon property should be capable of showing an asset from a binary as well. Think about how icons are storage as resources in .exe and .dll files. Since a binary might have multiple assets (user32.dll for example), asset number could be defined after a comma (just like shell does). This would be useful, for example, for having different icons for Visual Studio Native Tools 2019 and 2017 consoles. Currently I have to find and download the PNGs for the VS logos instead of grabbing from the .exes. # Proposed technical implementation details (optional) The final JSON could look like as follows: { // Visual Studio 2019 x64 Native Tools "guid": "{6277D459-07EF-4AE4-91DF-A7ED9EB95EF6}", "name": "VS2019 x64", "commandline": "cmd.exe /k \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat\"", "hidden": false, "icon": "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\IDE\\devenv.exe,0\"" }, { // Visual Studio 2017 x64 Native Tools "guid": "{9A014D1D-85D7-4470-8178-4369B5D31A76}", "name": "VS2017 x64", "commandline": "cmd.exe /k \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat\"", "hidden": false, "icon": "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\devenv.exe,0\"" },
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-30 23:49:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4519