Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion resources/linux/code.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ StartupNotify=false
StartupWMClass=@@NAME_SHORT@@
Categories=TextEditor;Development;IDE;
MimeType=application/x-@@NAME@@-workspace;
Actions=new-empty-window;
Actions=new-empty-window;new-terminal;
Keywords=vscode;

[Desktop Action new-empty-window]
Expand All @@ -26,3 +26,18 @@ Name[zh_CN]=新建空窗口
Name[zh_TW]=開新空視窗
Exec=@@EXEC@@ --new-window %F
Icon=@@ICON@@

[Desktop Action new-terminal]
Name=New Terminal
Name[cs]=Nový terminál
Name[de]=Neues Terminal
Name[es]=Nueva terminal
Name[fr]=Nouveau terminal
Name[it]=Nuovo terminale
Name[ja]=新しいターミナル
Name[ko]=새 터미널
Name[ru]=Новый терминал
Name[zh_CN]=新建终端
Name[zh_TW]=開新終端機
Exec=@@EXEC@@ --new-window %F
Icon=@@ICON@@
1 change: 1 addition & 0 deletions src/vs/platform/menubar/electron-main/menubar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ export class Menubar extends Disposable {

const dockMenu = new Menu();
dockMenu.append(new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsMainService.openEmptyWindow({ context: OpenContext.DOCK }) }));
dockMenu.append(new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miNewTerminal', comment: ['&& denotes a mnemonic'] }, "New &&Terminal")), click: () => this.runActionInRenderer({ type: 'commandId', commandId: 'workbench.action.terminal.new' }) }));

app.dock!.setMenu(dockMenu);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,15 @@ export class WorkspacesHistoryMainService extends Disposable implements IWorkspa
args: '-n', // force new window
iconPath: process.execPath,
iconIndex: 0
},
{
type: 'task',
title: localize('newTerminal', "New Terminal"),
description: localize('newTerminalDesc', "Opens a new window for terminal use"),
program: process.execPath,
args: '-n', // force new window
iconPath: process.execPath,
iconIndex: 0
}
]
});
Expand Down
Loading