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
Area-SettingsIssues related to settings and customizability, for console or terminalHelp WantedWe encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.Resolution-Won't-FixWe're just really obstinate about this. There's probably a good reason.
Allow changing the taskbar icon, for a bit more additional and nice customization.
Proposed technical implementation details
A parameter in settings.json? Allowing either picking any icon, or just providing a toggle to use the monochrome icon that's used in high-contrast mode.
Why?
I got Windows Terminal from chocolatey, which gets it from Microsoft Store, so it's not possible to just right-click, go to properties, and select a different icon, like with other apps.
Okay well, this is technically different than "Display current tab's icon as a badge on the taskbar icon #1871" and "Display current tab's icon as the taskbar icon #6556". Those threads both cover more of the technical aspects of why this may or may not be possible.
I suppose I'm open to the idea of allowing the user to customize the icon, though I'd love to see how it works in practice.
Do we have some source on that? I'd love to update the other threads with the relevant info, and file a dependency on the platform to get that restriction relaxed
Played with this more today. dev/migrie/f/4768-taskbar-icons has notes.
I concur - I don't think this'll be possible in a packaged application. We might be able to still enable this for unpackaged installs... but then you're already unpackaged where it's easier to set the icon.
I've got a line out to some taskbar folks for confirmation, but I'm not optimistic.
Talked this over with some taskbar folks. Looks like this is going to be largely impossible. The Taskbar really doesn't expect an app to be changing its icon at runtime. There are technically tricks we could play (by doing Aumid/RelaunchIcon trickery), but that would essentially cause the Taskbar to think the Terminal was a different app each time. Our window would get moved to the end of the taskbar order. Pinning to the taskbar would also be weird. I'm sure there are more edge cases here that they didn't just rattle off the top of their head too.
Sorry about this 😕 The aforementioned "create a shortcut to an app" does seem like the best way to get around this.
An app (eg conhost console app) can set the icon on the taskbar
icon = LoadIcon(GetModuleHandle(NULL), "IDI_ICON1"); // eg get own icon
if (icon) {
SetClassLongPtr(GetConsoleWindow(), GCLP_HICON, (LONG_PTR)icon);
SetClassLongPtr(GetConsoleWindow(), GCLP_HICONSM, (LONG_PTR)icon);
}
this works at least with windows 2000 (GetConsoleWindow() is a new function in windows 2000) up to windows 11. The windows taskbar can handle an icon change.
Sure, that's correct. However, (I'm told) packaged applications are treated differently by the taskbar. For packaged apps, the taskbar apparently ignores the HWND icon and just uses the package's icon.
Prototype code I wrote in dev/migrie/f/4768-taskbar-icons could set the icon on the window, but not the taskbar itself. I suppose I was using
I read, the the taskbar ist not able to handle Icon changes, but the "taskbar" is /or was able to do it.
The SendMessage(..., WM_SETICON, ) method worked in my apps up to Windows 7, but not Windows 10 anymore. So I added the
SetClassLongPtr methods and use SetConsoleIcon() + SendMessage() + SetClassLongPtr ().
Area-SettingsIssues related to settings and customizability, for console or terminalHelp WantedWe encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.Resolution-Won't-FixWe're just really obstinate about this. There's probably a good reason.
Activity
jgkumaran commentedon Jul 26, 2020
It's not possible to change the taskbar icon in UWP apps. They always use the icon specified in their package manifest including desktop bridge apps.
zadjii-msft commentedon Jul 27, 2020
Okay well, this is technically different than "Display current tab's icon as a badge on the taskbar icon #1871" and "Display current tab's icon as the taskbar icon #6556". Those threads both cover more of the technical aspects of why this may or may not be possible.
I suppose I'm open to the idea of allowing the user to customize the icon, though I'd love to see how it works in practice.
jgkumaran commentedon Jul 27, 2020
Mike Griese (@zadjii-msft) Badges are possible but replacing the icon with something else can't be done in a packaged app.
zadjii-msft commentedon Jul 27, 2020
Do we have some source on that? I'd love to update the other threads with the relevant info, and file a dependency on the platform to get that restriction relaxed
1 remaining item
trippwill commentedon Oct 3, 2020
Dreamykass (@Dreamykass) , take a look at this for creating shortcuts to store apps: https://lifehacker.com/how-to-create-a-shortcut-for-any-modern-windows-app-1722569853
zadjii-msft commentedon Apr 28, 2023
xlink: #4768 (comment) has the most comprehensive summary of the problem space
zadjii-msft commentedon Aug 16, 2023
Played with this more today.
dev/migrie/f/4768-taskbar-iconshas notes.I concur - I don't think this'll be possible in a packaged application. We might be able to still enable this for unpackaged installs... but then you're already unpackaged where it's easier to set the icon.
I've got a line out to some taskbar folks for confirmation, but I'm not optimistic.
zadjii-msft commentedon Aug 17, 2023
Talked this over with some taskbar folks. Looks like this is going to be largely impossible. The Taskbar really doesn't expect an app to be changing its icon at runtime. There are technically tricks we could play (by doing Aumid/RelaunchIcon trickery), but that would essentially cause the Taskbar to think the Terminal was a different app each time. Our window would get moved to the end of the taskbar order. Pinning to the taskbar would also be weird. I'm sure there are more edge cases here that they didn't just rattle off the top of their head too.
Sorry about this 😕 The aforementioned "create a shortcut to an app" does seem like the best way to get around this.
halifir commentedon May 7, 2024
An app (eg conhost console app) can set the icon on the taskbar
icon = LoadIcon(GetModuleHandle(NULL), "IDI_ICON1"); // eg get own icon
if (icon) {
SetClassLongPtr(GetConsoleWindow(), GCLP_HICON, (LONG_PTR)icon);
SetClassLongPtr(GetConsoleWindow(), GCLP_HICONSM, (LONG_PTR)icon);
}
this works at least with windows 2000 (GetConsoleWindow() is a new function in windows 2000) up to windows 11. The windows taskbar can handle an icon change.
zadjii-msft commentedon May 7, 2024
Sure, that's correct. However, (I'm told) packaged applications are treated differently by the taskbar. For packaged apps, the taskbar apparently ignores the HWND icon and just uses the package's icon.
Prototype code I wrote in
dev/migrie/f/4768-taskbar-iconscould set the icon on the window, but not the taskbar itself. I suppose I was usinginstead of
SetClassLongPtr, but I don't think that'll change the behavior here.halifir commentedon May 7, 2024
I read, the the taskbar ist not able to handle Icon changes, but the "taskbar" is /or was able to do it.
The SendMessage(..., WM_SETICON, ) method worked in my apps up to Windows 7, but not Windows 10 anymore. So I added the
SetClassLongPtr methods and use SetConsoleIcon() + SendMessage() + SetClassLongPtr ().