terminal.ts 1.4 KB
Newer Older
D
Daniel Imms 已提交
1 2 3 4 5 6 7 8
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
'use strict';

import {TPromise} from 'vs/base/common/winjs.base';
import {createDecorator, ServiceIdentifier} from 'vs/platform/instantiation/common/instantiation';
9
import platform = require('vs/base/common/platform');
10
import processes = require('vs/base/node/processes');
D
Daniel Imms 已提交
11 12 13 14 15

export const TERMINAL_PANEL_ID = 'workbench.panel.terminal';

export const TERMINAL_SERVICE_ID = 'terminalService';

16 17
export const TERMINAL_DEFAULT_SHELL_LINUX = !platform.isWindows ? (process.env.SHELL || 'sh') : 'sh';
export const TERMINAL_DEFAULT_SHELL_OSX = !platform.isWindows ? (process.env.SHELL || 'sh') : 'sh';
18
export const TERMINAL_DEFAULT_SHELL_WINDOWS = processes.getWindowsShell();
19

D
Daniel Imms 已提交
20 21
export var ITerminalService = createDecorator<ITerminalService>(TERMINAL_SERVICE_ID);

22
export interface ITerminalConfiguration {
23 24 25 26 27 28 29 30 31
	terminal: {
		integrated: {
			shell: {
				linux: string,
				osx: string,
				windows: string
			},
			fontFamily: string
		}
32 33 34
	};
}

D
Daniel Imms 已提交
35 36 37
export interface ITerminalService {
	serviceId: ServiceIdentifier<any>;

38
	toggle(): TPromise<any>;
D
Daniel Imms 已提交
39
}