Skip to content
Open
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
3 changes: 3 additions & 0 deletions app/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const commands: Record<string, (focusedWindow?: BrowserWindow) => void> = {
'pane:close': (focusedWindow) => {
focusedWindow?.rpc.emit('termgroup close req');
},
'tab:close': (focusedWindow) => {
focusedWindow?.rpc.emit('tab close req');
},
'window:preferences': () => {
void openConfig();
},
Expand Down
1 change: 1 addition & 0 deletions app/keymaps/darwin.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"command+alt+left",
"ctrl+shift+tab"
],
"tab:close": "command+w",
"tab:jump:prefix": "command",
"pane:next": "command+]",
"pane:prev": "command+[",
Expand Down
1 change: 1 addition & 0 deletions app/keymaps/linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"ctrl+alt+left",
"ctrl+shift+tab"
],
"tab:close": "ctrl+w",
"tab:jump:prefix": "ctrl",
"pane:next": "ctrl+pageup",
"pane:prev": "ctrl+pagedown",
Expand Down
1 change: 1 addition & 0 deletions app/keymaps/win32.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"tab:prev": [
"ctrl+shift+tab"
],
"tab:close": "ctrl+w",
"tab:jump:prefix": "ctrl",
"pane:next": "ctrl+pageup",
"pane:prev": "ctrl+pagedown",
Expand Down
5 changes: 5 additions & 0 deletions lib/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type {configOptions} from '../typings/config';
import {loadConfig, reloadConfig} from './actions/config';
import init from './actions/index';
import {addNotificationMessage} from './actions/notifications';
import * as headerActions from './actions/header';
import * as sessionActions from './actions/sessions';
import * as termGroupActions from './actions/term-groups';
import * as uiActions from './actions/ui';
Expand Down Expand Up @@ -97,6 +98,10 @@ rpc.on('termgroup close req', () => {
store_.dispatch(termGroupActions.exitActiveTermGroup());
});

rpc.on('tab close req', () => {
store_.dispatch(headerActions.closeTab(store_.getState().sessions.activeUid));
});

rpc.on('session clear req', () => {
store_.dispatch(sessionActions.clearActiveSession());
});
Expand Down