added a profile selector hotkey

This commit is contained in:
Eugene Pankov 2021-07-05 22:27:55 +02:00
parent 0eb006f297
commit 7f921c4d34
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4
5 changed files with 17 additions and 0 deletions

View file

@ -10,6 +10,7 @@ import { SelectorOption } from './api/selector'
import { ProfilesService } from './services/profiles.service'
import { AppService } from './services/app.service'
import { NotificationsService } from './services/notifications.service'
import { HotkeysService } from 'api'
/** @hidden */
@Injectable()
@ -21,8 +22,14 @@ export class ButtonProvider extends ToolbarButtonProvider {
private profilesServices: ProfilesService,
private config: ConfigService,
private notifications: NotificationsService,
hotkeys: HotkeysService,
) {
super()
hotkeys.hotkey$.subscribe(hotkey => {
if (hotkey === 'profile-selector') {
this.activate()
}
})
}
async activate () {

View file

@ -69,4 +69,6 @@ hotkeys:
pane-maximize:
- 'Ctrl-Alt-Enter'
close-pane: []
profile-selector:
- 'Ctrl-Shift-T'
pluginBlacklist: ['ssh']

View file

@ -68,4 +68,6 @@ hotkeys:
- '⌘-⌥-Enter'
close-pane:
- '⌘-Shift-W'
profile-selector:
- '⌘-E'
pluginBlacklist: ['ssh']

View file

@ -70,4 +70,6 @@ hotkeys:
pane-maximize:
- 'Ctrl-Alt-Enter'
close-pane: []
profile-selector:
- 'Ctrl-Shift-T'
pluginBlacklist: []

View file

@ -6,6 +6,10 @@ import { HotkeyDescription, HotkeyProvider } from './api/hotkeyProvider'
@Injectable()
export class AppHotkeyProvider extends HotkeyProvider {
hotkeys: HotkeyDescription[] = [
{
id: 'profile-selector',
name: 'Show profile selector',
},
{
id: 'toggle-fullscreen',
name: 'Toggle fullscreen mode',