Change:
Needs one for some keybindings
Also should add a rename terminal button to each entry for easy discoverability

Discussion:
import { QuickOpenHandler } from 'vs/workbench/browser/quickopen'; import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; <ins> import { ContributableActionProvider } from 'vs/workbench/browser/actions'; </ins> export class TerminalEntry extends QuickOpenEntryGroup {

return true; }); <del> return TPromise.as(new QuickOpenModel(entries)); </del> <ins> return TPromise.as(new QuickOpenModel(entries, new ContributableActionProvider())); </ins> } private getTerminals(): TerminalEntry[] {

<ins> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#C5C5C5"><path d="M12.714 9.603c-.07.207-.15.407-.246.601l1.017 2.139c-.335.424-.718.807-1.142 1.143l-2.14-1.018c-.193.097-.394.176-.601.247l-.795 2.235c-.265.03-.534.05-.807.05-.272 0-.541-.02-.806-.05l-.795-2.235c-.207-.071-.408-.15-.602-.247l-2.14 1.017c-.424-.336-.807-.719-1.143-1.143l1.017-2.139c-.094-.193-.175-.393-.245-.6l-2.236-.796c-.03-.265-.05-.534-.05-.807s.02-.542.05-.807l2.236-.795c.07-.207.15-.407.246-.601l-1.016-2.139c.336-.423.719-.807 1.143-1.142l2.14 1.017c.193-.096.394-.176.602-.247l.793-2.236c.265-.03.534-.05.806-.05.273 0 .542.02.808.05l.795 2.236c.207.07.407.15.601.246l2.14-1.017c.424.335.807.719 1.142 1.142l-1.017 2.139c.096.194.176.394.246.601l2.236.795c.029.266.049.535.049.808s-.02.542-.05.807l-2.236.796zm-4.714-4.603c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3-1.343-3-3-3z"/><circle cx="8" cy="8" r="1.5"/></g></svg> </ins>  No newline at end of file

<ins> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#424242"><path d="M12.714 9.603c-.07.207-.15.407-.246.601l1.017 2.139c-.335.424-.718.807-1.142 1.143l-2.14-1.018c-.193.097-.394.176-.601.247l-.795 2.235c-.265.03-.534.05-.807.05-.272 0-.541-.02-.806-.05l-.795-2.235c-.207-.071-.408-.15-.602-.247l-2.14 1.017c-.424-.336-.807-.719-1.143-1.143l1.017-2.139c-.094-.193-.175-.393-.245-.6l-2.236-.796c-.03-.265-.05-.534-.05-.807s.02-.542.05-.807l2.236-.795c.07-.207.15-.407.246-.601l-1.016-2.139c.336-.423.719-.807 1.143-1.142l2.14 1.017c.193-.096.394-.176.602-.247l.793-2.236c.265-.03.534-.05.806-.05.273 0 .542.02.808.05l.795 2.236c.207.07.407.15.601.246l2.14-1.017c.424.335.807.719 1.142 1.142l-1.017 2.139c.096.194.176.394.246.601l2.236.795c.029.266.049.535.049.808s-.02.542-.05.807l-2.236.796zm-4.714-4.603c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3-1.343-3-3-3z"/><circle cx="8" cy="8" r="1.5"/></g></svg> </ins>  No newline at end of file

.vs-dark .monaco-workbench.mac .panel.integrated-terminal .xterm-rows, .hc-black .monaco-workbench.mac .panel.integrated-terminal .xterm-rows { cursor: -webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text; <del> } </del>  No newline at end of file <ins> } .monaco-workbench .quick-open-terminal-configure { background-image: url('configure.svg'); } .vs-dark .monaco-workbench .quick-open-terminal-configure, .hc-black .monaco-workbench .quick-open-terminal-configure { background-image: url('configure-inverse.svg'); } </ins>

import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; <del> import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; </del> <ins> import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, QuickOpenActionTermContributor, QuickOpenTermAction, TERMINAL_PICKER_PREFIX } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; </ins> import { Registry } from 'vs/platform/registry/common/platform'; import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';

import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { registerColors } from './terminalColorRegistry'; import { NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction } from "vs/workbench/electron-browser/actions"; <del> import { QUICKOPEN_ACTION_ID } from "vs/workbench/browser/parts/quickopen/quickopen"; </del> <ins> import { QUICKOPEN_ACTION_ID, getQuickNavigateHandler } from "vs/workbench/browser/parts/quickopen/quickopen"; </ins> import { IQuickOpenRegistry, Extensions as QuickOpenExtensions, QuickOpenHandlerDescriptor } from 'vs/workbench/browser/quickopen'; <ins> import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbench/browser/actions'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; </ins> <del> export const TERMINAL_PICKER_PREFIX = 'term '; </del> const quickOpenRegistry = (<IQuickOpenRegistry>Registry.as(QuickOpenExtensions.Quickopen)); <ins> const inTerminalsPicker = 'inTerminalPicker'; </ins> quickOpenRegistry.registerQuickOpenHandler( new QuickOpenHandlerDescriptor( 'vs/workbench/parts/terminal/browser/terminalQuickOpen', 'TerminalPickerHandler', TERMINAL_PICKER_PREFIX, <del> null, </del> <ins> inTerminalsPicker, </ins> nls.localize('quickOpen.terminal', "Show All Opened Terminals") ) ); <ins> const quickOpenNavigateNextInTerminalPickerId = 'workbench.action.quickOpenNavigateNextInTerminalPicker'; CommandsRegistry.registerCommand( quickOpenNavigateNextInTerminalPickerId, { handler: getQuickNavigateHandler(quickOpenNavigateNextInTerminalPickerId, true) }); const quickOpenNavigatePreviousInTerminalPickerId = 'workbench.action.quickOpenNavigatePreviousInTerminalPicker'; CommandsRegistry.registerCommand( quickOpenNavigatePreviousInTerminalPickerId, { handler: getQuickNavigateHandler(quickOpenNavigatePreviousInTerminalPickerId, false) }); const registry = <IWorkbenchActionRegistry>Registry.as(ActionExtensions.WorkbenchActions); registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenTermAction, QuickOpenTermAction.ID, QuickOpenTermAction.LABEL), 'Quick Open Terminal'); const actionBarRegistry = Registry.as<IActionBarRegistry>(ActionBarExtensions.Actionbar); actionBarRegistry.registerActionBarContributor(Scope.VIEWER, QuickOpenActionTermContributor); </ins> let configurationRegistry = <IConfigurationRegistry>Registry.as(Extensions.Configuration); configurationRegistry.registerConfiguration({ 'id': 'terminal',

import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; <ins> import { ActionBarContributor } from 'vs/workbench/browser/actions'; import { TerminalEntry } from 'vs/workbench/parts/terminal/browser/terminalQuickOpen'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; export const TERMINAL_PICKER_PREFIX = 'term '; </ins> export class ToggleTerminalAction extends TogglePanelAction {

constructor( id: string, label: string, <del> @IQuickOpenService private quickOpenService: IQuickOpenService, @ITerminalService private terminalService: ITerminalService </del> <ins> @IQuickOpenService protected quickOpenService: IQuickOpenService, @ITerminalService protected terminalService: ITerminalService </ins> ) { super(id, label); } <del> public run(): TPromise<any> { const terminalInstance = this.terminalService.getActiveInstance(); </del> <ins> public run(terminal?: TerminalEntry): TPromise<any> { const terminalInstance = terminal ? this.terminalService.getInstanceFromId(parseInt(terminal.getLabel().split(':')[0], 10)) : this.terminalService.getActiveInstance(); </ins> if (!terminalInstance) { return TPromise.as(void 0); }

return TPromise.as(this.terminalService.hideFindWidget()); } } <ins> export class QuickOpenActionTermContributor extends ActionBarContributor { constructor( @ITerminalService private terminalService: ITerminalService, @IQuickOpenService private quickOpenService: IQuickOpenService, @IInstantiationService private instantiationService: IInstantiationService ) { super(); } public getActions(context: any): IAction[] { let actions: Action[] = []; if (context.element instanceof TerminalEntry) { actions.push(this.instantiationService.createInstance(RenameTerminalQuickOpenAction, RenameTerminalQuickOpenAction.ID, RenameTerminalQuickOpenAction.LABEL, context.element)); } return actions; } public hasActions(context: any): boolean { return true; } } export class QuickOpenTermAction extends Action { public static ID = 'workbench.action.quickOpenTerm'; public static LABEL = nls.localize('quickOpenTerm', "Switch active terminal"); constructor( id: string, label: string, @IQuickOpenService private quickOpenService: IQuickOpenService ) { super(id, label); } public run(): TPromise<void> { return this.quickOpenService.show(TERMINAL_PICKER_PREFIX, null); } } export class RenameTerminalQuickOpenAction extends RenameTerminalAction { constructor( id: string, label: string, private terminal: TerminalEntry, @IQuickOpenService quickOpenService: IQuickOpenService, @ITerminalService terminalService: ITerminalService, @IInstantiationService private instantiationService: IInstantiationService ) { super(id, label, quickOpenService, terminalService); this.class = 'quick-open-terminal-configure'; } public run(): TPromise<any> { super.run(this.terminal) // This timeout is needed to make sure the previous quickOpen has time to close before we show the next one .then(() => TPromise.timeout(50)) .then(result => this.quickOpenService.show(TERMINAL_PICKER_PREFIX, null)); return TPromise.as(null); } } </ins>  No newline at end of file