From 500acee064423b3079860d52e28336166054cf76 Mon Sep 17 00:00:00 2001 From: LeSeulArtichaut Date: Sat, 28 Dec 2019 22:18:24 +0100 Subject: [PATCH 1/2] Add pasteOnMiddleClickOption --- .../src/components/terminalSettingsTab.component.pug | 9 +++++++++ terminus-terminal/src/config.ts | 2 ++ 2 files changed, 11 insertions(+) diff --git a/terminus-terminal/src/components/terminalSettingsTab.component.pug b/terminus-terminal/src/components/terminalSettingsTab.component.pug index 3e4fd1e4..e7b4e425 100644 --- a/terminus-terminal/src/components/terminalSettingsTab.component.pug +++ b/terminus-terminal/src/components/terminalSettingsTab.component.pug @@ -57,6 +57,15 @@ h3.mb-3 Terminal ) | Paste +.form-line + .header + .title Paste on middle-click + + toggle( + [(ngModel)]='config.store.terminal.pasteOnMiddleClick', + (ngModelChange)='config.save()', + ) + .form-line .header .title Auto-open a terminal on app start diff --git a/terminus-terminal/src/config.ts b/terminus-terminal/src/config.ts index 6ff19b2e..8d26eee9 100644 --- a/terminus-terminal/src/config.ts +++ b/terminus-terminal/src/config.ts @@ -25,6 +25,7 @@ export class TerminalConfigProvider extends ConfigProvider { cursorBlink: true, customShell: '', rightClick: 'menu', + pasteOnMiddleClick: true, copyOnSelect: false, scrollOnInput: true, workingDirectory: '', @@ -113,6 +114,7 @@ export class TerminalConfigProvider extends ConfigProvider { shell: 'clink', profile: 'cmd-clink', rightClick: 'paste', + pasteOnMiddleClick: false, copyOnSelect: true, }, hotkeys: { From 2f78575cd75720f404fcb643846eaf0a7e0bb851 Mon Sep 17 00:00:00 2001 From: LeSeulArtichaut Date: Sat, 28 Dec 2019 22:48:06 +0100 Subject: [PATCH 2/2] Implement setting --- terminus-terminal/src/api/baseTerminalTab.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/terminus-terminal/src/api/baseTerminalTab.component.ts b/terminus-terminal/src/api/baseTerminalTab.component.ts index f7e83de8..5b388bcf 100644 --- a/terminus-terminal/src/api/baseTerminalTab.component.ts +++ b/terminus-terminal/src/api/baseTerminalTab.component.ts @@ -353,7 +353,9 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit this.frontend.mouseEvent$.subscribe(async event => { if (event.type === 'mousedown') { if (event.which === 2) { - this.paste() + if (this.config.store.terminal.pasteOnMiddleClick) { + this.paste() + } event.preventDefault() event.stopPropagation() return