diff --git a/tabby-core/src/commands.ts b/tabby-core/src/commands.ts index e7e71b04..2af7b6b6 100644 --- a/tabby-core/src/commands.ts +++ b/tabby-core/src/commands.ts @@ -27,7 +27,7 @@ export class CoreCommandProvider extends CommandProvider { async provide (): Promise { return [ { - id: 'profile-selector', + id: 'core:profile-selector', locations: [CommandLocation.LeftToolbar, CommandLocation.StartPage], label: this.translate.instant('Profiles & connections'), icon: this.hostApp.platform === Platform.Web @@ -35,7 +35,8 @@ export class CoreCommandProvider extends CommandProvider { : require('./icons/profiles.svg'), run: async () => this.activate(), }, - ...this.profilesService.getRecentProfiles().map(profile => ({ + ...this.profilesService.getRecentProfiles().map((profile, index) => ({ + id: `core:recent-profile-${index}`, label: profile.name, locations: [CommandLocation.StartPage], icon: require('./icons/history.svg'), diff --git a/tabby-core/src/configDefaults.yaml b/tabby-core/src/configDefaults.yaml index fd51a672..6f63b8d1 100644 --- a/tabby-core/src/configDefaults.yaml +++ b/tabby-core/src/configDefaults.yaml @@ -46,6 +46,8 @@ vault: null encrypted: false enableExperimentalFeatures: false pluginBlacklist: [] +commandBlacklist: [] +providerBlacklist: [] hacks: disableGPU: false disableVibrancyWhileDragging: false diff --git a/tabby-core/src/index.ts b/tabby-core/src/index.ts index d7715c94..0dafa9b8 100644 --- a/tabby-core/src/index.ts +++ b/tabby-core/src/index.ts @@ -193,7 +193,7 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex } if (hotkey === 'profile-selector') { - commands.run('profile-selector', {}) + commands.run('core:profile-selector', {}) } }) } diff --git a/tabby-core/src/services/commands.service.ts b/tabby-core/src/services/commands.service.ts index 72039beb..f858edcb 100644 --- a/tabby-core/src/services/commands.service.ts +++ b/tabby-core/src/services/commands.service.ts @@ -71,6 +71,7 @@ export class CommandService { } return commands + .filter(c => !this.config.store.commandBlacklist.includes(c.id)) .sort((a, b) => (a.weight ?? 0) - (b.weight ?? 0)) .map(command => { const run = command.run diff --git a/tabby-core/src/services/config.service.ts b/tabby-core/src/services/config.service.ts index 05f25924..8b5f7629 100644 --- a/tabby-core/src/services/config.service.ts +++ b/tabby-core/src/services/config.service.ts @@ -254,7 +254,9 @@ export class ConfigService { return services.filter(service => { for (const pluginName in this.servicesCache) { if (this.servicesCache[pluginName].includes(service.constructor)) { + const id = `${pluginName}:${service.constructor.name}` return !this.store?.pluginBlacklist?.includes(pluginName) + && !this.store?.providerBlacklist?.includes(id) } } return true