diff --git a/tabby-core/src/configDefaults.yaml b/tabby-core/src/configDefaults.yaml index d862439166..7a7ee99cc1 100644 --- a/tabby-core/src/configDefaults.yaml +++ b/tabby-core/src/configDefaults.yaml @@ -54,3 +54,4 @@ hacks: disableVibrancyWhileDragging: false enableFluentBackground: false language: null +defaultQuickConnectProvider: "ssh" diff --git a/tabby-core/src/services/profiles.service.ts b/tabby-core/src/services/profiles.service.ts index e1892d2f75..943d11c2dd 100644 --- a/tabby-core/src/services/profiles.service.ts +++ b/tabby-core/src/services/profiles.service.ts @@ -183,6 +183,7 @@ export class ProfilesService { freeInputPattern: this.translate.instant('Connect to "%s"...'), description: `(${provider.name.toUpperCase()})`, icon: 'fas fa-arrow-right', + weight: provider.id !== this.config.store.defaultQuickConnectProvider ? 1 : 0, callback: query => { const profile = provider.quickConnect(query) resolve(profile) diff --git a/tabby-settings/src/components/profilesSettingsTab.component.pug b/tabby-settings/src/components/profilesSettingsTab.component.pug index 0513f26b95..9ce3f98181 100644 --- a/tabby-settings/src/components/profilesSettingsTab.component.pug +++ b/tabby-settings/src/components/profilesSettingsTab.component.pug @@ -149,6 +149,20 @@ ul.nav-tabs(ngbNav, #nav='ngbNav') option(ngValue='wt', translation) Windows Terminal option(ngValue='cygwin', translation) Cygwin + .form-line + .header + .title(translate) Default "Connect to" type + .description(translate) Default connection type used by quick connect feature (ex. SSH, Telnet) + + select.form-control( + [(ngModel)]='config.store.defaultQuickConnectProvider', + (ngModelChange)='config.save()', + ) + option( + *ngFor='let provider of getQuickConnectProviders()', + [ngValue]='provider.id' + ) {{provider.name}} + .form-line.content-box .header .title(translate) Default profile settings diff --git a/tabby-settings/src/components/profilesSettingsTab.component.ts b/tabby-settings/src/components/profilesSettingsTab.component.ts index 9b6e1c8b1a..38898ae680 100644 --- a/tabby-settings/src/components/profilesSettingsTab.component.ts +++ b/tabby-settings/src/components/profilesSettingsTab.component.ts @@ -312,4 +312,8 @@ export class ProfilesSettingsTabComponent extends BaseComponent { isProfileBlacklisted (profile: PartialProfile): boolean { return profile.id && this.config.store.profileBlacklist.includes(profile.id) } + + getQuickConnectProviders (): ProfileProvider[] { + return this.profileProviders.filter(x => x.supportsQuickConnect) + } }