From 1941d9b748222344e286dceea00fe441931ff7fe Mon Sep 17 00:00:00 2001 From: Me1onRind <320314319@qq.com> Date: Sat, 16 Oct 2021 22:49:03 +0800 Subject: [PATCH] add duplicate tab hotkey --- tabby-core/src/components/appRoot.component.ts | 3 +++ tabby-core/src/configDefaults.linux.yaml | 1 + tabby-core/src/configDefaults.macos.yaml | 1 + tabby-core/src/configDefaults.windows.yaml | 1 + tabby-core/src/hotkeys.ts | 4 ++++ 5 files changed, 10 insertions(+) diff --git a/tabby-core/src/components/appRoot.component.ts b/tabby-core/src/components/appRoot.component.ts index 9c62c528..d9b6fe58 100644 --- a/tabby-core/src/components/appRoot.component.ts +++ b/tabby-core/src/components/appRoot.component.ts @@ -111,6 +111,9 @@ export class AppRootComponent { if (hotkey === 'reopen-tab') { this.app.reopenLastTab() } + if (hotkey === 'duplicate-tab') { + this.app.duplicateTab(this.app.activeTab) + } } if (hotkey === 'toggle-fullscreen') { hostWindow.toggleFullscreen() diff --git a/tabby-core/src/configDefaults.linux.yaml b/tabby-core/src/configDefaults.linux.yaml index 7cd27e94..5e1be6ad 100644 --- a/tabby-core/src/configDefaults.linux.yaml +++ b/tabby-core/src/configDefaults.linux.yaml @@ -20,6 +20,7 @@ hotkeys: - 'Ctrl-Shift-PageDown' rearrange-panes: - 'Ctrl-Shift' + duplicate-tab: [] tab-1: - 'Alt-1' tab-2: diff --git a/tabby-core/src/configDefaults.macos.yaml b/tabby-core/src/configDefaults.macos.yaml index d833eda6..29f06cb4 100644 --- a/tabby-core/src/configDefaults.macos.yaml +++ b/tabby-core/src/configDefaults.macos.yaml @@ -38,6 +38,7 @@ hotkeys: - '⌘-9' tab-10: - '⌘-0' + duplicate-tab: [] tab-11: [] tab-12: [] tab-13: [] diff --git a/tabby-core/src/configDefaults.windows.yaml b/tabby-core/src/configDefaults.windows.yaml index 5afd4112..6af2a927 100644 --- a/tabby-core/src/configDefaults.windows.yaml +++ b/tabby-core/src/configDefaults.windows.yaml @@ -21,6 +21,7 @@ hotkeys: - 'Ctrl-Shift-PageDown' rearrange-panes: - 'Ctrl-Shift' + duplicate-tab: [] tab-1: - 'Alt-1' tab-2: diff --git a/tabby-core/src/hotkeys.ts b/tabby-core/src/hotkeys.ts index 28ce7b83..56acf98d 100644 --- a/tabby-core/src/hotkeys.ts +++ b/tabby-core/src/hotkeys.ts @@ -51,6 +51,10 @@ export class AppHotkeyProvider extends HotkeyProvider { id: 'rearrange-panes', name: 'Show pane labels (for rearranging)', }, + { + id: 'duplicate-tab', + name: 'Duplicate tab', + }, { id: 'tab-1', name: 'Tab 1', -- GitLab