Change tab icon according to remote machine name & own config #11194

Closed
opened 2026-01-31 02:41:13 +00:00 by claunia · 8 comments
Owner

Originally created by @gfcroft on GitHub (Oct 27, 2020).

Description of the new feature/enhancement

I use windows sub-system for linux (WSL) a lot with windows terminal (WT) to SSH remote machines, I have created profiles for some of the main machines I SSH, so that when I open the profile for that remote machine SSH, it has an identifiable icon

image

It would be great if rather than create a profile for each machine I SSH to, and have to stay in it (else I lose the icon change)
there could be a feature that allows a user to set up a config of machine names in their settings.json, which points to specific icons they have set, then have WT automatically update the tab icon with the icon that has been associated with the machine name, when they SSH over to the different machine

Originally created by @gfcroft on GitHub (Oct 27, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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 I use windows sub-system for linux (WSL) a lot with windows terminal (WT) to SSH remote machines, I have created profiles for some of the main machines I SSH, so that when I open the profile for that remote machine SSH, it has an identifiable icon ![image](https://user-images.githubusercontent.com/58346897/97365809-318aa000-189e-11eb-8a95-aa47708d854d.png) It would be great if rather than create a profile for each machine I SSH to, and have to stay in it (else I lose the icon change) there could be a feature that allows a user to set up a config of machine names in their settings.json, which points to specific icons they have set, then have WT automatically update the tab icon with the icon that has been associated with the machine name, when they SSH over to the different machine
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 02:41:13 +00:00
Author
Owner

@DHowett commented on GitHub (Oct 27, 2020):

Thanks for the request! /dup #1868

@DHowett commented on GitHub (Oct 27, 2020): Thanks for the request! /dup #1868
Author
Owner

@ghost commented on GitHub (Oct 27, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Oct 27, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@DHowett commented on GitHub (Oct 27, 2020):

If we're going to make this configurable I'd rather just go all the way and make it app-driven. I think that WT trying to detect a hostname is going to be error-prone, and isn't going to get us what we want. 😄

@DHowett commented on GitHub (Oct 27, 2020): If we're going to make this configurable I'd rather just go all the way and make it app-driven. I think that WT trying to _detect_ a hostname is going to be error-prone, and isn't going to get us what we want. :smile:
Author
Owner

@gfcroft commented on GitHub (Oct 27, 2020):

Sorry for the dup.

Would it be possible to define what you mean by app-driven please?

@gfcroft commented on GitHub (Oct 27, 2020): Sorry for the dup. Would it be possible to define what you mean by app-driven please?
Author
Owner

@DHowett commented on GitHub (Oct 27, 2020):

Sure! So, just like the app can set the title, there's a couple well-defined VT sequences that let the application set an icon. That'd be more like your remote shell or something saying "here, set the icon to this PNG file". It would let you go above/beyond simple hostname recognition and have the icon change when an operation was in-progress or when you were connected to a production cluster, etc.

@DHowett commented on GitHub (Oct 27, 2020): Sure! So, just like the app can set the title, there's a couple well-defined VT sequences that let the application set an icon. That'd be more like your remote shell or something saying "here, set the icon to this PNG file". It would let you go above/beyond simple hostname recognition and have the icon change when an operation was in-progress or when you were connected to a production cluster, etc.
Author
Owner

@gfcroft commented on GitHub (Oct 27, 2020):

Thanks for that clarification

In which case I think the discussion on the original ticket and your good point highlights how using VT sequences would be a fundamentally better way around this

I am assuming that because the existing VT Sequence I see on Console APIs (https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences) are by Microsoft, creation of new VT sequences would be reserved for the Microsoft team?

@gfcroft commented on GitHub (Oct 27, 2020): Thanks for that clarification In which case I think the discussion on the original ticket and your good point highlights how using VT sequences would be a fundamentally better way around this I am assuming that because the existing VT Sequence I see on Console APIs (https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences) are by Microsoft, creation of new VT sequences would be reserved for the Microsoft team?
Author
Owner

@DHowett commented on GitHub (Oct 27, 2020):

Nope! We actually try to avoid making our own VT sequences whenever possible. We use a bunch of other standard and quasi-standard documented sequences, like the xterm ones and many things that DEC terminals can handle

@DHowett commented on GitHub (Oct 27, 2020): Nope! We actually try to _avoid_ making our own VT sequences whenever possible. We use a bunch of other standard and quasi-standard documented sequences, like the [xterm ones](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html) and many things that [DEC terminals](https://vt100.net/docs/vt510-rm/) can handle
Author
Owner

@gfcroft commented on GitHub (Oct 27, 2020):

Great!

So it sounds like the way to resolve #1868 any other tickets relating to similar dynamic terminal content, would be to create a new issue in this project for inventing a custom Windows Terminal VT sequence (I can't find an issue which is already covering this, but as shown by the dup. my git issue searching skills are wanting...)

@gfcroft commented on GitHub (Oct 27, 2020): Great! So it sounds like the way to resolve #1868 any other tickets relating to similar dynamic terminal content, would be to create a new issue in this project for inventing a custom Windows Terminal VT sequence (I can't find an issue which is already covering this, but as shown by the dup. my git issue searching skills are wanting...)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11194