add profile name to window title (#170504)

* add profile name to window title

* code review feedback
This commit is contained in:
Sandeep Somavarapu
2023-01-04 10:09:06 +01:00
committed by GitHub
parent c8a86dea3d
commit 5242d72ee5
2 changed files with 8 additions and 2 deletions

View File

@@ -492,6 +492,7 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
localize('rootName', "`${rootName}`: name of the workspace with optional remote name and workspace indicator if applicable (e.g. myFolder, myRemoteFolder [SSH] or myWorkspace (Workspace))."),
localize('rootNameShort', "`${rootNameShort}`: shortened name of the workspace without suffixes (e.g. myFolder, myRemoteFolder or myWorkspace)."),
localize('rootPath', "`${rootPath}`: file path of the opened workspace or folder (e.g. /Users/Development/myWorkspace)."),
localize('profileName', "`${profileName}`: name of the profile in which the workspace is opened (e.g. Data Science (Profile)). Ignored if default profile is used."),
localize('appName', "`${appName}`: e.g. VS Code."),
localize('remoteName', "`${remoteName}`: e.g. SSH"),
localize('dirty', "`${dirty}`: an indicator for when the active editor has unsaved changes."),
@@ -508,10 +509,10 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
'type': 'string',
'default': (() => {
if (isMacintosh && isNative) {
return '${activeEditorShort}${separator}${rootName}'; // macOS has native dirty indicator
return '${activeEditorShort}${separator}${rootName}${separator}${profileName}'; // macOS has native dirty indicator
}
const base = '${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}';
const base = '${dirty}${activeEditorShort}${separator}${rootName}${separator}${profileName}${separator}${appName}';
if (isWeb) {
return base + '${separator}${remoteName}'; // Web: always show remote name
}