You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatically populate icons for the associated profiles #705
Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalHelp WantedWe encourage anyone to jump in on these.In-PRThis issue has a related PRIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.Work-ItemIt's being tracked by an actual work item internally. (to be removed soon)
We can get the HICON from an exe. Theoretically, there should be a way to turn that icon into a bitmap, and a way to load that bitmap as an image that UWP XAML can use.
That Icon could be used in the new tab button's flyout.
this WON'T work for WSL distros - they're Reparse points, so their exe's don't have ico's associated with them, the app does.
Biswapriyo Nath (@Biswa96) It's possible that'll work. You'd probably have to navigate through the reparse point to find the real exe when you encounter one. It's certainly possible to do, though I don't know how to.
So, I'll provide the counteropinion on this one. I think it's the right thing to do.
Because we can be the default terminal on Windows, we will want to derive icons from any LNK files¹ and EXE files that were used to spawn the console. Building on that: we may want to port any information we can from those files to create ephemeral profiles -- color schemes, cursor styles, etc. -- so that users who switch won't be quite so jarred that we've forgotten all their settings.
¹which allow you to specify a custom icon, and a bunch of internal developers do just that; I have to assume it's common practice outside Microsoft as well 😄
Reacted by Alex Alabuzhev, Mateusz Łoskot, Jeremy Banks and Nirmal Guru
Huh, I think this got re-iterated in #7552 - I think we're gonna make it so any profile that doesn't have an icon explicitly set will automatically try to use the exe as the icon
Looping back on this after some other work on icons.
I think we're gonna make it so any profile that doesn't have an icon explicitly set will automatically try to use the exe as the icon
This is easy enough, sorta. We can pretty easily fall back to trying to use the commandline if the icon for a profile is set to "" or null.
This kinda leads to a pair of discussion questions:
Do we leave the hardcoded default icon "\uE756" (the segoe fluent "Command prompt" icon)? Or do we change it to null, so that profiles will all automatically get this behavior?
I'm leaning towards "keep it the segoe icon".
We could do something weird where like, profiles from the SUI get the segoe icon by default, but then a bunch of profiles will all have a weird "icon": "\uE756" in them...
The only way to hide the icon becomes "icon": " ". That's weird.
We probably want to add a checkbox to the SUI for "Use commandline as icon", to disable the textbox.
Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalHelp WantedWe encourage anyone to jump in on these.In-PRThis issue has a related PRIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.Work-ItemIt's being tracked by an actual work item internally. (to be removed soon)
Activity
zadjii-msft commentedon May 13, 2019
This is something that I've wanted to do, but just haven't got the chance to yet.
This was previously MSFT: 21097504
Here are some notes I had before:
https://stackoverflow.com/a/1520223
https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-shgetfileinfoa
https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/ns-shellapi-_shfileinfoa
We can get the HICON from an exe. Theoretically, there should be a way to turn that icon into a bitmap, and a way to load that bitmap as an image that UWP XAML can use.
That Icon could be used in the new tab button's flyout.
this WON'T work for WSL distros - they're Reparse points, so their exe's don't have ico's associated with them, the app does.
Biswa96 commentedon May 13, 2019
Did you check the EXE files in WSL Appx packages?
zadjii-msft commentedon May 13, 2019
Biswapriyo Nath (@Biswa96) It's possible that'll work. You'd probably have to navigate through the reparse point to find the real exe when you encounter one. It's certainly possible to do, though I don't know how to.
6 remaining items
DHowett commentedon Nov 11, 2021
So, I'll provide the counteropinion on this one. I think it's the right thing to do.
Because we can be the default terminal on Windows, we will want to derive icons from any
LNKfiles¹ andEXEfiles that were used to spawn the console. Building on that: we may want to port any information we can from those files to create ephemeral profiles -- color schemes, cursor styles, etc. -- so that users who switch won't be quite so jarred that we've forgotten all their settings.¹which allow you to specify a custom icon, and a bunch of internal developers do just that; I have to assume it's common practice outside Microsoft as well 😄
zadjii-msft commentedon Apr 6, 2023
Huh, I think this got re-iterated in #7552 - I think we're gonna make it so any profile that doesn't have an icon explicitly set will automatically try to use the exe as the icon
zadjii-msft commentedon Aug 17, 2023
Looping back on this after some other work on icons.
This is easy enough, sorta. We can pretty easily fall back to trying to use the commandline if the
iconfor a profile is set to""ornull.This kinda leads to a pair of discussion questions:
"\uE756"(the segoe fluent "Command prompt" icon)? Or do we change it to null, so that profiles will all automatically get this behavior?"icon": "\uE756"in them..."icon": " ". That's weird.We'll sort this out in review.
zadjii-msft commentedon Aug 17, 2023
I wonder if it would be acceptable to:
"\uE756", we'll use"\uE756".Not sure if that's something we can officially figure out
When the profile icon is set to null, fall back to the icon of the co…