Skip to content

Display current tab's icon as a badge on the taskbar icon #1871

Open

Description

@dave-c-whitney

I can assign individual icons for each profile, and each tab I open for said profile has that profile's icon on the tab. HOWEVER, the taskbar "button" has the primary app icon on it, which isn't as helpful as having the currently active tab's icon instead. The correct icon provides a visual cue on which taskbar button is "my" button I'm looking for.

Proposed technical implementation details (optional)

Activity

  1. added
    Issue-Feature
    on Jul 8, 2019
  2. ghost added
    Needs-Triage
    on Jul 8, 2019
  3. ghost added
    Needs-Tag-Fix
    on Jul 8, 2019
  4. zadjii-msft commented on Jul 8, 2019

    @zadjii-msft
    Member

    Is it even possible to change the taskbar icon for an exe at runtime?

  5. dave-c-whitney commented on Jul 8, 2019

    @dave-c-whitney
    Author

    I believe the taskbar icon matches the window's icon, which you can change at runtime.

  6. fredless commented on Jul 8, 2019

    @fredless

    Is it even possible to change the taskbar icon for an exe at runtime?

    Outlook does, and I've seen other (non-UWP) apps do it to implement faux-badging too.

    That being said, I prefer the current static icon approach.

  7. dave-c-whitney commented on Jul 8, 2019

    @dave-c-whitney
    Author

    I feel a configuration switch coming on...

  8. DHowett-MSFT commented on Jul 8, 2019

    @DHowett-MSFT
    Contributor

    I'm inclined to just say "nah."

  9. DHowett-MSFT commented on Jul 11, 2019

    @DHowett-MSFT
    Contributor

    I'm inclined to just say "this can actually be pretty useful" and stick it on the backlog. Thanks!

  10. added
    Area-UserInterface
    Product-Terminal
    and removed
    Needs-Triage
    on Jul 11, 2019
  11. ghost removed
    Needs-Tag-Fix
    on Jul 11, 2019
  12. added
    Help Wanted
    on Jul 11, 2019
  13. 12 remaining items

  14. zadjii-msft commented on Jul 26, 2021

    @zadjii-msft
    Member

    Note

    Walkthrough

    (not my best walkthrough, but a start)

    Look at dev/migrie/f/4768-taskbar-icons for a start here. That's got code for making HICONs out of image files.

    • Add a global showTaskbarOverlay setting, that's a bool, to MTSMSettings.h
    • Plumb the profile icon path up from TerminalPage -> AppHost, whenever the active pane changes.
      • This should just be a PropertyChanged event, ala TitlebarBrush, FrameBrush.
      • What happens when the icon is a Web URL?
        • We probably just have to say that these won't work for now. I looked into BackgroundDownloader, but seemingly didn't work for packaged centennial apps.
      • What about ms-appx URIs?
    • Take the code from dev/migrie/f/4768-taskbar-icons, and move that into IconPathConverter somewhere. It needs a LOT of cleanup.
      • IconPathConverter is in terminal.settings.model. We need to use this up at the Window level, and that doesn't reference T.S.M.
      • _getIconIndex probably needs to get pulled out to a helper.
      • Don't do raw COM like that, use smart pointers.
      • Make sure that it works unpackaged.
      • Use smart pointers for the HICON et al.
      • Should we cache these HICON's in a map in the AppHost, so if we see the same URI again, we skip the generation? PROBABLY
    • ITaskbarList3::SetOverlayIcon to set the icon.
  15. vemundha commented on Jul 28, 2021

    @vemundha
  16. zadjii-msft commented on Jul 28, 2021

    @zadjii-msft
  17. moved this from Should be written to Walkthrough in issue in Terminal Walkthroughson Feb 7, 2023
  18. zadjii-msft commented on Apr 28, 2023

    @zadjii-msft
    Member

    xlink: #4768 (comment) has the most comprehensive summary of the problem space

  19. kiruthikpurpose commented on Oct 21, 2024

    @kiruthikpurpose

    This feature would greatly enhance usability by allowing users to quickly identify the active tab through taskbar icons, especially for those managing multiple profiles and sessions simultaneously. Implementing this could also be configurable, giving users the option to enable or disable this feature based on personal preference. I agree that caching HICONs for repeated icons is a smart optimization to avoid unnecessary re-generation. The complexity around web URL icons can be handled in future iterations, but for now, supporting local and packaged icons should cover most cases.

  20. Aliremu commented on Jan 20, 2026

    @Aliremu
    Contributor

    Hi! Is anyone working on this? I have a small prototype working, but wanted to make sure no one's already working on this first or if there are other plans. Also had a few questions about what to do with glyph icons (settings, remote machine, etc) and split panes.

    2025-12-23.18-37-11.mp4
  21. DHowett commented on Jan 21, 2026

    @DHowett
    Member

    William Zhang (@Aliremu) this is amazing! feel free to work on it and maybe eventually PR it - we can discuss it over there :)

    IMO, we should be able to get a pretty quick handle on a rendering context that'll let us rasterize glyph and emoji icons; split panes will be something else entirely (and something I have long wished to expose better in the UI overall) and probably need some design aforethought

  22. zadjii-msft commented on Jan 21, 2026

    @zadjii-msft
    Member

    That demo is awesome, ship it :shipit:

    • I think it's fine for preview to acknowledge that emoji & glyphs won't work for that feature yet.
    • As far as split panes: we already just use the icon of the active pane as the tab's icon. I think that's fine to replicate here.
  23. oising commented on Jan 23, 2026

    @oising
    Collaborator

    Beautiful! Great job, William Zhang (@Aliremu) !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-UserInterfaceHelp WantedIssue-FeatureProduct-Terminal

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions