diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.ts b/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.ts index f920f87442f..a3a05c3ffd8 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.ts @@ -116,8 +116,8 @@ export abstract class BaseTerminalProfileResolverService implements ITerminalPro } } - getDefaultIcon(): TerminalIcon & ThemeIcon { - return this._iconRegistry.getIcon(this._configurationService.getValue(TerminalSettingId.TabsDefaultIcon)) || Codicon.terminal; + getDefaultIcon(resource?: URI): TerminalIcon & ThemeIcon { + return this._iconRegistry.getIcon(this._configurationService.getValue(TerminalSettingId.TabsDefaultIcon, { resource })) || Codicon.terminal; } async resolveShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig, options: IShellLaunchConfigResolveOptions): Promise { @@ -145,9 +145,10 @@ export abstract class BaseTerminalProfileResolverService implements ITerminalPro // Verify the icon is valid, and fallback correctly to the generic terminal id if there is // an issue + const resource = shellLaunchConfig === undefined || typeof shellLaunchConfig.cwd === 'string' ? undefined : shellLaunchConfig.cwd; shellLaunchConfig.icon = this._getCustomIcon(shellLaunchConfig.icon) || this._getCustomIcon(resolvedProfile.icon) - || this.getDefaultIcon(); + || this.getDefaultIcon(resource); // Override the name if specified if (resolvedProfile.overrideName) { @@ -157,7 +158,7 @@ export abstract class BaseTerminalProfileResolverService implements ITerminalPro // Apply the color shellLaunchConfig.color = shellLaunchConfig.color || resolvedProfile.color - || this._configurationService.getValue(TerminalSettingId.TabsDefaultColor); + || this._configurationService.getValue(TerminalSettingId.TabsDefaultColor, { resource }); // Resolve useShellEnvironment based on the setting if it's not set if (shellLaunchConfig.useShellEnvironment === undefined) { diff --git a/src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts b/src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts index c5b6caee4af..4b52e0191f4 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts @@ -42,12 +42,14 @@ const terminalConfiguration: IConfigurationNode = { }, [TerminalSettingId.TabsDefaultColor]: { description: localize('terminal.integrated.tabs.defaultColor', "A theme color ID to associate with terminal icons by default."), - ...terminalColorSchema + ...terminalColorSchema, + scope: ConfigurationScope.RESOURCE }, [TerminalSettingId.TabsDefaultIcon]: { description: localize('terminal.integrated.tabs.defaultIcon', "A codicon ID to associate with terminal icons by default."), ...terminalIconSchema, default: Codicon.terminal.id, + scope: ConfigurationScope.RESOURCE }, [TerminalSettingId.TabsEnabled]: { description: localize('terminal.integrated.tabs.enabled', 'Controls whether terminal tabs display as a list to the side of the terminal. When this is disabled a dropdown will display instead.'),