microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.75k stars 28.17k forks source link

Support referencing context key values in `window.title` template #202991

Open hediet opened 5 months ago

hediet commented 5 months ago

Currently, window.title allows several variables. It would be awesome for extensibility, if ${context.myContextVar} would be supported, with myContextVar being an arbitrary context variable.

Then extensions could contribute to the window title (candidates would be ${context.debuggerStateEmoji} or ${context.workspaceEmoji}).

I'd be up to create a PR!

Related: #2809

bpasero commented 5 months ago

Sounds interesting, feel free to give it a try. The variables are substituted from here:

https://github.com/microsoft/vscode/blob/8baf105cbd35e538d8133a857d4b4fede89f902c/src/vs/workbench/browser/parts/titlebar/windowTitle.ts#L287-L288

weartist commented 5 months ago

I'll try to submit a PR to fix this

LEKPHET-KUNSUE commented 5 months ago

anyone assign me pls